:root {
  --bg-main: #F5F7FA;
  --bg-sidebar: #111827;
  --bg-card: #FFFFFF;
  --primary: #2563EB;
  --success: #22C55E;
  --warning: #FACC15;
  --danger: #EF4444;
  --text-main: #0F172A;
  --text-soft: #6B7280;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-soft-strong: 0 18px 45px rgba(15, 23, 42, 0.12);
  --transition-fast: 180ms ease-out;
  --sidebar-width: 260px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.app-shell {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #E5EDFF 0, #F5F7FA 48%, #EEF2FF 100%);
}
.sidebar-toggle { display: none; }
.sidebar {
  width: var(--sidebar-width);
  background: radial-gradient(circle at top, #1F2937 0, #111827 55%, #020617 100%);
  color: #E5E7EB;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.6);
  z-index: 20;
  transition: transform var(--transition-fast);
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
}
.brand-logo svg { width: 18px; height: 18px; color: #0B1120; }
.brand-logo .brand-img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-family: "Poppins", system-ui; font-weight: 600; font-size: 17px; letter-spacing: 0.03em; }
.brand-subtitle { font-size: 11px; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.12em; }
.sidebar-badge {
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: #E5E7EB;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.nav-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: #6B7280; margin-bottom: 8px; }
.nav-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.nav-item-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 999px;
  color: #D1D5DB; font-size: 13px;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.nav-item-link svg { width: 18px; height: 18px; flex-shrink: 0; color: #9CA3AF; transition: color var(--transition-fast), transform var(--transition-fast); }
.nav-item-link.active {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.95));
  color: #E5E7EB; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}
.nav-item-link.active svg { color: var(--primary); }
.nav-item-link:hover { background: rgba(31, 41, 55, 0.95); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(15, 23, 42, 0.75); }
.nav-item-link:hover svg { color: var(--primary); transform: translateX(1px); }
.sidebar-separator { height: 1px; background: linear-gradient(to right, rgba(55, 65, 81, 0.6), rgba(55, 65, 81, 0.05)); margin: 4px 0 16px; }
.sidebar-footer {
  border-radius: var(--radius-md); padding: 12px 11px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.35); box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #FACC15, #FB923C, #EF4444);
  display: flex; align-items: center; justify-content: center; color: #111827; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; white-space: nowrap; }
.user-role { font-size: 11px; color: #9CA3AF; white-space: nowrap; }
.user-status-pill {
  margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 3px 8px; border-radius: 999px; background: rgba(22, 163, 74, 0.15); border: 1px solid rgba(34, 197, 94, 0.6); color: #BBF7D0;
}
.main-shell { flex: 1; display: flex; flex-direction: column; padding: 18px 24px 24px; max-width: 1400px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle-btn {
  display: none; width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.9); box-shadow: 0 12px 30px rgba(148, 163, 184, 0.65);
  align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.sidebar-toggle-btn span { width: 16px; height: 2px; border-radius: 999px; background: #111827; position: relative; display: inline-block; transition: transform var(--transition-fast), background var(--transition-fast); }
.sidebar-toggle-btn span::before, .sidebar-toggle-btn span::after {
  content: ""; width: 16px; height: 2px; border-radius: 999px; background: #111827; position: absolute; left: 0; transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.sidebar-toggle-btn span::before { top: -5px; }
.sidebar-toggle-btn span::after { top: 5px; }
.sidebar-toggle:checked ~ .sidebar { transform: translateX(0); }
.sidebar-toggle:checked ~ .main-shell .sidebar-toggle-btn span { background: transparent; }
.sidebar-toggle:checked ~ .main-shell .sidebar-toggle-btn span::before { transform: translateY(5px) rotate(45deg); }
.sidebar-toggle:checked ~ .main-shell .sidebar-toggle-btn span::after { transform: translateY(-5px) rotate(-45deg); }
.sidebar-toggle-btn:hover { background: #FFFFFF; transform: translateY(-1px); box-shadow: 0 16px 36px rgba(148, 163, 184, 0.75); }
.topbar-title-block { display: flex; flex-direction: column; gap: 4px; }
.topbar-title { font-family: "Poppins", system-ui; font-size: 22px; font-weight: 600; letter-spacing: 0.01em; }
.topbar-subtitle { font-size: 13px; color: var(--text-soft); }
.topbar-subtitle span { color: var(--primary); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.chip {
  padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(148, 163, 184, 0.65);
  font-size: 11px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); box-shadow: 0 12px 30px rgba(148, 163, 184, 0.5);
}
.chip-dot {
  width: 7px; height: 7px; border-radius: 999px; background: radial-gradient(circle at 20% 0, #BBF7D0, #22C55E);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}
.chip strong { color: var(--text-main); font-weight: 500; }
.chip-secondary { background: rgba(15, 23, 42, 0.96); color: #E5E7EB; border-color: rgba(31, 41, 55, 0.9); box-shadow: 0 12px 34px rgba(15, 23, 42, 0.7); }
.chip-secondary svg { color: var(--warning); }
.content-shell { display: flex; flex-direction: column; gap: 18px; }
.screen {
  background: rgba(255, 255, 255, 0.9); border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(148, 163, 184, 0.5); backdrop-filter: blur(10px);
}
.screen-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.screen-title-block { display: flex; flex-direction: column; gap: 4px; }
.screen-title {
  font-family: "Poppins", system-ui; font-size: 17px; font-weight: 600; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px;
}
.screen-pill {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7); color: var(--text-soft); background: #F9FAFB;
}
.screen-description { font-size: 13px; color: var(--text-soft); }
.screen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-ghost {
  border-radius: 999px; padding: 6px 11px; font-size: 12px; border: 1px solid rgba(148, 163, 184, 0.75);
  background: #FFFFFF; display: inline-flex; align-items: center; gap: 7px; color: var(--text-main); cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}
.btn-ghost svg { width: 16px; height: 16px; color: var(--primary); }
.btn-ghost:hover { background: #EFF6FF; border-color: rgba(37, 99, 235, 0.7); box-shadow: 0 14px 32px rgba(148, 163, 184, 0.7); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #2563EB, #1D4ED8); border: none; color: #FFFFFF; box-shadow: 0 18px 40px rgba(37, 99, 235, 0.75); }
.btn-primary svg { color: #BFDBFE; }
.btn-primary:hover { background: linear-gradient(135deg, #1D4ED8, #1E40AF); box-shadow: var(--shadow-soft-strong); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.badge-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--text-soft); }
.badge-success { background: rgba(34, 197, 94, 0.10); color: #166534; }
.badge-success .badge-dot { background: radial-gradient(circle at 20% 0, #BBF7D0, #22C55E); }
.badge-danger { background: rgba(248, 113, 113, 0.08); color: #991B1B; }
.badge-danger .badge-dot { background: radial-gradient(circle at 20% 0, #FECACA, #DC2626); }
.badge-warning { background: rgba(250, 204, 21, 0.10); color: #854D0E; }
.badge-warning .badge-dot { background: radial-gradient(circle at 20% 0, #FEF9C3, #FACC15); }
.badge-neutral { background: #F3F4F6; color: #4B5563; }
.badge-neutral .badge-dot { background: #6B7280; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-card {
  background: #FFFFFF; border-radius: var(--radius-md); padding: 10px 11px; box-shadow: var(--shadow-soft); border: 1px solid rgba(148, 163, 184, 0.45);
  display: flex; flex-direction: column; gap: 6px; transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft-strong); border-color: rgba(37, 99, 235, 0.55); background: linear-gradient(135deg, #FFFFFF, #EFF6FF); }
.kpi-label { font-size: 11px; color: var(--text-soft); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kpi-pill { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; padding: 3px 7px; border-radius: 999px; background: #F3F4F6; color: #4B5563; }
.kpi-value-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi-value { font-family: "Poppins", system-ui; font-size: 24px; font-weight: 600; }
.kpi-trend { font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }
.kpi-trend.positive { color: #16A34A; }
.kpi-trend.negative { color: #DC2626; }
.kpi-trend.warning { color: #D97706; }
.trend-icon { width: 14px; height: 14px; border-radius: 999px; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: center; }
.trend-icon svg { width: 10px; height: 10px; }
.kpi-footer { font-size: 10px; color: var(--text-soft); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kpi-mini-meter { flex: 1; height: 4px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.kpi-mini-meter span {
  display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(22, 163, 74, 0.95), rgba(129, 230, 217, 0.9));
  transform-origin: left; transform: scaleX(0.8); transition: transform var(--transition-fast);
}
.kpi-card:hover .kpi-mini-meter span { transform: scaleX(1); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 12px; }
.dashboard-main { display: grid; grid-template-rows: auto auto; gap: 12px; }
.panel { background: #FFFFFF; border-radius: var(--radius-md); padding: 12px 13px; border: 1px solid rgba(148, 163, 184, 0.55); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 10px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-title { font-size: 13px; font-weight: 600; color: var(--text-main); }
.panel-subtitle { font-size: 11px; color: var(--text-soft); }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-soft); }
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.legend-color { width: 10px; height: 10px; border-radius: 999px; }
.legend-color.primary { background: var(--primary); }
.legend-color.success { background: var(--success); }
.legend-color.warning { background: var(--warning); }
.chart-placeholder {
  height: 190px; border-radius: var(--radius-md);
  background: repeating-linear-gradient(to right, #EFF6FF, #EFF6FF 16px, #DBEAFE 16px, #DBEAFE 18px);
  position: relative; overflow: hidden;
}
.chart-grid-line { position: absolute; left: 0; right: 0; height: 1px; background: rgba(148, 163, 184, 0.6); opacity: 0.4; }
.chart-grid-line:nth-child(1) { top: 25%; }
.chart-grid-line:nth-child(2) { top: 50%; }
.chart-grid-line:nth-child(3) { top: 75%; }
.chart-bars { position: absolute; bottom: 10px; left: 10px; right: 14px; display: flex; align-items: flex-end; gap: 6px; }
.chart-bar { flex: 1; border-radius: 6px; background: linear-gradient(to top, #1D4ED8, #60A5FA); min-height: 18px; opacity: 0.9; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.chart-bar:nth-child(2) { background: linear-gradient(to top, #F97316, #FACC15); }
.chart-bar:nth-child(3) { background: linear-gradient(to top, #16A34A, #86EFAC); }
.chart-bar:nth-child(4) { background: linear-gradient(to top, #1D4ED8, #60A5FA); }
.chart-bar:nth-child(1) { height: 40px; }
.chart-bar:nth-child(2) { height: 72px; }
.chart-bar:nth-child(3) { height: 110px; }
.chart-bar:nth-child(4) { height: 88px; }
.chart-placeholder:hover .chart-bar { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.45); }
.chart-legend-bottom { position: absolute; left: 12px; right: 12px; bottom: 6px; display: flex; justify-content: space-between; font-size: 10px; color: var(--text-soft); }
.gauge-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gauge-card { background: #F9FAFB; border-radius: var(--radius-md); padding: 10px 10px 11px; border: 1px solid rgba(209, 213, 219, 0.9); display: flex; flex-direction: column; gap: 6px; }
.gauge-header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-soft); }
.gauge-value { font-family: "Poppins", system-ui; font-size: 18px; font-weight: 600; }
.gauge-meter { height: 7px; border-radius: 999px; background: #E5E7EB; overflow: hidden; position: relative; }
.gauge-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22C55E, #4ADE80); width: 96%; }
.gauge-meter.warning span { background: linear-gradient(90deg, #F97316, #FACC15); width: 78%; }
.gauge-meter.danger span { background: linear-gradient(90deg, #DC2626, #FB7185); width: 52%; }
.gauge-meter::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.45); }
.alerts-panel {
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.07), #F9FAFB);
  border-radius: var(--radius-md); padding: 12px 13px; border: 1px solid rgba(248, 113, 113, 0.35); box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.alerts-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alerts-title { font-size: 13px; font-weight: 600; color: #991B1B; display: flex; align-items: center; gap: 7px; }
.alerts-title svg { color: var(--danger); width: 18px; height: 18px; }
.alerts-counter { font-size: 11px; color: #B91C1C; padding: 4px 8px; border-radius: 999px; background: rgba(254, 242, 242, 0.9); border: 1px solid rgba(239, 68, 68, 0.6); }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  background: #FEF2F2; border-radius: 10px; padding: 8px 10px;
  border-left: 3px solid var(--danger); border-right: 1px solid rgba(248, 113, 113, 0.4);
  border-top: 1px solid rgba(248, 113, 113, 0.3); border-bottom: 1px solid rgba(248, 113, 113, 0.3);
  display: flex; flex-direction: column; gap: 4px; transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.alert-item:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(248, 113, 113, 0.4); background: #FEE2E2; }
.alert-main-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alert-title { font-size: 12px; font-weight: 600; color: #991B1B; }
.alert-meta { font-size: 11px; color: #B91C1C; }
.alert-footer { font-size: 11px; color: #9F1239; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill-soft { padding: 3px 8px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; border: 1px dashed rgba(248, 113, 113, 0.7); background: rgba(254, 226, 226, 0.9); }
.link-soft { font-size: 11px; color: #1D4ED8; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.split-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; margin-top: 6px; }
.block { background: #FFFFFF; border-radius: var(--radius-md); padding: 12px 13px; border: 1px solid rgba(209, 213, 219, 0.8); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 10px; }
.block-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--text-soft); }
.block-title { font-size: 13px; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; }
.input-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9); background: #F9FAFB; font-size: 12px; color: var(--text-soft); min-width: 0;
}
.input-pill svg { width: 14px; height: 14px; color: #9CA3AF; flex-shrink: 0; }
.input-pill span { white-space: nowrap; }
.input-pill.labelled { background: #FFFFFF; }
.input-pill-label { font-size: 11px; color: var(--text-soft); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.12em; }
.search-main { flex: 1; min-width: 120px; }
.table-wrapper { margin-top: 6px; border-radius: 10px; border: 1px solid rgba(209, 213, 219, 0.9); overflow: hidden; background: #FFFFFF; }
.table-scroll { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; min-width: 640px; width: 100%; font-size: 12px; }
thead { background: #F3F4F6; }
th, td { padding: 8px 10px; text-align: left; white-space: nowrap; }
th { font-size: 11px; font-weight: 600; color: #6B7280; border-bottom: 1px solid #E5E7EB; }
tbody tr:nth-child(even) { background: #F9FAFB; }
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover { background: #EEF2FF; }
.status-badge { padding: 3px 8px; border-radius: 999px; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: #6B7280; }
.status-ok { background: rgba(34, 197, 94, 0.10); color: #166534; }
.status-ok .status-dot { background: radial-gradient(circle at 20% 0, #BBF7D0, #22C55E); }
.status-warning { background: rgba(250, 204, 21, 0.10); color: #854D0E; }
.status-warning .status-dot { background: radial-gradient(circle at 20% 0, #FEF9C3, #FACC15); }
.status-danger { background: rgba(239, 68, 68, 0.08); color: #991B1B; }
.status-danger .status-dot { background: radial-gradient(circle at 20% 0, #FECACA, #DC2626); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; background: #F3F4F6; font-size: 11px; color: #4B5563; }
.tag svg { width: 13px; height: 13px; color: #9CA3AF; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 12px; }
.field-label { font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.13em; margin-bottom: 2px; }
.field-value { font-weight: 500; }
.timeline { position: relative; padding-left: 16px; padding-top: 2px; margin-top: 4px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 0; width: 1px; background: linear-gradient(to bottom, #E5E7EB, #CBD5F5); }
.timeline-item { position: relative; padding-left: 8px; margin-bottom: 8px; }
.timeline-dot { position: absolute; left: -4px; top: 4px; width: 9px; height: 9px; border-radius: 999px; background: #FFFFFF; border: 2px solid #2563EB; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10); }
.timeline-title { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.timeline-meta { font-size: 11px; color: var(--text-soft); margin-bottom: 2px; }
.timeline-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; padding: 2px 6px; border-radius: 999px; background: #EFF6FF; color: #1D4ED8; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.attachment-pill { padding: 5px 8px; border-radius: 999px; background: #F3F4F6; border: 1px solid #E5E7EB; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #4B5563; }
.attachment-pill svg { width: 13px; height: 13px; color: #9CA3AF; }
.semaphore { display: inline-flex; align-items: center; gap: 2px; padding: 3px 5px; border-radius: 999px; border: 1px solid #E5E7EB; background: #F9FAFB; }
.sem-dot { width: 7px; height: 7px; border-radius: 999px; background: #6B7280; }
.sem-dot.green { background: #22C55E; }
.sem-dot.yellow { background: #FACC15; }
.sem-dot.red { background: #EF4444; }
.sem-label { font-size: 10px; color: #4B5563; margin-left: 4px; }
.cards-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric-card { background: #F9FAFB; border-radius: var(--radius-md); padding: 10px 11px; border: 1px solid #E5E7EB; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 6px; }
.metric-label { font-size: 11px; color: var(--text-soft); }
.metric-value { font-family: "Poppins", system-ui; font-weight: 600; font-size: 18px; }
.metric-footnote { font-size: 11px; color: var(--text-soft); }
.order-list-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.order-state { padding: 3px 7px; border-radius: 999px; border: 1px solid; }
.order-state.open { border-color: rgba(37, 99, 235, 0.6); color: #1D4ED8; background: #EFF6FF; }
.order-state.in-progress { border-color: rgba(234, 179, 8, 0.8); color: #854D0E; background: #FEF9C3; }
.order-state.closed { border-color: rgba(34, 197, 94, 0.6); color: #166534; background: #ECFDF5; }
.order-detail-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo-placeholder { background: #E5E7EB; border-radius: 10px; border: 1px dashed #D1D5DB; height: 80px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6B7280; }
.signature-box { border-radius: 10px; border: 1px dashed #CBD5E1; background: #F9FAFB; padding: 9px 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #4B5563; }
.signature-line { border-bottom: 1px solid #CBD5E1; margin-top: 6px; height: 18px; }
.pdf-preview { border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.6); background: linear-gradient(165deg, #F9FAFB, #E5E7EB); padding: 10px; box-shadow: 0 18px 45px rgba(148, 163, 184, 0.6); display: flex; flex-direction: column; gap: 8px; }
.pdf-header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-soft); }
.pdf-logo { width: 22px; height: 22px; border-radius: 8px; background: #111827; display: flex; align-items: center; justify-content: center; color: #E5E7EB; font-weight: 600; font-size: 11px; }
.pdf-body { border-radius: 9px; background: #FFFFFF; border: 1px solid #E5E7EB; padding: 8px 10px; font-size: 10px; color: #4B5563; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; }
.pdf-line { height: 7px; border-radius: 999px; background: #EEF2FF; margin-bottom: 3px; }
.pdf-line.short { width: 60%; }
.pdf-side-marks { display: flex; flex-direction: column; gap: 4px; }
.pdf-mark { height: 6px; border-radius: 999px; background: #E5E7EB; }
.pdf-footer { font-size: 9px; color: #9CA3AF; display: flex; justify-content: space-between; align-items: center; }
.pdf-footer-pill { border-radius: 999px; padding: 2px 6px; background: #111827; color: #E5E7EB; text-transform: uppercase; letter-spacing: 0.14em; }
.kardex-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 10px; }
.movement-list { display: flex; flex-direction: column; gap: 8px; }
.movement-item { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; font-size: 11px; padding: 6px 8px; border-radius: 10px; background: #F9FAFB; border: 1px solid #E5E7EB; }
.movement-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; padding: 3px 6px; border-radius: 999px; }
.movement-in { background: rgba(22, 163, 74, 0.10); color: #166534; }
.movement-out { background: rgba(37, 99, 235, 0.10); color: #1D4ED8; }
.movement-cal { background: rgba(234, 179, 8, 0.12); color: #854D0E; }
.compliance-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 10px; }
.compliance-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.compliance-badge { padding: 5px 8px; border-radius: 999px; border: 1px solid #E5E7EB; background: #F9FAFB; font-size: 11px; color: #4B5563; display: inline-flex; align-items: center; gap: 6px; }
.compliance-badge svg { width: 14px; height: 14px; color: #9CA3AF; }
.indicator-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.indicator-card { background: #FFFFFF; border-radius: var(--radius-md); border: 1px solid #E5E7EB; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-soft); }
.indicator-header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-soft); }
.indicator-value { font-family: "Poppins", system-ui; font-size: 18px; font-weight: 600; }
.indicator-meter { height: 7px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.indicator-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22C55E, #4ADE80); width: 92%; }
.indicator-meter.warn span { background: linear-gradient(90deg, #F97316, #FACC15); width: 76%; }
.indicator-meter.low span { background: linear-gradient(90deg, #EF4444, #FB7185); width: 48%; }
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .split-layout, .order-detail-grid, .kardex-grid, .compliance-grid { grid-template-columns: minmax(0, 1fr); }
  .kardex-grid > *:last-child, .compliance-grid > *:last-child { order: -1; }
}
@media (max-width: 992px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
  .sidebar-toggle-btn { display: inline-flex; }
  .topbar { margin-bottom: 12px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .alerts-panel { order: -1; }
  .cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .app-shell { background: #F5F7FA; }
  .main-shell { padding: 14px 12px 18px; }
  .screen { padding: 12px 11px 13px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-row { grid-template-columns: minmax(0, 1fr); }
  .gauge-row { grid-template-columns: minmax(0, 1fr); }
  .inline-grid { grid-template-columns: minmax(0, 1fr); }
  .order-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .indicator-row { grid-template-columns: minmax(0, 1fr); }
  .topbar-right { display: none; }
  .screen-header { flex-direction: column; align-items: flex-start; }
  .screen-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-title { font-size: 18px; }
}

.hidden { display: none !important; }

.login-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top left, rgba(229, 237, 255, 0.9), rgba(245, 247, 250, 0.95));
  backdrop-filter: blur(6px);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.login-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.login-title .t1 {
  font-family: "Poppins", system-ui;
  font-size: 18px;
  font-weight: 600;
}
.login-title .t2 {
  font-size: 12px;
  color: var(--text-soft);
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.input-text {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 10px;
  background: #F9FAFB;
  color: var(--text-main);
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.input-text:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background: #FFFFFF;
}
.login-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.error-text {
  color: #B91C1C;
  font-size: 12px;
  display: none;
}
.error-text.show { display: block; }
.login-foot {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #E5E7EB;
}
.cred-pill {
  padding: 4px 7px;
  border: 1px dashed rgba(148, 163, 184, 0.8);
  border-radius: 999px;
  font-size: 11px;
  color: #4B5563;
  background: #F9FAFB;
}
