/* Etel Taxi - desktop layouts (screens 1024px and wider). Phones are unchanged. Presentation only: no markup, API or script changes. */
@media (min-width: 1024px) {
  /* ---------- driver app ---------- */
  /* sign-in / register keep the narrow card; the sign-in page itself is full width */
  #app:has(#view-login.active) { max-width: none; padding: 0; }
  #app:has(#view-register.active), #app:has(#view-complete-etelid.active) { max-width: 560px; }
  #app:has(#view-status.active), #app:has(#view-pay.active), #app:has(#view-history.active) { max-width: 1100px; padding: 28px 36px 48px; }
  #app-header { padding: 14px 20px; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); box-shadow: var(--shadow-1); }
  #app-header h1 { font-size: 20px; }

  /* status: permit card on the left, account and actions on the right */
  #view-status.active { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  #view-status > .permit-card { grid-column: 1; grid-row: 1 / span 6; margin-bottom: 0; }
  #view-status > :not(.permit-card) { grid-column: 2; }
  #view-status > .card { margin-bottom: 18px !important; padding: 8px 22px; }
  #view-status > .btn { width: 100% !important; max-width: 460px; }
  #view-status .info-row { font-size: 15px; }
  #view-status .info-row.hero > span:last-child { font-size: 26px; }

  /* pay and history: a centred column, not a stretched phone screen */
  #view-pay.active, #view-history.active { max-width: 720px; margin: 0 auto; }
  .method-grid { grid-template-columns: repeat(3, 1fr); }

  /* ---------- admin console ---------- */
  #shell #sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  #shell #content { max-width: 1400px; width: 100%; padding: 36px 44px 56px; }
  #shell #content h1 { font-size: 26px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
  #shell .stat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
  #shell .stat-card { padding: 20px 22px; }
  #shell .stat-value { font-size: 32px; }
  #shell th, #shell td { padding: 13px 14px; }
}

/* admin console on a phone or small tablet: the sidebar becomes a scrolling bar on top instead of cutting the page off */
@media (max-width: 820px) {
  #shell { flex-direction: column; }
  #shell #sidebar { width: 100%; height: auto; position: static; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  #shell #sidebar #side-brand { padding: 0 8px 0 0; flex: none; }
  #shell #sidebar .page-topbar { padding: 0 8px 0 0 !important; flex-wrap: nowrap !important; flex: none; }
  #shell #sidebar .side-link { width: auto; flex: none; white-space: nowrap; margin-bottom: 0; }
  #shell #sidebar .side-link.active::before { display: none; }
  #shell #sidebar .verify-link { margin-top: 0; flex: none; white-space: nowrap; }
  #shell #content { padding: 18px 16px 40px; max-width: 100%; min-width: 0; }
  #shell table { display: block; overflow-x: auto; }
}
