.app-shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: flex; align-items: center; gap: 36px; min-height: 78px; padding: 12px 32px; border-bottom: 1px solid var(--accent-hover); background: var(--accent); color: var(--panel); box-shadow: 0 3px 14px #173e2920; }
.brand { flex: 0 0 auto; font-size: 24px; font-weight: 700; letter-spacing: -.8px; }
.sidebar nav { display: flex; align-items: center; gap: 6px; }
.sidebar .nav { justify-content: center; width: auto; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; color: #e4ebe5; font-size: 14px; font-weight: 500; white-space: nowrap; }
.sidebar .nav:hover { color: #fff; border-color: #ffffff60; }
.sidebar .nav.active { background: var(--panel); color: var(--accent); border-color: var(--panel); font-weight: 600; box-shadow: 0 2px 6px #142d1e26; }
.sidebar-bottom { display: flex; align-items: center; gap: 18px; margin-left: auto; min-width: 0; }
.signed-in-user { min-width: 0; }
.signed-in-user strong { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.signed-in-user .muted { margin: 3px 0 0; color: #dae5db; font-size: 11px; }
.sidebar-bottom .secondary { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.content { min-width: 0; width: 100%; max-width: 1660px; margin: 0 auto; padding: 30px 32px 42px; }
.topbar { display: flex; align-items: baseline; gap: 18px; margin-bottom: 24px; }
.scope { color: var(--muted); font-size: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { margin: 3px 0 0; font-size: 12px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; padding: 18px 0; }
.filters label { width: 110px; margin-bottom: 0; font-size: 11px; font-weight: 400; }
.filters .grow { flex: 1; min-width: 190px; }
.filters input, .filters select { min-height: 40px; margin-top: 7px; padding: 8px 10px; font-size: 13px; }
.filters button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
.auth-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 30px 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: 22px; background: var(--panel); box-shadow: 0 24px 64px #1e443b14, 0 3px 8px #1e443b08; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; color: var(--accent); font-size: 29px; font-weight: 700; letter-spacing: -.9px; }
.auth-brand svg { width: 24px; height: 24px; }
.auth-heading { font-size: 25px; font-weight: 600; margin-bottom: 8px; }
.auth-footer { margin: 22px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.password-card { max-width: 620px; }
.password-card > .muted { font-size: 12px; }
.account-details { padding: 14px 18px; margin: 20px 0 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.account-details > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); }
.account-details dt { padding: 5px 0; color: var(--muted); }
.account-details dd { padding: 5px 0; margin: 0; overflow-wrap: anywhere; }
.pagination, .table-footer, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.table-footer { flex-wrap: wrap; justify-content: space-between; margin-top: 10px; }
.pagination span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pagination .secondary { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.dialog-actions { justify-content: end; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); }
.card > .table-scroll { border: 1px solid var(--line); border-radius: 12px; }
.card > .pagination { margin-top: 18px; }
.mobile-header, .sidebar-close, .menu-backdrop { display: none; }
@media (min-width: 901px) and (max-width: 1150px) {
  .sidebar { gap: 18px; padding: 12px 20px; }
  .sidebar nav { gap: 3px; }
  .sidebar .nav { padding: 10px 8px; font-size: 12px; }
  .signed-in-user strong { max-width: 120px; }
  .signed-in-user .muted { display: none; }
  .sidebar-bottom { gap: 10px; }
  .content { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 900px) {
  .mobile-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 8px 14px; border-bottom: 1px solid var(--accent-hover); background: var(--accent); box-shadow: 0 3px 14px #173e2920; }
  .menu-toggle, .sidebar-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--accent); }
  .menu-toggle:hover, .sidebar-close:hover { background: #eee; }
  .mobile-brand { font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 26px; width: min(310px, 86vw); height: 100vh; height: 100dvh; overflow-y: auto; padding: 26px 20px 20px; border-right: 1px solid var(--line); background: var(--panel); color: var(--text); transform: translateX(-101%); visibility: hidden; transition: transform .18s ease, visibility .18s; }
  .sidebar-close { position: absolute; top: 14px; right: 14px; }
  .sidebar .brand { padding: 0 8px; margin: 5px 40px 0 0; }
  .sidebar nav { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .sidebar .nav { justify-content: start; min-height: 52px; padding: 12px 14px; border: 1px solid transparent; color: var(--muted); font-size: 15px; }
  .sidebar .nav.active { border-color: var(--line); box-shadow: none; background: var(--accent-soft); }
  .sidebar-bottom { display: block; margin: auto 0 0; padding: 18px 8px 0; border-top: 1px solid var(--line); }
  .signed-in-user strong { max-width: none; white-space: normal; font-size: 13px; }
  .signed-in-user .muted { margin: 5px 0 15px; color: var(--muted); font-size: 11px; }
  .sidebar-bottom .secondary { min-height: 44px; width: 100%; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 30; display: block; background: #0005; }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .content { padding: 24px 18px 32px; }
  .topbar { justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 15px; }
  .topbar h1 { font-size: 25px; }
  .scope { max-width: 45%; text-align: right; font-size: 11px; }
  input:not([type=checkbox]), select { font-size: 16px; }
  .filters input, .filters select, .filters button { min-height: 44px; }
  .filters input, .filters select { font-size: 16px; }
}
@media (max-width: 600px) {
  .content { padding: 20px 12px 28px; }
  .section-heading { align-items: start; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding: 12px 0 15px; }
  .filters label, .filters .grow { width: auto; min-width: 0; }
  .filters .grow { grid-column: 1 / -1; }
  .filters button { padding: 10px; }
  #refresh-schedule { grid-column: 1 / -1; }
  .pagination { justify-content: space-between; width: 100%; }
  .pagination .secondary { min-height: 44px; }
  .table-footer { gap: 12px; }
  .auth-shell { padding: 24px 18px; }
  .auth-card { max-width: 440px; padding: 28px 24px; border-radius: 18px; }
  .dialog-actions button { flex: 1; }
}
