:root {
  --bg: #F5F7FA;
  --sidebar: #EEF1F6;
  --surface: #FFFFFF;
  --primary: #2563EB;
  --success: #22C55E;
  --danger: #EF4444;
  --text: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 4px 16px rgba(17, 24, 39, 0.04);
  --radius: 14px;
  --space: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
  flex-shrink: 0;
}

.brand-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: #60A5FA;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover { background: rgba(255,255,255,.55); color: var(--text); }
.nav a.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sidebar-cta {
  margin-top: auto;
}

.main {
  padding: 24px 28px 40px;
  min-width: 0;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.header-actions .search-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.header-actions .search-toolbar input[type="search"],
.header-actions .search-toolbar input[type="date"],
.header-actions .search-toolbar input[type="text"] {
  width: 220px;
  min-width: 160px;
}

.header-actions > .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card + .card { margin-top: 16px; }

.grid-4,
.grid-2 {
  align-items: stretch;
}

.grid-4 > .card,
.grid-2 > .card {
  margin-top: 0;
  height: 100%;
  min-height: 0;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.grid-2 > .card {
  display: flex;
  flex-direction: column;
}

.grid-2 > .card .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.grid-2 > .card .card-body .bar-list,
.grid-2 > .card .card-body .chart-wrap {
  flex: 1 1 auto;
}

.grid-2 > .card .card-foot {
  margin-top: auto;
  padding-top: 16px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}

.kpi-icon svg {
  width: 20px;
  height: 20px;
}

.kpi-icon-blue { background: #2563EB; }
.kpi-icon-sky { background: #0EA5E9; }
.kpi-icon-amber { background: #F59E0B; }
.kpi-icon-green { background: #22C55E; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chart-wrap { width: 100%; }

.area-chart {
  width: 100%;
  height: 180px;
  display: block;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background: #EEF2FF;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.zone-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zone-mini {
  --zone-color: #2563EB;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--zone-color);
  color: var(--zone-color);
  font-weight: 700;
  font-size: 12px;
}

.status-tickets {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.status-ticket {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.status-ticket input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-ticket-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #F3F4F6;
  color: var(--muted);
  flex-shrink: 0;
}

.status-ticket-icon svg {
  width: 20px;
  height: 20px;
}

.status-ticket-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.status-ticket-body strong {
  font-size: 15px;
}

.status-ticket-body small {
  color: var(--muted);
  font-size: 12px;
}

.status-ticket-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  flex-shrink: 0;
  position: relative;
}

.status-ticket-deliver.is-on {
  border-color: #22C55E;
  background: #ECFDF5;
}

.status-ticket-deliver.is-on .status-ticket-icon {
  background: #22C55E;
  color: #fff;
}

.status-ticket-paid.is-on {
  border-color: #2563EB;
  background: #EFF6FF;
}

.status-ticket-paid.is-on .status-ticket-icon {
  background: #2563EB;
  color: #fff;
}

.status-ticket.is-on .status-ticket-check {
  border-color: currentColor;
  background: #fff;
}

.status-ticket-deliver.is-on .status-ticket-check { color: #22C55E; }
.status-ticket-paid.is-on .status-ticket-check { color: #2563EB; }

.status-ticket.is-on .status-ticket-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.status-ticket-save {
  align-self: center;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover { text-decoration: none; filter: brightness(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #E8EEF9; color: var(--primary); }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-success { background: #DCFCE7; color: #166534; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

table.data th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
table.data tr:hover td { background: #F9FAFB; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.form-grid-start {
  align-items: start;
}

.form-grid .full { grid-column: 1 / -1; }
.form-grid > div { min-width: 0; width: 100%; }

.form-grid > div > label {
  display: block;
  margin-bottom: 6px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
}

.form-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  min-height: 42px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(37, 99, 235, .25);
  border-color: var(--primary);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.checkbox input { width: auto; }

.toggle-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

label.toggle-chip,
.toggle-chip {
  --toggle-color: #2563EB;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  margin-bottom: 0;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  flex: 1 1 220px;
  max-width: 320px;
  width: auto;
  box-sizing: border-box;
}

.toggle-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-chip-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #E5E7EB;
  position: relative;
  flex-shrink: 0;
  transition: background .15s ease;
}

.toggle-chip-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
  transition: transform .15s ease;
}

.toggle-chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toggle-chip-text strong {
  font-size: 14px;
  color: var(--text);
}

.toggle-chip-text small {
  font-size: 12px;
  color: var(--muted);
}

.toggle-chip-active { --toggle-color: #22C55E; }
.toggle-chip-deliver { --toggle-color: #22C55E; }
.toggle-chip-paid { --toggle-color: #2563EB; }

.toggle-chip.is-on,
.toggle-chip:has(input:checked) {
  border-color: var(--toggle-color);
  background: #F8FAFC;
}

.toggle-chip-active.is-on,
.toggle-chip-active:has(input:checked),
.toggle-chip-deliver.is-on,
.toggle-chip-deliver:has(input:checked) {
  background: #ECFDF5;
}

.toggle-chip-paid.is-on,
.toggle-chip-paid:has(input:checked) {
  background: #EFF6FF;
}

.toggle-chip.is-on .toggle-chip-switch,
.toggle-chip:has(input:checked) .toggle-chip-switch {
  background: var(--toggle-color);
}

.toggle-chip.is-on .toggle-chip-switch::after,
.toggle-chip:has(input:checked) .toggle-chip-switch::after {
  transform: translateX(18px);
}

.toggle-chip.is-on .toggle-chip-text strong,
.toggle-chip:has(input:checked) .toggle-chip-text strong {
  color: var(--toggle-color);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.alert-error {
  background: #FEF2F2;
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-success {
  background: #ECFDF5;
  color: #166534;
  border-left: 4px solid var(--success);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill-ok { background: #DCFCE7; color: #166534; }
.pill-warn { background: #FEE2E2; color: #991B1B; }
.pill-amber { background: #FEF3C7; color: #92400E; }
.pill-muted { background: #F3F4F6; color: var(--muted); }
.pill-blue { background: #DBEAFE; color: #1D4ED8; }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: #bfdbfe;
  color: var(--primary);
  text-decoration: none;
}

.filter-chip.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.field-hint.is-error {
  color: var(--danger);
  font-weight: 600;
}

.line-stock-out,
.line-stock-over {
  background: #FEF2F2;
}

.line-stock-low:not(.line-stock-over):not(.line-stock-out) {
  background: #FFFBEB;
}

.stock-alert-card .card-title {
  color: #92400E;
}

.zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.12), transparent 40%),
    radial-gradient(circle at bottom left, rgba(14,165,233,.10), transparent 35%),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.login-card p { margin: 0 0 24px; color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 14px; }

.route-list { display: flex; flex-direction: column; gap: 12px; }

.route-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-card h3 {
  margin: 0;
  font-size: 16px;
}

.route-meta { color: var(--muted); font-size: 13px; }

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-box { position: relative; }

.search-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-height: 240px;
  overflow: auto;
  display: none;
}

.search-results.open { display: block; }

.search-results button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  border-bottom: 1px solid var(--border);
}

.search-results button:hover { background: #F9FAFB; }

.line-items td input[type="number"] {
  width: 64px;
  padding: 8px;
  text-align: center;
  -moz-appearance: textfield;
}

.line-items td input[type="number"]::-webkit-outer-spin-button,
.line-items td input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F3F4F6;
  border-radius: 12px;
  padding: 4px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.qty-btn:active { background: #DBEAFE; }

.qty-stepper .qty-input {
  width: 64px;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 4px;
}

.discount-input-line {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 16px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-topbar-user {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-topbar-brand .brand-name { font-size: 16px; }
.mobile-topbar-brand .brand-sub { font-size: 9px; }

.schedule-days {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.schedule-day-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text);
}

.zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.zone-chip {
  --zone-color: #2563EB;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  border: 2px solid var(--zone-color);
  background: #fff;
  color: var(--zone-color);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.zone-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.zone-chip-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
  position: relative;
}

.zone-chip.is-selected,
.zone-chip:has(input:checked) {
  background: var(--zone-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.zone-chip.is-selected .zone-chip-check,
.zone-chip:has(input:checked) .zone-chip-check {
  border-color: #fff;
  background: rgba(255,255,255,.2);
}

.zone-chip.is-selected .zone-chip-check::after,
.zone-chip:has(input:checked) .zone-chip-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -6px 20px rgba(17, 24, 39, 0.10);
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  justify-content: space-around;
  gap: 2px;
}

.mobile-nav a,
.mobile-nav-more-btn {
  color: #374151;
  font-size: 12px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 8px 4px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.mobile-nav-label { line-height: 1.1; }

.mobile-nav a.is-active,
.mobile-nav-more-btn.is-active,
.mobile-nav-more-btn[aria-expanded="true"] {
  color: #fff;
  background: var(--primary);
}

.mobile-more-backdrop {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(17, 24, 39, 0.4);
  z-index: 70;
}

.mobile-more-panel {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 90px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.18);
  padding: 12px;
  z-index: 71;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.mobile-more-backdrop.is-open,
.mobile-more-panel.is-open,
body.mobile-more-open .mobile-more-backdrop,
body.mobile-more-open .mobile-more-panel {
  display: block !important;
}

.mobile-more-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 8px;
  padding: 0 8px;
}

.mobile-more-panel a {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.mobile-more-panel a.is-active,
.mobile-more-panel a:hover {
  background: #E8EEF9;
  color: var(--primary);
}

.muted { color: var(--muted); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }
.actions-inline { display: flex; flex-wrap: wrap; gap: 8px; }

.app-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.app-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.app-footer a:hover { text-decoration: underline; }

.login-footer {
  margin-top: 20px;
  border-top: 0;
  padding-top: 0;
}

.totals-box {
  max-width: 360px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.totals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.totals-final {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.discount-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discount-input input {
  width: 88px;
  text-align: right;
}

.discount-input span {
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 16px 16px 96px; }
  .grid-4, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .mobile-topbar { display: flex; }
  .mobile-nav { display: flex; }
  .page-header h1 { font-size: 22px; }
  .page-header { align-items: flex-start; }
  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .header-actions .search-toolbar {
    width: 100%;
    flex-wrap: wrap;
  }
  .header-actions .search-toolbar input[type="search"],
  .header-actions .search-toolbar input[type="date"],
  .header-actions .search-toolbar input[type="text"] {
    width: 100%;
    min-width: 0;
    flex: 1 1 160px;
  }
  .header-actions > .btn {
    width: 100%;
  }
  .grid-2 > .card .card-body {
    min-height: 0;
  }

  .line-items .qty-btn {
    width: 44px;
    height: 44px;
  }

  .status-tickets {
    grid-template-columns: 1fr;
  }

  .status-ticket-save {
    width: 100%;
  }

  .kpi-value { font-size: 24px; }
  .area-chart { height: 160px; }
}
