:root {
  --bg: #fffbeb;
  --bg-warm: #fef3c7;
  --panel: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #f59e0b;
  --accent2: #fb923c;
  --accent-deep: #ea580c;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --gold: #fbbf24;
  --stroke: #fde68a;
  --danger: #ef4444;
  --success: #16a34a;
  --sidebar: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  --shadow: 0 8px 32px rgba(234, 88, 12, 0.08);
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(251, 191, 36, 0.25), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(251, 146, 60, 0.18), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(254, 243, 199, 0.8), transparent 60%);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--stroke);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(15, 118, 110, 0.28);
  overflow: hidden;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-mark-lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.brand-text { display: grid; line-height: 1.15; gap: 2px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-name-lg { font-size: 1.45rem; }
.brand-text small { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.35; }
.mobile-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-account {
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
}
.sidebar-account-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sidebar-account-name { font-size: 16px; font-weight: 700; margin: 4px 0; }
.sidebar-logout { font-size: 13px; font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.sidebar-logout:hover { text-decoration: underline; }

.sidebar-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--stroke);
  color: var(--text);
  transform: translateX(2px);
}
.sidebar-link.active {
  background: linear-gradient(135deg, #fff, #fff7ed);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: var(--shadow);
}
.sidebar-icon { font-size: 20px; width: 32px; text-align: center; }
.sidebar-label { font-size: 14px; font-weight: 700; display: block; }
.sidebar-note { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.sidebar-tools { margin-top: auto; }

.content-area {
  padding: 28px 32px 48px;
  min-height: 100vh;
}
.content-wrap { max-width: 1280px; margin: 0 auto; display: grid; gap: 24px; }

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--stroke);
  position: sticky;
  top: 0;
  z-index: 25;
}
.mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: var(--font-display); text-decoration: none; color: var(--text); font-size: 15px; }
.menu-toggle {
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}
.sidebar-overlay { display: none; border: 0; background: rgba(28, 25, 23, 0.4); }

.page-heading { display: grid; gap: 8px; }
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sub { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.5; }

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.card-body { padding: 20px 22px; }
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-title { margin: 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fff 0%, #fffbeb 100%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.stat-card .stat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat-card .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent-deep); margin: 6px 0; line-height: 1; }
.stat-card .stat-hint { font-size: 12px; color: var(--muted); }

.hero-banner {
  padding: 28px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 16px 48px rgba(15, 118, 110, 0.28);
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(253, 230, 138, 0.18), transparent 35%);
  pointer-events: none;
}
.hero-banner::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  opacity: 0.9;
}
.hero-banner h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; position: relative; z-index: 1; }
.hero-banner p { position: relative; z-index: 1; margin: 0; opacity: 0.95; font-size: 15px; max-width: 520px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 8px 24px var(--accent-glow); }
.btn-secondary { background: #fff; border-color: var(--stroke); color: var(--text); }
.btn-danger { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

.field { display: grid; gap: 6px; min-width: 0; }
.label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.input, .select, .textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.form-grid .field { min-width: 0; }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--stroke); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--stroke);
  white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid #fef3c7; vertical-align: middle; }
table.data-table tr:hover td { background: rgba(254, 243, 199, 0.35); }
table.data-table tr:last-child td { border-bottom: 0; }
table.data-table a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
table.data-table a:hover { text-decoration: underline; }

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.badge-active { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-closed { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-selling { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-muted { background: #f5f5f4; color: var(--muted); }

.lang-switch { display: flex; gap: 4px; padding: 3px; background: rgba(255,255,255,0.8); border-radius: 10px; border: 1px solid var(--stroke); }
.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--muted);
}
.lang-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab-btn {
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.8);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.flock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.flock-card {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--stroke);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow);
}
.flock-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(234, 88, 12, 0.12); border-color: var(--accent); }
.flock-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.05rem; }
.flock-card .meta { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-pill {
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #fff);
  border: 1px solid var(--stroke);
  text-align: center;
}
.kpi-pill .kpi-name { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.kpi-pill .kpi-val { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: var(--accent-deep); margin-top: 4px; }
.kpi-pill .kpi-unit { font-size: 11px; color: var(--muted); }

.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #fffbeb; border: 1px solid var(--stroke); color: #92400e; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 40%, #ffedd5 100%);
}
.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.3), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(251, 146, 60, 0.2), transparent 35%);
  pointer-events: none;
}
.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 64px rgba(234, 88, 12, 0.15);
  position: relative;
  z-index: 1;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; text-decoration: none; color: inherit; }
.auth-brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chart-box { height: 280px; position: relative; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(100%, 560px);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  box-sizing: border-box;
}
.modal-wide { width: min(100%, 920px); }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--stroke); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-body { padding: 20px 24px 24px; }
.modal-body.form-grid { gap: 16px; }
.modal-foot { padding: 16px 24px 20px; border-top: 1px solid var(--stroke); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0,0,0,0.1);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; position: fixed; inset: 0; z-index: 29; }
  .mobile-topbar { display: flex; }
  .content-area { padding: 20px 16px 40px; }
}

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

.system-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.system-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--stroke);
  background: linear-gradient(145deg, #fff 0%, #fffbeb 100%);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.system-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(234, 88, 12, 0.15);
  border-color: var(--accent);
}
.system-card--broiler { border-left: 5px solid #ea580c; }
.system-card--layer { border-left: 5px solid #fbbf24; }
.system-card-icon { font-size: 48px; line-height: 1; display: grid; place-items: center; }
.system-card-body { flex: 1; min-width: 0; }
.system-card-body h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.35rem; }
.system-card-th { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.system-card-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.system-card-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; font-weight: 700; color: var(--accent-deep); }
.system-card-arrow { font-size: 24px; color: var(--accent); align-self: center; font-weight: 800; }

/* ── UX: navigation & page structure ── */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 13px;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; color: #d6d3d1; font-weight: 700; }
.breadcrumbs a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 700; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.page-header-main { display: grid; gap: 6px; min-width: 0; }
.page-header-sub { font-size: 13px; color: var(--muted); }
.page-header-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.flow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--stroke);
  overflow-x: auto;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  color: var(--muted);
}
.flow-step.is-active { color: var(--accent-deep); }
.flow-step.is-active .flow-step-num {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}
.flow-step.is-done { color: var(--success); }
.flow-step.is-done .flow-step-num { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.flow-step-line { width: 28px; height: 2px; background: #e7e5e4; margin: 0 6px; flex-shrink: 0; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 6px 4px;
  margin-top: 4px;
}
.sidebar-section-label:first-child { margin-top: 0; padding-top: 0; }

/* ── UX: toolbars & actions ── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--stroke);
}
.toolbar-form { display: flex; gap: 8px; flex: 1; min-width: 200px; align-items: center; }
.search-input { flex: 1; min-width: 160px; max-width: 420px; }

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.action-bar--end { margin-left: auto; }

.action-menu { position: relative; }
.action-menu-toggle {
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}
.action-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 20;
}
.action-menu-panel.open { display: grid; gap: 6px; }
.action-menu-panel .btn { width: 100%; justify-content: flex-start; }

/* ── UX: cards & hints ── */
.card-body--flush { padding: 0; }
.card-body--flush .table-wrap { border: 0; border-radius: 0; }
.hint-bar {
  margin: 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 251, 235, 0.65);
}
.card-header--actions { align-items: flex-start; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.quick-action:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.1);
}
.quick-action-icon { font-size: 24px; line-height: 1; }
.quick-action-text strong { display: block; font-size: 14px; font-weight: 700; }
.quick-action-text small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── UX: tables ── */
.table-wrap { position: relative; -webkit-overflow-scrolling: touch; }
.table-wrap.is-scrollable::after {
  content: attr(data-scroll-hint);
  position: sticky;
  left: 0;
  bottom: 0;
  display: block;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(255, 251, 235, 0.95));
  pointer-events: none;
}
table.data-table .col-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
}
table.data-table th.col-sticky { background: linear-gradient(180deg, #fffbeb, #fef3c7); z-index: 3; }
table.data-table tr:hover td.col-sticky { background: #fffbeb; }
table.data-table .col-actions { white-space: nowrap; text-align: right; }
.empty-cell { text-align: center; padding: 36px 20px !important; color: var(--muted); }

/* ── UX: tabs (sticky on cycle pages) ── */
.tabs-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 0 12px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.tabs-sticky .tabs { margin-bottom: 0; }

/* ── UX: KPI improvements ── */
.kpi-row { margin-bottom: 16px; }
.kpi-pill {
  padding: 16px 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.08);
}
.kpi-pill .kpi-name { font-size: 11px; }

/* ── UX: forms & focus ── */
.btn:focus-visible,
.input:focus-visible,
.select:focus-visible,
.tab-btn:focus-visible,
.sidebar-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── UX: login polish ── */
.auth-card .lang-switch { margin-bottom: 16px; justify-content: center; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }

body.modal-open { overflow: hidden; }
body.nav-open { overflow: hidden; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-form { width: 100%; }
  .search-input { max-width: none; }
  .action-bar--mobile-collapse .btn:not(.btn-primary):not(.action-menu-toggle) { display: none; }
  .tabs-sticky { top: 52px; }
  .flow-steps { padding: 10px 12px; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: 1fr; }
  .flock-grid { grid-template-columns: 1fr; }
}
