/* Global app header — shared by every page. */
.app-header {
  background: var(--pico-primary, #1095c1);
  padding: 1rem 0;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* .app-header-inner inherits Pico's responsive .container so its left edge
   lines up exactly with main.container on every page. We only layer flex
   layout on top. */
.app-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.app-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.app-brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}
.app-brand:hover { color: #fff; opacity: 0.85; }
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.app-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  line-height: 1;
  font-weight: 500;
}
.app-nav a:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.app-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
@media (max-width: 520px) {
  .app-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-nav { width: 100%; }
}

/* Page titles use the same brand blue as the header. */
main.container > h1 {
  color: var(--pico-primary, #1095c1);
}

/* Time cells stay on a single line so the table doesn't reflow awkwardly. */
time { white-space: nowrap; }

/* ── Shared across pages ── */
:root { --pico-font-size: 90%; }
table { font-size: 0.85rem; }

/* ── Sortable column headers ── */
thead a { color: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; }
thead a:hover, thead a:focus { color: inherit; text-decoration: none; }
.sort-ind { font-size: 0.75em; opacity: 0.6; }

/* ── Badges + applied rows (dashboard) ── */
tr.applied td { opacity: 0.45; text-decoration: line-through; }
tr.applied td.applied-cell { opacity: 1; text-decoration: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.badge-available  { background: #d4edda; color: #155724; }
.badge-reserved   { background: #fff3cd; color: #856404; }
.badge-rented     { background: #f8d7da; color: #721c24; }
.badge-optioned   { background: #fff3cd; color: #856404; }
.badge-unknown    { background: #e2e3e5; color: #383d41; }
.badge-removed    { background: #e2e3e5; color: #383d41; }

/* ── Stat cards (stats) ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat-card { background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color); border-radius: 8px; padding: 1rem; text-align: center; }
.stat-card .value { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.stat-card .label { font-size: 0.8rem; color: var(--pico-muted-color); margin-top: 0.25rem; }
.breakdown { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breakdown-item { background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color); border-radius: 6px; padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.breakdown-item strong { margin-left: 0.3rem; }

/* ── Config page ── */
.grid-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* ── Login page ── */
.login-wrap { max-width: 24rem; margin: 0 auto; }
