/* ═══════════════════════════════════════════════
   Shell Stationsmanager — Corporate Identity CSS
   Primary:   #FBCE07  Shell Yellow
   Secondary: #DD1D21  Shell Red
   ═══════════════════════════════════════════════ */

:root {
  --shell-yellow:       #FBCE07;
  --shell-yellow-dark:  #e6b800;
  --shell-yellow-light: #fff9e6;
  --shell-red:          #DD1D21;
  --shell-red-dark:     #b81519;
  --shell-red-light:    #fff0f0;
  --shell-dark:         #1A1A1A;
  --shell-gray:         #F5F5F5;
  --shell-gray-mid:     #E8E8E8;
  --shell-border:       #E0E0E0;
  --shell-text:         #2D2D2D;
  --shell-text-muted:   #6B6B6B;
  --status-yes:         #22C55E;
  --status-no:          #EF4444;
  --status-na:          #94A3B8;
  --status-pending:     #F59E0B;
  --touch-min:          48px;
  --radius:             8px;
  --radius-lg:          12px;
  --sidebar-width:      240px;
  --sidebar-collapsed:  64px;
  --shadow:             0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:          0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --font:               system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--shell-gray);
  color: var(--shell-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}
body.sidebar-open-mobile { overflow: hidden; }

/* ── Typography ───────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--shell-dark); }
h2 { font-size: 1.375rem; font-weight: 600; color: var(--shell-dark); }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--shell-dark); }
h4 { font-size: 1rem;     font-weight: 600; }
p  { margin-bottom: .75rem; }
a  { color: var(--shell-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   LEFT SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--shell-dark);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

/* Collapsed state (desktop) */
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

/* ── Sidebar header (logo + toggle) ─────────── */
.sidebar-header {
  background: var(--shell-yellow);
  padding: 0 .75rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 3px solid var(--shell-yellow-dark);
  overflow: hidden;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--shell-dark);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand-text {
  overflow: hidden;
  opacity: 1;
  transition: opacity .15s, max-width .22s;
  max-width: 160px;
  white-space: nowrap;
}
.sidebar.collapsed .sidebar-brand-text {
  opacity: 0;
  max-width: 0;
}
.shell-logo {
  width: 34px; height: 34px;
  background: var(--shell-red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--shell-yellow);
  font-weight: 900; font-size: 1rem;
  flex-shrink: 0;
}

/* Toggle button */
.sidebar-toggle {
  width: 34px; height: 34px;
  border: none;
  background: rgba(0,0,0,.15);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--shell-dark);
  flex-shrink: 0;
  transition: background .15s, transform .22s;
}
.sidebar-toggle:hover { background: rgba(0,0,0,.25); }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

/* ── Nav links ───────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: .75rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .75rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  white-space: nowrap;
  min-height: 44px;
  transition: background .15s, color .15s;
  position: relative;
  overflow: hidden;
}
.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: white;
  text-decoration: none;
}
.nav-item.active {
  background: var(--shell-yellow);
  color: var(--shell-dark);
  font-weight: 700;
}
.nav-item svg { flex-shrink: 0; }
.nav-item-label {
  opacity: 1;
  transition: opacity .15s;
  overflow: hidden;
}
.sidebar.collapsed .nav-item-label { opacity: 0; }

/* Tooltip on collapsed */
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: .7rem;
}
.sidebar.collapsed .nav-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(var(--sidebar-collapsed) + .5rem);
  background: var(--shell-dark);
  color: white;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 500;
  border: 1px solid rgba(255,255,255,.1);
}
.sidebar.collapsed .nav-item:hover::after { opacity: 1; }

/* Section divider */
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: .5rem .75rem;
}

/* ── Sidebar footer (user + logout) ─────────── */
.sidebar-footer {
  padding: .75rem .5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  margin-bottom: .4rem;
  overflow: hidden;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--shell-yellow);
  color: var(--shell-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}
.sidebar-user-info {
  overflow: hidden;
  opacity: 1;
  transition: opacity .15s;
}
.sidebar.collapsed .sidebar-user-info { opacity: 0; }
.sidebar-user-name {
  font-size: .82rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-logout:hover {
  background: rgba(239,68,68,.2);
  color: #FCA5A5;
  text-decoration: none;
}
.sidebar.collapsed .sidebar-logout {
  justify-content: center;
  padding: .6rem;
}
.sidebar-logout-label {
  opacity: 1;
  transition: opacity .15s;
}
.sidebar.collapsed .sidebar-logout-label { opacity: 0; }

/* ═══════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════ */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-wrapper.collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* Mobile top bar (visible only on mobile) */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: .75rem;
  background: var(--shell-yellow);
  border-bottom: 3px solid var(--shell-yellow-dark);
  padding: 0 1rem;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.mobile-menu-btn {
  width: 40px; height: 40px;
  border: none; background: rgba(0,0,0,.1);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mobile-menu-btn svg { color: var(--shell-dark); }
.mobile-topbar-brand {
  font-weight: 800; font-size: .95rem; color: var(--shell-dark);
  display: flex; align-items: center; gap: .5rem;
}

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 299;
}
.sidebar-overlay.visible { display: block; }

/* Page content */
main {
  flex: 1;
  padding: 1.5rem;
}
.container    { max-width: 1200px; margin: 0 auto; }
.page-content { /* kept for template compat */ }

/* Logged-out pages (login, error pages) — no sidebar offset */
.main-wrapper.no-sidebar {
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important; /* always full width when open on mobile */
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar.collapsed { width: var(--sidebar-width) !important; }
  .sidebar-toggle { display: none; } /* hide collapse toggle on mobile */
  .main-wrapper,
  .main-wrapper.collapsed {
    margin-left: 0;
  }
  .mobile-topbar { display: flex; }
  main { padding: 1rem; }
  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.125rem; }
}

/* ═══════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--shell-border);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.card-header h2, .card-header h3 { margin-bottom: 0; }
.card-body   { padding: 1.25rem; }
.card-yellow { border-top: 4px solid var(--shell-yellow); }
.card-red    { border-top: 4px solid var(--shell-red); }
.card-green  { border-top: 4px solid var(--status-yes); }

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: .9rem;
  border: none; cursor: pointer;
  text-decoration: none;
  min-height: var(--touch-min);
  transition: all .15s;
  white-space: nowrap; line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover   { text-decoration: none; opacity: .9; transform: translateY(-1px); }
.btn:active  { transform: translateY(0); opacity: 1; }
.btn-primary { background: var(--shell-red);    color: white; }
.btn-yellow  { background: var(--shell-yellow); color: var(--shell-dark); }
.btn-dark    { background: var(--shell-dark);   color: white; }
.btn-outline { background: transparent; border: 2px solid var(--shell-border); color: var(--shell-text); }
.btn-outline:hover { border-color: var(--shell-dark); }
.btn-danger  { background: var(--status-no);  color: white; }
.btn-success { background: var(--status-yes); color: white; }
.btn-sm  { padding: .4rem .9rem;  font-size: .8rem;  min-height: 36px; }
.btn-lg  { padding: 1rem 2rem;    font-size: 1.1rem; min-height: 60px; }
.btn-xl  { padding: 1.25rem 2.5rem; font-size: 1.25rem; min-height: 72px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════ */
.form-group  { margin-bottom: 1rem; }
.form-label  { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .375rem; }
.form-label .required { color: var(--shell-red); margin-left: .2rem; }
.form-control {
  display: block; width: 100%;
  padding: .625rem .875rem;
  font-size: 1rem; font-family: var(--font);
  border: 1.5px solid var(--shell-border);
  border-radius: var(--radius);
  background: white; color: var(--shell-text);
  min-height: var(--touch-min);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--shell-yellow-dark);
  box-shadow: 0 0 0 3px rgba(251,206,7,.25);
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem;
}
textarea.form-control { min-height: 80px; resize: vertical; }
.form-hint { font-size: .8rem; color: var(--shell-text-muted); margin-top: .25rem; }
.form-row   { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
}
.shift-type-pill {
  display: flex; align-items: center; gap: .4rem;
  cursor: pointer; padding: .4rem .75rem;
  border: 2px solid var(--shell-border); border-radius: var(--radius);
  background: white; user-select: none; font-size: .875rem;
  transition: border-color .15s, background .15s;
}
.shift-type-pill.selected { border-color: var(--shell-yellow-dark); background: var(--shell-yellow-light); }
.shift-type-pill input { accent-color: var(--shell-yellow-dark); }

/* ═══════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 20px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-yes     { background: #DCFCE7; color: #166534; }
.badge-no      { background: #FEE2E2; color: #991B1B; }
.badge-na      { background: #F1F5F9; color: #475569; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-yellow  { background: var(--shell-yellow);      color: var(--shell-dark); }
.badge-red     { background: var(--shell-red);         color: white; }
.badge-green   { background: #DCFCE7; color: #166534; }
.badge-gray    { background: var(--shell-gray-mid);    color: var(--shell-text-muted); }

/* ═══════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════ */
.progress-wrap  { background: var(--shell-gray-mid); border-radius: 20px; height: 10px; overflow: hidden; }
.progress-bar   { height: 100%; border-radius: 20px; background: var(--shell-yellow); transition: width .4s ease; }
.progress-bar.complete { background: var(--status-yes); }
.progress-label { font-size: .8rem; color: var(--shell-text-muted); margin-top: .3rem; }

/* ═══════════════════════════════════════════════
   TASK TABLE
   ═══════════════════════════════════════════════ */
.task-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.task-table th {
  background: var(--shell-dark); color: white;
  padding: .75rem 1rem; font-size: .8rem; font-weight: 600;
  text-align: left; text-transform: uppercase; letter-spacing: .05em;
}
.task-table th:first-child { border-radius: var(--radius) 0 0 0; }
.task-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.task-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--shell-border);
  vertical-align: middle; font-size: .9rem;
}
.task-table tr:last-child td { border-bottom: none; }
.task-table tr:hover td      { background: var(--shell-yellow-light); }
.task-table tr.status-no  td { background: #FEF2F2; }
.task-table tr.status-yes td { background: #F0FFF4; }
.task-actions { display: flex; gap: .4rem; flex-wrap: nowrap; }
.task-btn {
  padding: .5rem .9rem;
  border: 2px solid var(--shell-border);
  border-radius: var(--radius);
  background: white; cursor: pointer;
  font-weight: 700; font-size: .85rem;
  min-height: 44px;
  transition: all .15s; white-space: nowrap;
}
.task-btn:hover        { border-color: var(--shell-dark); }
.task-btn.active-yes   { background: var(--status-yes); border-color: var(--status-yes); color: white; }
.task-btn.active-no    { background: var(--status-no);  border-color: var(--status-no);  color: white; }
.task-btn.active-na    { background: var(--status-na);  border-color: var(--status-na);  color: white; }

/* ═══════════════════════════════════════════════
   PIN PAD
   ═══════════════════════════════════════════════ */
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  max-width: 280px; margin: 0 auto;
}
.pin-key {
  aspect-ratio: 1;
  border-radius: var(--radius-lg); font-size: 1.5rem; font-weight: 700;
  border: 2px solid var(--shell-border); background: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .12s; box-shadow: var(--shadow); user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:hover  { background: var(--shell-yellow-light); border-color: var(--shell-yellow-dark); }
.pin-key:active { background: var(--shell-yellow); transform: scale(.96); }
.pin-key.delete { color: var(--shell-red); }
.pin-display {
  font-size: 2rem; letter-spacing: .5rem; text-align: center;
  padding: 1rem; background: var(--shell-gray); border-radius: var(--radius);
  margin-bottom: 1rem; min-height: 72px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--shell-border);
}

/* ═══════════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════════ */
.calendar { width: 100%; border-collapse: separate; border-spacing: 3px; }
.calendar th {
  background: var(--shell-dark); color: var(--shell-yellow);
  padding: .6rem; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .06em; border-radius: var(--radius);
}
.cal-day {
  background: white; border-radius: var(--radius);
  padding: .4rem; vertical-align: top; min-height: 90px;
  border: 1px solid var(--shell-border); transition: border-color .15s;
}
.cal-day.today      { border-color: var(--shell-yellow); border-width: 2px; }
.cal-day.other-month { background: var(--shell-gray); opacity: .5; }
.cal-day-num { font-size: .85rem; font-weight: 700; color: var(--shell-text-muted); margin-bottom: .3rem; }
.today .cal-day-num {
  background: var(--shell-yellow); color: var(--shell-dark);
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.shift-chip {
  display: flex; align-items: center; gap: .3rem;
  padding: .2rem .5rem; border-radius: 4px;
  font-size: .7rem; font-weight: 600; margin-bottom: .2rem;
  cursor: pointer; transition: opacity .15s;
}
.shift-chip:hover { opacity: .85; }
.shift-frueh           { background: #DBEAFE; color: #1E40AF; }
.shift-mittags         { background: #FEF3C7; color: #92400E; }
.shift-spat            { background: #EDE9FE; color: #5B21B6; }
.shift-nacht           { background: #1F2937; color: #F3F4F6; }
.shift-hausmeister     { background: #D1FAE5; color: #065F46; }
.shift-stationsleiter  { background: #FFE4E6; color: #9F1239; }

/* ═══════════════════════════════════════════════
   CHECKLIST
   ═══════════════════════════════════════════════ */
.checklist-header { background: var(--shell-yellow); padding: 1.25rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.task-comment-area { display: none; margin-top: .5rem; }
.task-comment-area.visible { display: block; }

/* Quick-start */
.quickstart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.quickstart-card {
  background: white; border-radius: var(--radius-lg);
  border: 2px solid var(--shell-border);
  padding: 1rem; text-decoration: none; color: var(--shell-text);
  display: flex; flex-direction: column; gap: .4rem;
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer; text-align: left;
}
.quickstart-card:hover { border-color: var(--shell-yellow-dark); box-shadow: var(--shadow-md); text-decoration: none; }
.quickstart-card .quickstart-icon { font-size: 1.75rem; }
.quickstart-card .quickstart-name { font-weight: 700; font-size: .95rem; }
.quickstart-card .quickstart-meta { font-size: .78rem; color: var(--shell-text-muted); }
.quickstart-card .quickstart-tasks { font-size: .75rem; color: var(--shell-text-muted); }

/* ═══════════════════════════════════════════════
   DASHBOARD WIDGETS
   ═══════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white; border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow);
  border-left: 4px solid var(--shell-yellow);
}
.stat-card.red   { border-left-color: var(--shell-red); }
.stat-card.green { border-left-color: var(--status-yes); }
.stat-card.dark  { border-left-color: var(--shell-dark); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--shell-dark); line-height: 1; margin-bottom: .3rem; }
.stat-label { font-size: .78rem; color: var(--shell-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

/* ═══════════════════════════════════════════════
   CLOCK / TIME
   ═══════════════════════════════════════════════ */
.clock-status { background: var(--shell-yellow); border-radius: var(--radius-lg); padding: 1rem; text-align: center; margin-bottom: 1rem; }
.clock-status.clocked-in  { background: #DCFCE7; }
.clock-status.clocked-out { background: var(--shell-gray); }

/* ═══════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════ */
.alert {
  padding: .875rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; display: flex; align-items: flex-start; gap: .625rem; font-size: .9rem;
}
.alert-error   { background: var(--shell-red-light);  color: #7F1D1D; border-left: 4px solid var(--shell-red); }
.alert-success { background: #F0FFF4; color: #14532D;  border-left: 4px solid var(--status-yes); }
.alert-warning { background: var(--shell-yellow-light); color: #78350F; border-left: 4px solid var(--shell-yellow-dark); }
.alert-info    { background: #EFF6FF; color: #1E3A5F;  border-left: 4px solid #3B82F6; }

/* ═══════════════════════════════════════════════
   GENERIC TABLE
   ═══════════════════════════════════════════════ */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  background: var(--shell-gray); padding: .625rem .875rem;
  font-weight: 600; text-align: left; border-bottom: 2px solid var(--shell-border);
}
.table td { padding: .75rem .875rem; border-bottom: 1px solid var(--shell-border); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--shell-yellow-light); }

/* Reassignment avatar */
.available-badge {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--shell-yellow); color: var(--shell-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════════ */
.section-header   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem; }
.section-divider  { border: none; border-top: 2px solid var(--shell-yellow); margin: 1.5rem 0; }

/* ═══════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--shell-text-muted); }
.text-small   { font-size: .8rem; }
.font-bold    { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.mb-0  { margin-bottom: 0 !important; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.p-0   { padding: 0 !important; }
.w-full { width: 100%; }
.hidden { display: none; }
.overflow-x-auto { overflow-x: auto; }

/* HTMX indicator */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* Print */
@media print {
  .sidebar, .mobile-topbar, .sidebar-overlay, .btn, form { display: none !important; }
  .main-wrapper, .main-wrapper.collapsed { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* Extra small */
@media (max-width: 480px) {
  main { padding: .75rem; }
  .card-body { padding: 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .btn-xl    { padding: 1rem 1.5rem; font-size: 1rem; }
  .form-row  { grid-template-columns: 1fr; }
  .task-actions { flex-wrap: wrap; }
}
