* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Arial, sans-serif; margin: 0; background:#f6f7fb; color:#222; }
header { background:#111827; color:white; padding:18px 24px; }
header h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; }
main { padding:20px; max-width:1250px; margin:auto; width:100%; }
.nav { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.nav a { background:#1f2937; color:white; text-decoration:none; padding:11px 14px; border-radius:8px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; min-height:42px; }
.nav a:hover { background:#374151; }
.grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.card { background:white; border-radius:12px; padding:16px; box-shadow:0 2px 8px #0001; min-width:0; }
.big { margin-bottom:20px; }
.metric { font-size:24px; font-weight:700; margin-top:6px; overflow-wrap:anywhere; }
.menu-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.menu-card { display:block; color:#111827; text-decoration:none; background:#eef6ff; border:1px solid #c9e2ff; border-radius:12px; padding:16px; line-height:1.4; }
.menu-card:hover { background:#ddecff; }
h2 { margin-top:24px; line-height:1.2; }
.table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:20px; border-radius:10px; box-shadow:0 2px 8px #0001; background:white; }
table { width:100%; min-width:720px; border-collapse: collapse; background:white; margin:0; }
th,td { padding:10px; border-bottom:1px solid #eee; text-align:left; font-size:14px; vertical-align:top; white-space:nowrap; }
th { background:#1f2937; color:white; position:sticky; top:0; }
td button { padding:6px 9px; min-height:30px; width:auto; font-size:13px; white-space:nowrap; }
label { display:flex; flex-direction:column; gap:5px; font-weight:600; min-width:0; }
input, select, button { padding:10px; border:1px solid #ccc; border-radius:8px; font-size:16px; width:100%; max-width:100%; min-height:42px; }
button { background:#2563eb; color:white; cursor:pointer; border:0; font-weight:700; }
button.small { width:auto; min-height:30px; padding:6px 9px; font-size:13px; display:inline-block; margin:2px 2px 2px 0; }
.week-total-input { width:110px; min-height:32px; padding:6px 8px; font-size:14px; }
button:hover { background:#1d4ed8; }
button.danger { background:#dc2626; }
button.danger:hover { background:#b91c1c; }
.form { display:grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap:12px; align-items:end; background:white; padding:14px; border-radius:12px; box-shadow:0 2px 8px #0001; margin-bottom:18px; width:100%; }
.form button { align-self:end; }
.muted { color:#666; font-size:13px; line-height:1.35; }
.right { text-align:right; }

@media (max-width: 700px) {
  header { padding:14px 14px; }
  header h1 { font-size:22px; }
  main { padding:12px; }
  .nav { display:grid; grid-template-columns:1fr; gap:8px; }
  .nav a { width:100%; justify-content:flex-start; padding:13px 14px; }
  .grid, .menu-grid { grid-template-columns:1fr; gap:10px; }
  .card, .menu-card { padding:13px; }
  .metric { font-size:22px; }
  h2 { font-size:20px; margin-top:22px; }
  .form { grid-template-columns:1fr; gap:11px; padding:12px; }
  input, select, button { font-size:16px; min-height:46px; }
  .table-wrap { margin-left:-2px; margin-right:-2px; width:calc(100% + 4px); }
  table { min-width:760px; }
  th,td { padding:9px; font-size:13px; }
}

@media (max-width: 420px) {
  main { padding:10px; }
  header { padding:12px; }
  .form { padding:10px; }
  table { min-width:700px; }
  th,td { padding:8px; font-size:12px; }
}
