@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --ink: #23261f;
  --paper: #f7f4ec;
  --paper-2: #eeead9;
  --forest: #159197;
  --forest-deep: #0d5f63;
  --forest-mid: #36989d;
  --amber: #d99a3b;
  --amber-soft: #f0d9ad;
  --line: #d8d2bd;
  --danger: #a4392c;
  --radius: 10px;
}

/* ---------- تم‌های ظاهری آماده (تنظیمات ظاهری در پنل مدیریت) ---------- */
html[data-theme="ocean"] {
  --ink: #1c2733;
  --paper: #f2f6fa;
  --paper-2: #e4ecf3;
  --forest: #1f6fb2;
  --forest-deep: #144d80;
  --forest-mid: #3487c7;
  --amber: #e0952e;
  --amber-soft: #f5dcae;
  --line: #cdd8e2;
  --danger: #b23a3a;
}

html[data-theme="sunset"] {
  --ink: #2c211a;
  --paper: #fbf3ec;
  --paper-2: #f5e5d6;
  --forest: #d9622f;
  --forest-deep: #a8461d;
  --forest-mid: #e08248;
  --amber: #e8ab3d;
  --amber-soft: #f7ddab;
  --line: #e6d2bf;
  --danger: #a4392c;
}

html[data-theme="grape"] {
  --ink: #241d2e;
  --paper: #f6f3f9;
  --paper-2: #ebe3f2;
  --forest: #6d3fa0;
  --forest-deep: #4c2876;
  --forest-mid: #8a5cb8;
  --amber: #c9973f;
  --amber-soft: #ecd9ae;
  --line: #d8cbe4;
  --danger: #a4392c;
}

html[data-theme="slate"] {
  --ink: #1e2226;
  --paper: #f2f3f4;
  --paper-2: #e4e7ea;
  --forest: #47545f;
  --forest-deep: #2c363e;
  --forest-mid: #647380;
  --amber: #c08a3e;
  --amber-soft: #e9d3ac;
  --line: #d3d8dc;
  --danger: #a4392c;
}

html[data-theme="crimson"] {
  --ink: #2a1c1c;
  --paper: #faf3f0;
  --paper-2: #f2e0da;
  --forest: #a5313a;
  --forest-deep: #791f26;
  --forest-mid: #c14954;
  --amber: #d99a3b;
  --amber-soft: #f0d9ad;
  --line: #e6d3cd;
  --danger: #7a2020;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
}

body {
  min-height: 100vh;
}

.topbar {
  background: var(--forest);
  color: var(--paper);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--amber);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.topbar .brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--amber-soft);
}

.topbar button.link {
  background: none;
  border: 1px solid rgba(247,244,236,0.35);
  color: var(--paper);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.topbar button.link:hover { background: rgba(247,244,236,0.12); }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.countdown-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--forest);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}
.countdown-icon { font-size: 14px; }
.countdown-timer {
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.18);
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 18px;
}
.month-nav-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--forest-deep);
  min-width: 110px;
  text-align: center;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dash-stat-card {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.dash-stat-label {
  font-size: 12px;
  color: #7a7460;
  margin-bottom: 8px;
}
.dash-stat-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--forest-deep);
}
.dash-day-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-day-pill {
  flex: 1;
  text-align: center;
  background: var(--paper-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--forest-deep);
  font-size: 13px;
}

.menu-day-card {
  margin-bottom: 10px;
  padding: 14px 16px;
}
.menu-day-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--forest-deep);
  margin-bottom: 10px;
}
.menu-food-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.menu-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
}
.menu-chip.selected {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
  font-weight: 700;
}

.participation-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.participation-col-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.food-image-preview {
  display: block;
  width: 100%;
  max-width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--line);
}
.food-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.food-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--paper-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b5af98;
  font-size: 18px;
  vertical-align: middle;
}
.food-option .food-thumb-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.fb-satisfy-row { display: flex; gap: 8px; }
.fb-satisfy-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
}
.fb-satisfy-btn.selected-positive { background: var(--forest); color: #fff; border-color: var(--forest); }
.fb-satisfy-btn.selected-negative { background: var(--danger); color: #fff; border-color: var(--danger); }
.fb-stars { display: flex; gap: 6px; font-size: 26px; cursor: pointer; justify-content: center; margin-top: 6px; }
.fb-star { color: #d8d2bd; }
.fb-star.filled { color: var(--amber); }
.fb-notes {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.fb-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.fb-tab-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: #7a7460;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.fb-tab-btn.active { background: var(--forest); color: #fff; border-color: var(--forest); }

.confirm-order-card { max-width: 400px; }
.confirm-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.confirm-order-header h3 { margin: 0; }
.confirm-order-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #948e77;
  padding: 0;
}
.confirm-order-item {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.confirm-order-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--forest-deep);
}
.confirm-order-day {
  font-size: 12px;
  color: #7a7460;
  margin-top: 4px;
}
.confirm-order-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff8e1;
  border: 1px solid #f0d9ad;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #6b4a0f;
}
.confirm-order-warning-sub {
  font-size: 12px;
  color: #8a6a2f;
  margin-top: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 4px;
  color: var(--forest-deep);
}
.page-sub {
  color: #6b6656;
  font-size: 14px;
  margin: 0 0 22px;
}

.card {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--forest-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 .badge-num {
  background: var(--forest);
  color: var(--paper);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

label {
  display: block;
  font-size: 13px;
  color: #55503f;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  border-color: var(--forest);
}

.field { margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-amber { background: var(--amber); color: #3a2807; }
.btn-amber:hover { filter: brightness(0.95); }
.btn-excel { background: #ff9100; color: #fff; }
.btn-excel:hover { filter: brightness(0.95); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--paper-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.food-option {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.food-option:hover { border-color: var(--amber); }
.food-option.selected {
  border-color: var(--forest);
  background: #eef3ef;
}
.food-option .fname { font-weight: 800; font-size: 14px; margin-bottom: 4px; color: var(--forest-deep); }
.food-option .fdesc { font-size: 12px; color: #7a7460; }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error { background: #fbe6e1; color: var(--danger); border: 1px solid #f0c4b9; }
.alert-success { background: #e5f0e8; color: #1f4b3f; border: 1px solid #bcdcc4; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--paper-2);
  font-weight: 800;
  color: var(--forest-deep);
}
tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.tag-admin { background: var(--amber-soft); color: #6b4a0f; }
.tag-employee { background: #dde7e1; color: var(--forest-deep); }
.tag-active { background: #e5f0e8; color: #1f4b3f; }
.tag-inactive { background: #f0e2e0; color: #8a3b30; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #7a7460;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-btn.active { color: var(--forest-deep); border-bottom-color: var(--amber); }

.tab-group { position: relative; }
.tab-group-toggle { display: flex; align-items: center; gap: 4px; }
.tab-group-toggle .caret { font-size: 10px; transition: transform .15s; }
.tab-group.open .tab-group-toggle .caret { transform: rotate(180deg); }
.tab-group.has-active .tab-group-toggle { color: var(--forest-deep); border-bottom-color: var(--amber); }
.tab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  min-width: 190px;
  padding: 6px;
  z-index: 60;
}
.tab-group.open .tab-dropdown { display: flex; flex-direction: column; }
.tab-dropdown-item {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding: 10px 12px !important;
  border-radius: 6px;
  text-align: right;
  color: var(--ink) !important;
}
.tab-dropdown-item:hover { background: var(--paper-2); }
.tab-dropdown-item.active { background: var(--paper-2); color: var(--forest-deep) !important; font-weight: 800; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--forest-deep) 0%, var(--forest) 55%, var(--forest-mid) 100%);
  padding: 20px;
}
.login-card {
  background: #fffdf7;
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card .brand-logo {
  height: 56px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}
.topbar .brand img.topbar-logo {
  height: 26px;
  width: auto;
  border-radius: 4px;
  background: #fff;
  padding: 2px 4px;
}
/* ---------- تنظیمات ظاهری ---------- */
.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.theme-swatch {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 10px;
  width: 108px;
  text-align: center;
  background: var(--paper-2);
  transition: border-color .15s;
}
.theme-swatch:hover { border-color: var(--line); }
.theme-swatch.active { border-color: var(--forest); }
.theme-swatch .swatch-preview {
  height: 40px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  overflow: hidden;
}
.theme-swatch .swatch-preview span { flex: 1; }
.theme-swatch .swatch-name { font-size: 12px; font-weight: 600; }
.theme-swatch .swatch-check { font-size: 11px; color: var(--forest); margin-top: 2px; min-height: 14px; }
.settings-logo-preview {
  height: 64px;
  width: auto;
  max-width: 220px;
  border-radius: 6px;
  background: #fff;
  padding: 4px 8px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 12px;
  object-fit: contain;
}
.login-card h1 {
  font-size: 19px;
  margin: 0 0 6px;
  color: var(--forest-deep);
}
.login-card p.sub {
  font-size: 13px;
  color: #7a7460;
  margin: 0 0 24px;
}
.login-card .btn { width: 100%; margin-top: 6px; }

.hint {
  font-size: 12px;
  color: #948e77;
  margin-top: 18px;
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 30px 10px;
  color: #948e77;
  font-size: 13px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 25, 18, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: #fffdf7;
  border-radius: 14px;
  padding: 28px 26px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-card h3 {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 800;
  color: var(--forest-deep);
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 18px;
}

.date-display {
  cursor: pointer;
  background: #fff;
}

.date-clear-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--forest-mid);
  cursor: pointer;
  text-decoration: underline;
}
.date-clear-link:hover { color: var(--forest-deep); }

.company-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.company-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--paper-2);
  font-weight: 600;
}
.company-group-header:hover { background: var(--amber-soft); }
.company-group-header .cg-name { display: flex; align-items: center; gap: 8px; }
.company-group-header .cg-arrow { font-size: 12px; color: var(--forest-deep); }
.company-group-body { padding: 10px 14px 14px; }

.combobox-wrap { position: relative; }
.combobox-list {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 20;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.combobox-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.combobox-item:last-child { border-bottom: none; }
.combobox-item:hover { background: var(--paper-2); }
.combobox-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #948e77;
}

.date-picker-card {
  background: #fffdf7;
  border-radius: 14px;
  padding: 18px 18px 16px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dp-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--forest-deep);
}
.dp-nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest-deep);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dp-nav:hover { background: var(--paper-2); }
.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: #948e77;
  font-weight: 700;
  margin-bottom: 6px;
}
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.dp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.dp-day:hover { background: var(--paper-2); }
.dp-day.dp-today { border: 1px solid var(--forest); font-weight: 700; }
.dp-day.dp-selected { background: var(--forest); color: #fff; font-weight: 700; }
.dp-day.dp-empty { cursor: default; }
.dp-day.dp-empty:hover { background: none; }
.dp-title { cursor: pointer; }
.dp-title:hover { text-decoration: underline; }
.dp-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.dp-months.hidden { display: none; }
.dp-days.hidden, .dp-weekdays.hidden { display: none; }
.dp-month-cell {
  padding: 12px 6px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.dp-month-cell:hover { background: var(--paper-2); }
.dp-month-cell.dp-selected { background: var(--forest); color: #fff; font-weight: 700; }
.dp-today-btn {
  width: 100%;
  margin-top: 14px;
}

.excel-dropdown-wrap {
  position: relative;
}
.excel-caret {
  font-size: 11px;
  margin-right: 4px;
}
.excel-menu {
  position: fixed;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  min-width: 240px;
  max-width: 90vw;
  z-index: 500;
  overflow: hidden;
}
.excel-menu.hidden { display: none; }
.excel-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.excel-menu-item:last-child { border-bottom: none; }
.excel-menu-item:hover { background: var(--paper-2); }

.col-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.col-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  background: #fff;
  user-select: none;
}
.col-check-item:hover { background: var(--paper-2); }
.col-check-item input { margin: 0; cursor: pointer; }

@media (max-width: 700px) {
  html, body { overflow-x: hidden; }

  .topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 6px;
  }
  .topbar .brand {
    font-size: 14px;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .topbar .brand .dot { display: none; }
  .topbar .brand img.topbar-logo { height: 20px; }
  .topbar .user-info {
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .topbar .user-info span.only-desktop {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }
  .topbar button.link { padding: 5px 10px; font-size: 12px; }

  .container { padding: 16px 12px 40px; }

  .page-title { font-size: 18px; }
  .page-sub { font-size: 12.5px; }

  .card { padding: 14px; margin-bottom: 14px; }
  .card h3 { font-size: 14px; }

  .tabs { margin-bottom: 16px; }
  .tab-btn { padding: 9px 13px; font-size: 13px; }

  .row { gap: 8px; }
  .row > * { min-width: 100%; }

  .food-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .food-option { padding: 11px; }

  table { min-width: 460px; font-size: 12px; }
  th, td { padding: 7px 8px; white-space: nowrap; }

  .btn { padding: 9px 16px; font-size: 13px; }
  .btn-sm { padding: 6px 10px; font-size: 11.5px; }

  td div[style*="display:flex"],
  td[style*="display:flex"] { flex-wrap: wrap; }

  .modal-overlay { padding: 12px; }
  .modal-card, .date-picker-card, .confirm-order-card { padding: 18px 16px; max-width: 100%; }
  .login-card { padding: 26px 20px; }

  .month-nav { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .month-nav-title { min-width: 90px; font-size: 14px; }

  .dash-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-stat-card { padding: 12px; }
  .dash-stat-value { font-size: 15px; }

  .dash-day-controls { flex-wrap: wrap; }
  .dash-day-pill { flex-basis: 100%; order: 3; }

  .excel-menu { min-width: 200px; }

  .countdown-banner { font-size: 12px; padding: 7px 12px; flex-wrap: wrap; }

  .dp-day { font-size: 12px; }
  .dp-month-cell { padding: 10px 4px; font-size: 12px; }

  .menu-food-chips, .fb-tabs { gap: 6px; }
  .menu-chip { padding: 5px 11px; font-size: 11px; }
}

@media (max-width: 400px) {
  .dash-stats { grid-template-columns: 1fr; }
  table { min-width: 420px; }
}
