/* ======================================================
   Poco Picante — FSQA Portal
   Design: warm paprika + charcoal, modern flat-glass UI
====================================================== */

:root {
  --c-bg: #faf7f3;
  --c-bg-alt: #f3ede5;
  --c-surface: #ffffff;
  --c-border: #e5ded3;
  --c-ink: #1f1a17;
  --c-ink-soft: #5b504a;
  --c-ink-mute: #8a7f77;
  --c-brand: #c8341f;       /* paprika red */
  --c-brand-deep: #a32512;
  --c-accent: #e89822;      /* warm amber */
  --c-accent-deep: #b87414;
  --c-green: #3c8a3f;
  --c-green-soft: #e7f4e7;
  --c-red: #c8341f;
  --c-red-soft: #fce7e3;
  --c-amber: #b87414;
  --c-amber-soft: #fcefd8;
  --c-blue: #2d6cdf;
  --c-blue-soft: #e5edfb;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31,26,23,.04), 0 1px 3px rgba(31,26,23,.06);
  --shadow-md: 0 4px 12px rgba(31,26,23,.08), 0 2px 4px rgba(31,26,23,.04);
  --shadow-lg: 0 12px 32px rgba(31,26,23,.12), 0 4px 8px rgba(31,26,23,.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
#app {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ===== Sidebar ===== */
#sidebar {
  background: linear-gradient(180deg, #1f1a17 0%, #2a221e 100%);
  color: #efe7dc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-accent) 100%);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 2px 6px rgba(200,52,31,0.4);
}
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }
.brand-sub { font-size: 11px; color: #b9ab9c; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }

#nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px 20px;
}
.nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #8a7d70;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #d8cec1;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(200,52,31,0.25), rgba(200,52,31,0.08));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--c-brand);
}
.nav-ic { font-size: 15px; width: 18px; text-align: center; }

.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: #8a7d70;
}
.foot-label { color: #b9ab9c; font-weight: 600; }
.foot-sub { margin-top: 2px; }

/* ===== Main / Top bar ===== */
#main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-bg);
}

#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  min-height: 56px;
}
.crumbs { font-size: 13px; color: var(--c-ink-soft); }
.crumbs #crumb-current { color: var(--c-ink); font-weight: 600; }
.crumb-sep { margin: 0 8px; color: var(--c-ink-mute); }

.topbar-actions { display: flex; gap: 8px; align-items: center; }
.clock {
  font-size: 12px;
  color: var(--c-ink-mute);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}

/* ===== View area ===== */
#view {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: var(--c-ink);
}
.btn:hover { background: var(--c-bg-alt); }
.btn-primary {
  background: var(--c-brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(200,52,31,0.3);
}
.btn-primary:hover { background: var(--c-brand-deep); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-ink-soft);
}
.btn-ghost:hover { background: var(--c-bg-alt); color: var(--c-ink); }
.btn-danger {
  background: transparent;
  color: var(--c-red);
  border: 1px solid var(--c-border);
}
.btn-danger:hover { background: var(--c-red-soft); border-color: var(--c-red); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ===== Page header ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--c-ink-soft); font-size: 13px; margin-top: 4px; max-width: 600px; }
.doc-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff4e6;
  color: #b06000;
  border: 1px solid #f0c98a;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
}
.doc-link:hover { background: #ffe4b8; border-color: #e0a840; text-decoration: none; }

/* ===== Dashboard tiles ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.tile {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-brand);
  text-decoration: none;
}
.tile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tile-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--c-bg-alt);
  display: grid; place-items: center;
  font-size: 18px;
}
.tile-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-brand);
  line-height: 1;
}
.tile-title { font-weight: 600; font-size: 14px; margin-top: auto; }
.tile-sub { font-size: 12px; color: var(--c-ink-mute); }

/* ===== KPI strip ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--c-ink-mute); text-transform: uppercase; letter-spacing: 0.6px; }
.kpi-value { font-size: 24px; font-weight: 700; margin-top: 4px; line-height: 1.1; }
.kpi-delta { font-size: 11px; color: var(--c-ink-mute); margin-top: 2px; }
.kpi.ok   .kpi-value { color: var(--c-green); }
.kpi.warn .kpi-value { color: var(--c-amber); }
.kpi.bad  .kpi-value { color: var(--c-red); }
.kpi-clickable {
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.08s;
  user-select: none;
}
.kpi-clickable:hover {
  border-color: var(--c-accent, #c4322b);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.kpi-clickable:active { transform: translateY(1px); }
.kpi-clickable.kpi-active {
  border-color: var(--c-accent, #c4322b);
  background: rgba(196, 50, 43, 0.06);
  box-shadow: inset 0 0 0 1px var(--c-accent, #c4322b);
}
.kpi-clickable.kpi-active .kpi-label { color: var(--c-accent, #c4322b); }

/* ===== Cleaning check table ===== */
.cleaning-check-table tbody tr { border-bottom: 1px solid var(--c-border); }
.cleaning-check-table tbody tr.cleaning-row-fail {
  background: rgba(196, 50, 43, 0.04);
}
.cleaning-check-table tbody tr.cleaning-row-fail td {
  font-weight: 500;
}

/* ===== Panels & tables ===== */
.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel-title { font-size: 15px; font-weight: 600; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
}
.table th {
  background: var(--c-bg-alt);
  font-weight: 600;
  font-size: 12px;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.table tbody tr:hover { background: var(--c-bg-alt); }
.table td.actions { text-align: right; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-ink-mute);
}
.empty-state .empty-icon { font-size: 44px; margin-bottom: 8px; }

/* ===== Status pills ===== */
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.pill.ok    { background: var(--c-green-soft); color: var(--c-green); }
.pill.warn  { background: var(--c-amber-soft); color: var(--c-amber); }
.pill.bad   { background: var(--c-red-soft); color: var(--c-red); }
.pill.info  { background: var(--c-blue-soft); color: var(--c-blue); }
.pill.neutral { background: var(--c-bg-alt); color: var(--c-ink-soft); }

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-ink-soft);
}
.field input,
.field select,
.field textarea {
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  background: var(--c-surface);
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(200,52,31,0.12);
}
.field textarea { min-height: 80px; resize: vertical; font-family: inherit; }
.field .hint { font-size: 11px; color: var(--c-ink-mute); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(31,26,23,0.5);
  display: grid; place-items: center;
  z-index: 100;
  animation: fade 0.15s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(720px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--c-ink-mute);
  width: 30px; height: 30px; border-radius: 6px;
}
.modal-close:hover { background: var(--c-bg-alt); color: var(--c-ink); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--c-bg-alt);
}

/* ===== Activity feed ===== */
.activity {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.activity:last-child { border-bottom: none; }
.activity-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-bg-alt);
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.activity-body { flex: 1; }
.activity-title { font-weight: 500; }
.activity-meta { font-size: 11px; color: var(--c-ink-mute); margin-top: 2px; }

/* ===== Filter/toolbar ===== */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar input[type="search"],
.toolbar select {
  padding: 7px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--c-surface);
}
.toolbar input[type="search"] { min-width: 220px; }
.toolbar .spacer { flex: 1; }

/* ===== Misc ===== */
.muted { color: var(--c-ink-mute); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.tag-ref { font-family: var(--font-mono); font-size: 11px; color: var(--c-ink-mute); }
hr.sep { border: none; border-top: 1px solid var(--c-border); margin: 20px 0; }

.callout {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--c-blue-soft);
  color: #1e4aa5;
  border-left: 3px solid var(--c-blue);
  margin: 14px 0;
}
.callout.warn { background: var(--c-amber-soft); color: #7a4a0f; border-left-color: var(--c-amber); }

/* ===== Print ===== */
@media print {
  #sidebar, #topbar, .form-actions, .btn, .toolbar, .page-header .btn { display: none !important; }
  #app { display: block; }
  #main { overflow: visible; }
  #view { padding: 0; overflow: visible; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ===== Scrollbar polish (webkit) ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d5cdc2; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b8ae9f; }
#sidebar ::-webkit-scrollbar-thumb { background: #3a302a; }

/* ==========================================================
   Toast notifications (success / error / info)
========================================================== */
#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--c-ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  max-width: 380px;
  font-size: 14px;
  pointer-events: auto;
  animation: toastSlide 0.25s ease-out;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-body { flex: 1; line-height: 1.4; }
.toast-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--c-accent);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.toast.success { background: #1e4d1f; }
.toast.error   { background: var(--c-brand-deep); }
.toast.warn    { background: var(--c-amber-soft); color: var(--c-ink); border-left: 4px solid var(--c-amber); }
.toast.warn .toast-link { color: var(--c-amber-deep); }
@keyframes toastSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Import preview table inside modal */
.import-preview {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.import-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.import-preview th, .import-preview td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.import-preview thead th {
  background: var(--c-bg-alt);
  position: sticky; top: 0;
  font-weight: 600;
}
.import-preview .skipped { background: #fef4ec; color: var(--c-ink-mute); }
.import-summary { font-size: 13px; color: var(--c-ink-soft); margin: 8px 0 12px; }

/* Date filter inputs inside the records toolbar */
.toolbar .toolbar-date {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: 13px;
  min-width: 138px;
}
.toolbar .toolbar-label {
  font-size: 12px;
  color: var(--c-ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-left: 6px;
}
.toolbar .btn.btn-sm { padding: 4px 8px; font-size: 12px; }

/* Row grouping — records that share a composite key (e.g. same customer + same date)
   are clustered visually. The first row of a multi-row group is marked as head; the
   remaining rows are children with muted styling and blanked-out repeat cells. */
tr.row-group-head > td {
  border-top: 2px solid var(--c-accent);
}
tr.row-group-child > td {
  background: var(--c-bg-alt);
  color: var(--c-ink-soft);
  border-top: 1px dashed var(--c-border);
}
tr.row-group-child > td:first-child {
  box-shadow: inset 3px 0 0 var(--c-accent);
}
td.cell-group-repeat {
  color: var(--c-ink-mute);
  font-style: italic;
  opacity: 0.45;
}
td.cell-group-repeat::before {
  content: '↳';
  opacity: 0.5;
}

/* ==========================================================
   MOBILE / TABLET RESPONSIVE (added Phase 1)
   Breakpoints: 900px (tablet), 640px (phone)
========================================================== */

/* Hamburger button — hidden on desktop, shown on mobile */
#mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  margin-right: 8px;
  color: var(--c-ink);
  line-height: 1;
}

@media (max-width: 900px) {
  /* Sidebar becomes an off-canvas drawer */
  #app {
    grid-template-columns: 1fr;
  }
  #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    max-width: 85vw;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  body.sidebar-open #sidebar { transform: translateX(0); }

  /* Backdrop when drawer is open */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
  }

  /* Show hamburger, hide desktop-only topbar buttons on very narrow screens */
  #mobile-menu-btn { display: inline-block; }
  #topbar { padding: 10px 14px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn { padding: 6px 10px; font-size: 12px; }
  .clock { display: none; }

  /* Main content — full width, comfortable padding */
  #main { overflow-x: hidden; }
  #view { padding: 16px 14px 40px; }

  /* Page header — stack title and buttons vertically */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-header h1 { font-size: 20px; line-height: 1.2; }
  .page-header .btn { padding: 8px 14px; font-size: 13px; }

  /* KPI row — 2 across on tablet */
  .kpi-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .kpi-value { font-size: 22px !important; }
  .kpi-label { font-size: 10.5px !important; }

  /* Panels — less padding */
  .panel { padding: 14px 16px; margin-top: 12px; }

  /* Forms — inputs full width, one column */
  .form-grid, .form-group-2col, .form-group-3col {
    grid-template-columns: 1fr !important;
  }
  input, select, textarea { font-size: 16px !important; /* prevents iOS zoom on focus */ }

  /* Tables — horizontal scroll instead of overflow */
  .panel table, table.data-table, #view table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .panel table th, .panel table td,
  #view table th, #view table td {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  /* Tile grids (module cards) — 2 across */
  .tile-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .tile { padding: 14px; }
  .tile-count { font-size: 22px; }
  .tile-title { font-size: 13px; }

  /* Fact grids — single column on mobile so labels don't wrap awkwardly */
  [style*="grid-template-columns:repeat(auto-fit,minmax(220px,1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* Cloud user bar — smaller, still visible */
  .cb-user-bar { top: 8px; right: 8px; padding: 5px 10px; font-size: 11px; }
}

/* Phone (narrower than 640px) — tighten further */
@media (max-width: 640px) {
  .kpi-row { grid-template-columns: 1fr 1fr !important; }
  .kpi { padding: 10px 12px; }
  .kpi-value { font-size: 20px !important; }
  .tile-grid { grid-template-columns: 1fr !important; }
  .toolbar { flex-wrap: wrap; gap: 6px; }
  .toolbar input, .toolbar select { min-width: 0; flex: 1; }

  #topbar .crumbs { font-size: 12px; }
  #topbar #crumb-root { display: none; } /* just show current page */
  #topbar .crumb-sep { display: none; }

  /* Hide Export/Import/Print in topbar on very narrow — accessible via Settings */
  #btn-export, #btn-import, #btn-print { display: none; }
}

/* iPad landscape — treat like tablet, hamburger nav */
@media (max-width: 1024px) and (min-width: 641px) and (orientation: landscape) {
  /* Same drawer behavior; already covered by 900px rules */
}

/* Larger tap targets everywhere on touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; padding: 10px 16px; }
  .nav-item { padding: 12px 12px; font-size: 14px; }
  .tile { min-height: 88px; }
  input[type="checkbox"], input[type="radio"] { transform: scale(1.2); }
}
