/* Nearby Studio — flat professional UI, fully responsive, no gradients */
:root {
  --primary: #10069f;
  --primary-hover: #0c057a;
  --primary-soft: #f0effa;
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #0f0f0f;
  --text-secondary: #606060;
  --muted: #909090;
  --border: #e5e5e5;
  --border-strong: #d0d0d0;
  --hover: #f2f2f2;
  --active: #e8e8e8;
  --success: #0d904f;
  --success-bg: #e8f5ee;
  --warning: #b06000;
  --warning-bg: #fff4e5;
  --danger: #cc0000;
  --danger-bg: #fce8e6;
  --info: #065fd4;
  --info-bg: #e8f0fe;
  --sidebar-w: 240px;
  --mobile-header-h: 52px;
  --top-h: 56px;
  --radius: 8px;
  --radius-sm: 4px;
  --font: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ── Login ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, var(--safe-top)) max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left));
  background: var(--bg);
}

.login-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: var(--fs-md);
  font-weight: 700;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--text);
}

.brand p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 400;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: var(--fs-xl);
  font-weight: 400;
  color: var(--text);
}

.login-card .subtitle {
  color: var(--text-secondary);
  margin: 0 0 24px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  font-weight: 400;
}

/* ── Mobile top header (hidden on desktop) ─────────── */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 35;
  height: calc(var(--mobile-header-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0 max(12px, var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 10px;
}

.mobile-header .mobile-title {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

/* Floating toggle fallback when no mobile-header markup */
body > .mobile-toggle {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: max(10px, var(--safe-left));
  z-index: 40;
}

/* ── Shell ─────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  color: var(--text);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar .brand {
  color: var(--text);
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  min-height: var(--top-h);
}

.sidebar .brand p { color: var(--text-secondary); }

.sidebar .brand-mark {
  width: 32px;
  height: 32px;
  font-size: var(--fs-sm);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: 12px 12px 8px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-sm);
  font-weight: 400;
  transition: background 0.12s ease;
  border-left: 3px solid transparent;
  padding-left: 11px;
  min-height: 44px;
}

.nav a:hover {
  background: var(--hover);
  text-decoration: none;
  color: var(--text);
}

.nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
  border-left-color: var(--primary);
  text-decoration: none;
}

.nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
  opacity: 0.85;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px;
  padding-bottom: max(12px, var(--safe-bottom));
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-footer button {
  width: 100%;
  min-height: 40px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: var(--fs-sm);
}

.sidebar-footer button:hover {
  background: var(--hover);
  color: var(--text);
}

.main {
  padding: 24px 32px 48px;
  max-width: 1400px;
  width: 100%;
  min-width: 0; /* allow grid child to shrink / scroll */
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  min-height: 40px;
}

.topbar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar h1 {
  margin: 0;
  font-size: var(--fs-2xl);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  word-break: break-word;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 400;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex: 0 1 auto;
}

/* ── Cards / stats ─────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}

.stat-card .label {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 52px;
}

.panel-header h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--text);
}

.panel-header a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--primary);
}

.panel-body { padding: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
}

/* ── Forms ─────────────────────────────────────────── */
label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  select,
  textarea {
    font-size: var(--fs-md);
  }
}

input:hover,
select:hover,
textarea:hover {
  border-color: #909090;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

.field { margin-bottom: 16px; }

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

.form-grid .full { grid-column: 1 / -1; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 880px;
  width: 100%;
}

button,
.btn {
  appearance: none;
  border: none;
  border-radius: 18px;
  padding: 8px 16px;
  min-height: 36px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  touch-action: manipulation;
}

a.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border-strong);
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--hover);
  color: var(--text);
}

.btn-sm {
  padding: 6px 12px;
  min-height: 32px;
  font-size: var(--fs-xs);
  border-radius: 16px;
  font-weight: 500;
}

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Tables ────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 640px; /* desktop/tablet table; cards used on small phones */
}

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

th {
  font-size: var(--fs-xs);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
  background: var(--surface);
  font-weight: 500;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:last-child td { border-bottom: none; }

@media (hover: hover) {
  tr:hover td { background: var(--hover); }
}

.listing-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.listing-cell > div {
  min-width: 0;
}

.listing-cell .strong,
.listing-cell .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.thumb {
  width: 64px;
  height: 36px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--hover);
  flex-shrink: 0;
}

.thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 500;
  font-size: 10px;
  width: 64px;
  height: 36px;
}

.muted {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: 400;
}

.strong {
  font-weight: 500;
  color: var(--text);
  font-size: var(--fs-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-approved { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-cancelled { background: var(--hover); color: var(--text-secondary); }

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Mobile card list (shown only on small screens when .has-cards) */
.card-list {
  display: none;
  flex-direction: column;
  gap: 0;
}

.data-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.data-card:last-child { border-bottom: none; }

.data-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.data-card-top .listing-cell {
  flex: 1;
  min-width: 0;
}

.data-card-top .listing-cell .strong,
.data-card-top .listing-cell .muted {
  white-space: normal;
  max-width: none;
}

.data-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.data-card-meta .meta-item {
  min-width: 0;
}

.data-card-meta .meta-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.data-card-meta .meta-value {
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.data-card .row-actions {
  padding-top: 4px;
}

.data-card .row-actions .btn {
  flex: 1 1 auto;
  min-width: calc(50% - 6px);
}

.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.empty h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: 400;
}

.empty p {
  margin: 0;
  font-size: var(--fs-sm);
}

/* ── Uploads ───────────────────────────────────────── */
.upload-zone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upload-zone strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
}

.upload-zone p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--hover);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 15, 15, 0.75);
  color: #fff;
  font-size: 14px;
  border: none;
  line-height: 1;
}

/* ── Alerts / toast ────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 400;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  word-break: break-word;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #f5c6c2;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: #c6e6d4;
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: #c5d9f8;
}

.toast-host {
  position: fixed;
  right: max(12px, var(--safe-right));
  bottom: max(12px, var(--safe-bottom));
  left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  max-width: min(340px, calc(100vw - 24px - var(--safe-left) - var(--safe-right)));
  pointer-events: none;
}

.toast {
  background: #212121;
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 400;
  animation: slide-in 0.18s ease;
  pointer-events: auto;
  word-break: break-word;
}

.toast.error { background: var(--danger); }
.toast.success { background: #0f9d58; }

@keyframes slide-in {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.filters input,
.filters select {
  min-width: 0;
  flex: 1 1 140px;
  width: auto;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
  .filters input,
  .filters select {
    flex: 0 1 auto;
    min-width: 160px;
    font-size: var(--fs-sm);
  }
}

.loading {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

/* ── Overlay for mobile sidebar ────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════ */

/* Large tablets / small laptops */
@media (max-width: 1100px) {
  .main {
    padding: 20px 20px 40px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Tablets & phones: collapsible sidebar */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  /* Hide floating toggle if inside header (we use the one in header) */
  .mobile-header .mobile-toggle {
    position: static;
  }

  body > .mobile-toggle {
    /* keep as fallback if page has no mobile-header */
    display: inline-flex;
  }

  body:has(.mobile-header) > .mobile-toggle {
    display: none;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    max-width: 320px;
    transform: translateX(-105%);
    z-index: 50;
    transition: transform 0.22s ease;
    box-shadow: none;
    padding-top: var(--safe-top);
    padding-left: var(--safe-left);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .main {
    padding: 16px 14px calc(32px + var(--safe-bottom));
    padding-left: max(14px, var(--safe-left));
    padding-right: max(14px, var(--safe-right));
  }

  /* When using floating menu only (no sticky header), add top space */
  body:not(:has(.mobile-header)) .main {
    padding-top: calc(56px + var(--safe-top));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1 1 auto;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-card .value {
    font-size: 22px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .form-card {
    padding: 16px;
    border-radius: var(--radius);
  }

  .login-card {
    padding: 24px 18px;
  }
}

/* Phones */
@media (max-width: 600px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card .label {
    font-size: 10px;
  }

  .stat-card .value {
    font-size: 20px;
  }

  /* Prefer card layout: hide wide tables when cards present */
  .table-wrap.has-cards table {
    display: none;
    min-width: 0;
  }

  .table-wrap.has-cards .card-list {
    display: flex;
  }

  .table-wrap:not(.has-cards) table {
    min-width: 560px;
  }

  th, td {
    padding: 10px 12px;
  }

  .listing-cell .strong,
  .listing-cell .muted {
    max-width: 160px;
  }

  .thumb {
    width: 56px;
    height: 32px;
  }

  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .upload-zone {
    padding: 20px 14px;
  }

  .toast-host {
    left: max(12px, var(--safe-left));
    right: max(12px, var(--safe-right));
    max-width: none;
  }

  .data-card-meta {
    grid-template-columns: 1fr;
  }

  .data-card .row-actions .btn {
    min-width: 100%;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .topbar-actions .btn {
    width: 100%;
  }
}

/* Landscape phones: keep usable nav */
@media (max-height: 480px) and (orientation: landscape) {
  .sidebar {
    height: 100dvh;
  }

  .sidebar .brand {
    min-height: 44px;
    padding: 8px 12px;
  }

  .nav a {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .login-page {
    place-items: start center;
    padding-top: 16px;
  }
}

/* Large desktops */
@media (min-width: 1400px) {
  .main {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Print (optional admin export) */
@media print {
  .sidebar,
  .mobile-header,
  .mobile-toggle,
  .sidebar-backdrop,
  .topbar-actions,
  .toast-host {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
    max-width: none;
  }

  .panel,
  .stat-card {
    break-inside: avoid;
  }
}
