@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy:       #0f1c2e;
  --navy-mid:   #1a2d45;
  --navy-light: #243b57;
  --teal:       #00c4a1;
  --teal-dim:   #00a085;
  --gold:       #f5a623;
  --red:        #e8445a;
  --green:      #27c97a;
  --blue:       #3b8df1;
  --surface:    #f4f6fa;
  --surface2:   #eaedf4;
  --border:     #dde2ee;
  --text:       #1a2035;
  --text-mid:   #4a5573;
  --text-dim:   #8892a4;
  --white:      #ffffff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.13);
  --radius:     10px;
  --radius-sm:  6px;
  --sidebar-w:  240px;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── LAYOUT ─────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--teal);
}
.sidebar-brand span {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  display: block;
  margin-top: 2px;
  letter-spacing: .04em;
}

.sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }

.nav-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 1rem 1.25rem .4rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  border-radius: 0;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-link.active {
  color: var(--teal);
  background: rgba(0,196,161,.1);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--teal);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
}
.sidebar-user { color: rgba(255,255,255,.7); margin-bottom: .5rem; }
.sidebar-user strong { display: block; color: var(--white); font-weight: 600; }
.sidebar-user span {
  font-size: .72rem;
  background: rgba(0,196,161,.18);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 99px;
  margin-top: 2px;
  display: inline-block;
  text-transform: capitalize;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.topbar-actions { display: flex; gap: .5rem; align-items: center; }

.page-body { padding: 2rem; flex: 1; }

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-title { font-size: .95rem; font-weight: 600; color: var(--text); }
.card-body { padding: 1.4rem; }

/* ── STAT CARDS ──────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.teal   { background: rgba(0,196,161,.12); color: var(--teal); }
.stat-icon.gold   { background: rgba(245,166,35,.12); color: var(--gold); }
.stat-icon.red    { background: rgba(232,68,90,.12);  color: var(--red); }
.stat-icon.blue   { background: rgba(59,141,241,.12); color: var(--blue); }
.stat-icon.green  { background: rgba(39,201,122,.12); color: var(--green); }
.stat-number { font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--text); font-family: 'DM Mono', monospace; }
.stat-label  { font-size: .78rem; color: var(--text-dim); margin-top: 3px; }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s ease;
  line-height: 1.4;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary  { background: var(--teal);    color: var(--white); border-color: var(--teal); }
.btn-primary:hover  { background: var(--teal-dim); border-color: var(--teal-dim); }
.btn-danger   { background: var(--red);     color: var(--white); border-color: var(--red); }
.btn-danger:hover   { opacity: .88; }
.btn-outline  { background: transparent;    color: var(--text);  border-color: var(--border); }
.btn-outline:hover  { border-color: var(--text-mid); background: var(--surface); }
.btn-ghost    { background: transparent;    color: var(--text-mid); border-color: transparent; }
.btn-ghost:hover    { background: var(--surface); }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }
.btn-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-gold:hover { opacity: .88; }
.btn-blue { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-blue:hover { opacity: .88; }

/* ── FORMS ───────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.span-2 { grid-column: span 2; }

.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-mid); }
.form-label.required::after { content: ' *'; color: var(--red); }

.form-control {
  padding: .55rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,196,161,.15);
}
.form-control::placeholder { color: var(--text-dim); }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint { font-size: .75rem; color: var(--text-dim); }
.form-actions { display: flex; gap: .75rem; align-items: center; margin-top: .5rem; }

/* ── TABLE ───────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(0,196,161,.03); }
.td-actions { display: flex; gap: .4rem; align-items: center; }

/* ── BADGES ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border-radius: 99px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-applied       { background: rgba(59,141,241,.12);  color: var(--blue);  }
.badge-interview_hr  { background: rgba(245,166,35,.12);  color: var(--gold);  }
.badge-interview_bod { background: rgba(245,166,35,.18);  color: #d48b10;      }
.badge-medical       { background: rgba(139,88,198,.12);  color: #8b58c6;      }
.badge-recruited     { background: rgba(39,201,122,.13);  color: #1aaa5e;      }
.badge-rejected      { background: rgba(232,68,90,.12);   color: var(--red);   }
.badge-permanent     { background: rgba(39,201,122,.13);  color: #1aaa5e;      }
.badge-contract      { background: rgba(245,166,35,.12);  color: var(--gold);  }
.badge-probation     { background: rgba(59,141,241,.12);  color: var(--blue);  }

/* ── ALERTS ──────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1.2rem;
  border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(39,201,122,.1);  border-color: rgba(39,201,122,.3);  color: #1a7a46; }
.alert-danger  { background: rgba(232,68,90,.09);  border-color: rgba(232,68,90,.3);   color: #b03046; }
.alert-warning { background: rgba(245,166,35,.1);  border-color: rgba(245,166,35,.35); color: #8a5a00; }
.alert-info    { background: rgba(59,141,241,.09); border-color: rgba(59,141,241,.3);  color: #1a5fb5; }

/* ── TIMELINE ────────────────────────────────── */
.timeline { padding: .5rem 0; }
.timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.4rem;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-dot.recruited  { border-color: var(--green); background: rgba(39,201,122,.1); }
.timeline-dot.rejected   { border-color: var(--red);   background: rgba(232,68,90,.1); }
.timeline-dot.applied    { border-color: var(--blue);  background: rgba(59,141,241,.1); }
.timeline-dot svg { width: 14px; height: 14px; }
.timeline-content { flex: 1; padding-top: .1rem; }
.timeline-stage  { font-weight: 700; font-size: .88rem; color: var(--text); }
.timeline-meta   { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }
.timeline-notes  { margin-top: .4rem; font-size: .85rem; color: var(--text-mid); background: var(--surface); padding: .5rem .75rem; border-radius: var(--radius-sm); }

/* ── FILTERS ─────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
  margin-bottom: 1.4rem;
}
.filter-group { display: flex; flex-direction: column; gap: .3rem; }
.filter-group label { font-size: .75rem; font-weight: 600; color: var(--text-dim); }
.filter-bar .form-control { padding: .4rem .75rem; font-size: .85rem; }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--text-dim); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .35; }
.empty-state p { font-size: .92rem; margin-top: .35rem; }

/* ── LOGIN PAGE ──────────────────────────────── */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-panel-left {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.login-panel-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,196,161,.15) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.login-logo { color: var(--teal); font-size: 1.8rem; font-weight: 800; letter-spacing: .04em; margin-bottom: .5rem; }
.login-tagline { color: rgba(255,255,255,.5); font-size: .9rem; max-width: 340px; line-height: 1.7; }
.login-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  padding-top: max(3rem, env(safe-area-inset-top));
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  background: var(--white);
}
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: .3rem; }
.login-box p { color: var(--text-dim); margin-bottom: 1.8rem; font-size: .9rem; }

/* ── DUPLICATE WARNING ───────────────────────── */
.dup-block {
  border: 1px solid rgba(245,166,35,.4);
  background: rgba(245,166,35,.06);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.dup-block h4 { font-size: .88rem; font-weight: 700; color: #8a5a00; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.dup-list { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.dup-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .84rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
}
.dup-list strong { color: var(--text); }
.dup-match-type {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(245,166,35,.18);
  color: #8a5a00;
}

/* ── DETAIL VIEW ─────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr td { padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; vertical-align: top; }
.info-table tr:last-child td { border-bottom: none; }
.info-table td:first-child { color: var(--text-dim); width: 38%; font-weight: 500; padding-right: 1rem; }
.info-table td:last-child { color: var(--text); font-weight: 600; }

.section-title { font-size: .85rem; font-weight: 700; color: var(--text-mid); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }

/* ── FILE LINK ───────────────────────────────── */
.file-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .83rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.file-link:hover { text-decoration: underline; }
.file-link svg { width: 14px; height: 14px; }

/* ── MISC ────────────────────────────────────── */
.text-muted { color: var(--text-dim); }
.text-sm    { font-size: .82rem; }
.fw-600     { font-weight: 600; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.gap-2 { gap: 1rem; }
.gap-1 { gap: .5rem; }
.ml-auto { margin-left: auto; }

/* ── HAMBURGER TOGGLE ─────────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  z-index: 300;
  width: 48px;
  height: 52px;
  background: var(--navy);
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
}
.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.75);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease, width .22s ease;
  transform-origin: center;
}
.sidebar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SIDEBAR OVERLAY ──────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 149;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
}
.sidebar-overlay.visible { opacity: 1; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {

  /* Sidebar — hidden off-screen, slides in */
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    width: min(280px, 80vw);
  }
  .sidebar.open { transform: translateX(0); }

  /* Main content takes full width */
  .main-content { margin-left: 0; }

  /* Overlay active */
  .sidebar-overlay { display: block; }

  /* Hamburger visible */
  .sidebar-toggle { display: flex; }

  /* Topbar — shift right of hamburger, respect safe area */
  .topbar {
    padding-top: max(.9rem, env(safe-area-inset-top, .9rem));
    padding-left: 56px;
    padding-right: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .topbar-title { font-size: .92rem; }

  /* Page body padding */
  .page-body { padding: 1rem; }

  /* Stats grid: 2 columns on tablet, 1 on small */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
  .stat-card { padding: 1rem; gap: .75rem; }
  .stat-number { font-size: 1.45rem; }

  /* Dashboard grid: stack */
  .dashboard-grid,
  [style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns"] { display: flex !important; flex-direction: column !important; gap: 1rem !important; }

  /* Tables: horizontal scroll inside card */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 540px; }

  /* Detail grid */
  .detail-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* Forms */
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: 1; }
  .form-actions { flex-wrap: wrap; gap: .5rem; }
  .form-actions .btn { flex: 1 1 auto; justify-content: center; min-width: 120px; }

  /* Filter bar */
  .filter-bar { gap: .5rem; }
  .filter-group { flex: 1 1 140px; min-width: 0; }
  .filter-bar .form-control { width: 100%; }

  /* Cards */
  .card-header { padding: .9rem 1rem; flex-wrap: wrap; gap: .5rem; }
  .card-body { padding: 1rem; }
  .card-title { font-size: .88rem; }

  /* Login page */
  .login-page { grid-template-columns: 1fr; }
  .login-panel-left { display: none; }
  .login-panel-right { padding: 2rem 1.25rem; }

  /* Buttons in topbar */
  .topbar-actions .btn-sm { font-size: .78rem; padding: .35rem .75rem; }

  /* Topbar breadcrumb */
  .topbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55vw; }

  /* Dup list on mobile */
  .dup-list li { flex-direction: column; gap: .3rem; }

  /* Timeline */
  .timeline-item { gap: .65rem; }

  /* Info table responsive */
  .info-table td:first-child { width: 42%; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat-card { padding: .75rem; gap: .6rem; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-number { font-size: 1.3rem; }
  .stat-label { font-size: .72rem; }

  .topbar { padding-left: 52px; padding-right: .75rem; }
  .page-body { padding: .75rem .75rem; }

  .card-header { padding: .75rem .9rem; }
  .card-body { padding: .9rem; }

  .btn { font-size: .82rem; }
  .btn-sm { font-size: .75rem; padding: .3rem .65rem; }

  /* Stack topbar actions on very small screens */
  .topbar-actions { gap: .35rem; }

  /* Badges wrap on mobile */
  .badge { font-size: .68rem; padding: .18rem .5rem; }

  /* Tables full-width scroll */
  table { min-width: 460px; }
  thead th { padding: .6rem .75rem; font-size: .7rem; }
  tbody td { padding: .65rem .75rem; }

  /* Form layout */
  .form-label { font-size: .82rem; }
  .form-control { font-size: .88rem; }
  .form-hint { font-size: .72rem; }

  /* Login box */
  .login-box h2 { font-size: 1.25rem; }
  .login-box p { font-size: .85rem; }

  /* Info table stack on tiny screens */
  .info-table tr { display: flex; flex-direction: column; padding: .4rem 0; border-bottom: 1px solid var(--border); }
  .info-table tr:last-child { border-bottom: none; }
  .info-table tr td { border-bottom: none; padding: .15rem 0; width: 100%; }
  .info-table td:first-child { font-size: .75rem; padding-right: 0; }

  /* Duplicate list */
  .dup-block { padding: .9rem; }

  /* Empty state */
  .empty-state { padding: 2rem .75rem; }
}

/* ── SAFE AREA (iPhone notch/home bar) ────────── */
@supports (padding: env(safe-area-inset-top)) {
  .sidebar {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  @media (max-width: 900px) {
    .topbar {
      padding-top: max(.9rem, env(safe-area-inset-top));
    }
    .page-body {
      padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
  }
}
