/* ===================================================
   DRK Auslastungsberechnung — Command Center Theme
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* DRK Brand */
  --drk-red: #e30613;
  --drk-red-dark: #b8050f;
  --drk-red-light: #ff1a27;
  --drk-red-glow: rgba(227, 6, 19, 0.15);
  --drk-red-subtle: rgba(227, 6, 19, 0.08);

  /* Dark palette */
  --sidebar-bg: #0f1117;
  --sidebar-hover: #1a1c25;
  --sidebar-active: #232530;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-text: rgba(255,255,255,0.55);
  --sidebar-text-hover: rgba(255,255,255,0.9);

  /* Content */
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e4e7ec;
  --border-light: #f0f1f5;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  /* Semantic */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Layout Shell ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--drk-red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(227, 6, 19, 0.3);
}

.sidebar-brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.73rem;
  color: var(--sidebar-text);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-text);
  padding: 0 8px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text-hover);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--drk-red);
  border-radius: 0 3px 3px 0;
}

.sidebar-link-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  background: var(--sidebar-active);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--sidebar-text-hover);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--sidebar-text);
  text-transform: capitalize;
}

.sidebar-user-actions {
  display: flex;
  gap: 4px;
}

.sidebar-user-actions a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all var(--transition);
}

.sidebar-user-actions a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

/* ---- Mobile sidebar toggle ---- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 42px;
  height: 42px;
  background: var(--sidebar-bg);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* ---- Main content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}

.main-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.main-header-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 16px;
}

.main-body {
  flex: 1;
  padding: 28px 32px;
  max-width: 1200px;
  width: 100%;
}

/* Full-width for results page */
.main-body--wide {
  max-width: 1400px;
}

.main-footer {
  padding: 20px 32px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-accent {
  border-top: 3px solid var(--drk-red);
}

/* ---- Hero stat card ---- */
.stat-hero {
  background: linear-gradient(135deg, var(--drk-red) 0%, var(--drk-red-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  border: none;
}

.stat-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.stat-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.stat-hero-value {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.stat-hero-label {
  font-size: 1.05rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
  font-weight: 500;
}

.stat-hero-sub {
  font-size: 0.9rem;
  opacity: 0.65;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* ---- Stat grid ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stat-card-value--red { color: var(--drk-red); }
.stat-card-value--green { color: var(--success); }
.stat-card-value--amber { color: var(--warning); }
.stat-card-value--blue { color: var(--info); }

.stat-card-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.form-label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.93rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--drk-red);
  box-shadow: 0 0 0 3px var(--drk-red-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

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

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Checkbox styling */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--drk-red);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
}

.form-check-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 28px;
  margin-top: -4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--drk-red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--drk-red-dark);
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.25);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border-light);
  border-color: #d1d5db;
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #047857;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.88rem;
}

table th {
  background: var(--bg);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1.5px solid var(--border);
}

table td {
  border-bottom: 1px solid var(--border-light);
}

table tbody tr {
  transition: background var(--transition);
}

table tbody tr:hover {
  background: var(--drk-red-subtle);
}

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

/* Summary rows */
.table-summary td {
  background: var(--bg);
  font-weight: 600;
}

.table-highlight td {
  background: var(--drk-red-subtle);
  font-weight: 600;
}

.table-total td {
  background: var(--success-bg);
  font-weight: 700;
  font-size: 1rem;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-admin {
  background: var(--drk-red);
  color: #fff;
}

.badge-user {
  background: #e5e7eb;
  color: var(--text-secondary);
}

.badge-readonly {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}

.badge-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-inactive {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* ---- Flash messages ---- */
.flash-messages {
  margin-bottom: 20px;
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  animation: flashIn 0.3s ease-out;
}

@keyframes flashIn {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.flash.success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid var(--success-border);
}

.flash.error {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid var(--danger-border);
}

.flash.warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid var(--warning-border);
}

/* ---- Info boxes ---- */
.info-box {
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.info-box h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.info-box ul, .info-box ol {
  padding-left: 18px;
  line-height: 1.8;
  font-size: 0.88rem;
}

.info-box--blue {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: #1e40af;
}

.info-box--amber {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #92400e;
}

.info-box--green {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #065f46;
}

.info-box--red {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #991b1b;
}

/* ---- Vorhaltung day rows ---- */
.day-row {
  padding: 14px 16px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.day-row.disabled {
  opacity: 0.45;
}

.day-row-grid {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.day-row-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.day-row-sublabel {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.schicht2-block {
  padding-left: 14px;
  border-left: 3px solid var(--info);
  margin-top: 10px;
}

/* ---- Period badges (vorhaltung list) ---- */
.period-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 6px;
  transition: all var(--transition);
}

.period-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.period-item--default {
  border-left: 3px solid var(--success);
}

.period-item--dated {
  border-left: 3px solid var(--info);
}

.period-item-info {
  flex: 1;
  min-width: 0;
}

.period-item-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.period-item-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.period-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ---- Login page ---- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(227, 6, 19, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(227, 6, 19, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 56px;
  height: 56px;
  background: var(--drk-red);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(227, 6, 19, 0.3);
}

.login-brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.login-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Section config blocks ---- */
.config-section {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.config-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.back-link:hover {
  background: var(--bg);
  color: var(--text-primary);
}

/* ---- Feature list (index) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.feature-item:hover {
  border-color: var(--border);
}

.feature-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--drk-red-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.feature-item strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.feature-item span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .sidebar-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .main-header {
    padding-left: 64px;
  }

  .main-body {
    padding: 20px 16px;
  }
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-hero-value {
    font-size: 2.5rem;
  }

  .day-row-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .card {
    padding: 16px;
  }
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.4s ease-out both;
}

.animate-in:nth-child(2) { animation-delay: 0.05s; }
.animate-in:nth-child(3) { animation-delay: 0.1s; }
.animate-in:nth-child(4) { animation-delay: 0.15s; }
.animate-in:nth-child(5) { animation-delay: 0.2s; }
.animate-in:nth-child(6) { animation-delay: 0.25s; }

/* ---- Export row ---- */
.export-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
}

.export-row label {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ---- Utility ---- */
.text-red { color: var(--drk-red); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-outfit { font-family: 'Outfit', sans-serif; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.inline { display: inline; }
.inline-block { display: inline-block; }
