:root {
  --brand-primary: #0b2e59;
  --brand-primary-700: #08213f;
  --brand-primary-50: #eaf1f8;
  --brand-accent: #10b981;
  --brand-supporting: #0f766e;
  --brand-info: #2563eb;
  --brand-warning: #d97706;
  --brand-danger: #dc2626;
  --brand-success: #059669;
  --surface-page: #f5f7fa;
  --surface-card: #ffffff;
  --surface-muted: #eef3f8;
  --text-strong: #142033;
  --text-muted: #64748b;
  --border-soft: #dbe4ee;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.11);
  --sidebar-width: 292px;
  --sidebar-collapsed: 86px;
  --topbar-height: 72px;
  --radius-sm: 6px;
  --radius-md: 8px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Manrope, "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-strong);
  background: var(--surface-page);
  letter-spacing: 0;
}

body, button, input, select, textarea { font-size: 15px; }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-supporting); }

p { margin: 0; color: var(--text-muted); line-height: 1.55; }

h1, h2, h3, h4, h5 { color: var(--text-strong); letter-spacing: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) 1fr; }

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #0b2e59 0%, #0a274c 54%, #08213f 100%);
  color: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
  z-index: 1020;
}

.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 18px; }

.brand-lockup { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand-lockup:hover { color: #fff; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-accent), #38bdf8 58%, #ffffff 58%);
  color: var(--brand-primary-700);
  font-weight: 900;
  font-size: 0.88rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.34);
}

.brand-mark-lg { width: 62px; height: 62px; font-size: 1.1rem; }
.brand-logo, .login-brand-logo { max-height: 44px; max-width: 180px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-name { color: #fff; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-edition { color: rgba(255,255,255,0.68); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; }

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-strong);
  display: inline-grid;
  place-items: center;
  padding: 0;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-button:hover { background: var(--brand-primary-50); color: var(--brand-primary); border-color: #cbd8e6; }
.icon-button:focus-visible, .btn:focus-visible, .sidebar-link:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.sidebar-collapse { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.12); }
.sidebar-collapse:hover { background: rgba(255,255,255,.17); color: #fff; }

.sidebar-nav { display: flex; flex-direction: column; gap: 16px; }
.sidebar-section { display: flex; flex-direction: column; gap: 4px; }
.sidebar-section-title { color: rgba(255,255,255,.48); font-size: .71rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 0 12px 4px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.79);
  font-weight: 650;
  white-space: nowrap;
}
.sidebar-link i { width: 20px; text-align: center; font-size: 1.04rem; }
.sidebar-link:hover, .sidebar-link.active { color: #fff; background: rgba(255,255,255,.12); }
.sidebar-link.active { box-shadow: inset 3px 0 0 var(--brand-accent); }
.disabled-link { cursor: not-allowed; opacity: .68; }
.nav-badge, .nav-count {
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.82);
  padding: 2px 7px;
  font-size: .68rem;
  font-weight: 800;
}
.nav-count { background: var(--brand-warning); color: #fff; }
.nav-count.danger { background: var(--brand-danger); }

.app-content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1010;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(14px);
}
.mobile-menu { display: none; }
.topbar-context { min-width: 150px; display: flex; flex-direction: column; line-height: 1.15; }
.context-label { color: var(--text-muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.global-search { flex: 1; min-width: 220px; max-width: 620px; position: relative; }
.global-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.global-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0 14px 0 40px;
  background: #f8fafc;
  color: var(--text-strong);
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-create { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.utility-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-warning); position: absolute; margin-top: -18px; margin-left: 16px; }
.env-badge { display: inline-flex; align-items: center; height: 28px; border-radius: 999px; padding: 0 10px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.user-button { border: 0; background: transparent; display: flex; align-items: center; gap: 9px; padding: 4px; color: var(--text-strong); }
.user-avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--brand-primary); color: #fff; font-weight: 800; }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.user-meta small { color: var(--text-muted); }

.app-main { padding: 28px; flex: 1; min-width: 0; }
.public-main { min-height: 100vh; }
.message-stack { margin-bottom: 18px; }

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid #d8e2ec;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eaf7f4 100%);
  box-shadow: var(--shadow-sm);
}
.operations-hero { min-height: 178px; }
.compact-hero { min-height: 142px; }
.page-hero h1 { margin: 3px 0 8px; font-size: clamp(1.65rem, 2.3vw, 2.45rem); font-weight: 850; }
.page-hero p:not(.eyebrow) { max-width: 760px; }
.eyebrow { color: var(--brand-supporting); font-size: .73rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.btn { border-radius: var(--radius-sm); font-weight: 750; }
.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover { background: var(--brand-primary-700); border-color: var(--brand-primary-700); }
.btn-outline-primary { border-color: #b7c7da; color: var(--brand-primary); }
.btn-outline-primary:hover { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-success { background: var(--brand-success); border-color: var(--brand-success); }

.attention-strip, .kpi-grid, .dashboard-grid, .module-status-grid { display: grid; gap: 16px; }
.attention-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.attention-item { display: flex; align-items: center; gap: 12px; min-height: 82px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--border-soft); padding: 16px; box-shadow: var(--shadow-sm); }
.attention-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; }
.attention-item strong { display: block; font-size: 1.35rem; color: var(--text-strong); }
.attention-item span:last-child { color: var(--text-muted); font-size: .88rem; }
.attention-item.critical .attention-icon { background: #fef2f2; color: var(--brand-danger); }
.attention-item.warning .attention-icon { background: #fffbeb; color: var(--brand-warning); }
.attention-item.success .attention-icon { background: #ecfdf5; color: var(--brand-success); }
.attention-item.neutral .attention-icon { background: var(--brand-primary-50); color: var(--brand-primary); }

.kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi-card { display: flex; align-items: center; gap: 14px; min-height: 122px; padding: 18px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--surface-card); box-shadow: var(--shadow-sm); }
.kpi-icon { width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; font-size: 1.25rem; }
.kpi-card p { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.kpi-card strong { display: block; font-size: 2rem; line-height: 1.05; margin: 3px 0; }
.kpi-card small { color: var(--text-muted); font-weight: 650; }
.accent-blue .kpi-icon { background: #eff6ff; color: var(--brand-info); }
.accent-green .kpi-icon { background: #ecfdf5; color: var(--brand-success); }
.accent-teal .kpi-icon { background: #e7f8f5; color: var(--brand-supporting); }
.accent-amber .kpi-icon { background: #fffbeb; color: var(--brand-warning); }
.accent-slate .kpi-icon { background: #f1f5f9; color: #475569; }

.dashboard-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.premium-card { background: var(--surface-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; min-width: 0; }
.slim-card { padding: 14px 18px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-heading h2 { font-size: 1.08rem; margin: 2px 0 0; font-weight: 850; }
.card-heading.compact { margin-bottom: 14px; }

.pipeline-grid { display: grid; gap: 16px; }
.pipeline-label { display: flex; justify-content: space-between; color: var(--text-muted); font-weight: 750; margin-bottom: 7px; }
.pipeline-label strong { color: var(--text-strong); }
.pipeline-track { height: 12px; border-radius: 999px; background: #edf2f7; overflow: hidden; }
.pipeline-track span { display: block; width: var(--bar-size); max-width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent)); }
.pipeline-step.muted .pipeline-track span { background: #94a3b8; }

.availability-summary { display: flex; align-items: center; gap: 22px; }
.availability-ring { width: 132px; height: 132px; border-radius: 999px; background: conic-gradient(var(--brand-accent) calc(var(--available) * 1%), #e2e8f0 0); display: grid; place-items: center; flex: 0 0 auto; }
.availability-ring::before { content: ""; width: 88px; height: 88px; border-radius: inherit; background: #fff; position: absolute; }
.availability-ring span { position: relative; font-size: 1.55rem; font-weight: 900; color: var(--brand-primary); }
.availability-list { display: grid; gap: 10px; flex: 1; }
.availability-list div { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.availability-list strong { margin-left: auto; color: var(--text-strong); }
.legend-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.legend-dot.green { background: var(--brand-accent); }
.legend-dot.blue { background: var(--brand-info); }
.legend-dot.amber { background: var(--brand-warning); }

.status-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 850; border: 1px solid transparent; white-space: nowrap; }
.status-success, .status-available, .status-c { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.status-info, .status-o { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-warning, .status-p { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.status-danger, .status-r { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.status-muted, .status-planned { background: #f1f5f9; color: #475569; border-color: #dbe4ee; }
.reference-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border-radius: 999px; padding: 4px 8px; background: #eef6ff; color: var(--brand-primary); font-weight: 800; }
.muted-text { color: var(--text-muted); }

.enterprise-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.enterprise-table th { color: #475569; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; background: #f8fafc; border-bottom: 1px solid var(--border-soft); padding: 12px 14px; }
.enterprise-table td { border-bottom: 1px solid #edf2f7; padding: 13px 14px; vertical-align: middle; }
.enterprise-table tbody tr:hover { background: #fbfdff; }
.enterprise-table tbody tr:last-child td { border-bottom: 0; }
.table-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.table-action { width: 34px; height: 34px; }
.table-action.primary { color: var(--brand-primary); }
.table-action.success { color: var(--brand-success); }
.table-action.danger { color: var(--brand-danger); }
.table-action:disabled { opacity: .54; cursor: not-allowed; }
.inline-action-form { display: flex; gap: 8px; align-items: center; min-width: 290px; }
.inline-action-form .form-select { max-width: 130px; }

.planned-panel { min-height: 190px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; color: var(--text-muted); background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: var(--radius-md); padding: 20px; }
.planned-panel i { color: var(--brand-supporting); font-size: 1.6rem; }
.planned-panel strong { color: var(--text-strong); }
.planned-panel.subtle i { color: var(--brand-warning); }
.metric-stack { display: grid; gap: 10px; }
.metric-stack div { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; background: #fbfdff; }
.metric-stack span { color: var(--text-muted); }
.metric-stack strong { color: var(--text-strong); }
.system-health-list, .activity-list { display: grid; gap: 10px; }
.system-health-list a, .activity-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; background: #fbfdff; }
.system-health-list i, .activity-icon { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: #ecfdf5; color: var(--brand-supporting); }
.system-health-list strong { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; }
.activity-item div { display: flex; flex-direction: column; }
.activity-item span:last-child { color: var(--text-muted); font-size: .85rem; }
.empty-state, .empty-state-card { display: grid; place-items: center; text-align: center; gap: 8px; color: var(--text-muted); }
.empty-state i { font-size: 2rem; color: var(--brand-supporting); }
.empty-state strong { color: var(--text-strong); }
.empty-state.compact { min-height: 110px; }
.empty-state-card { min-height: 260px; }

.module-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.module-status-card { display: flex; flex-direction: column; gap: 10px; min-height: 168px; }
.module-card-top { display: flex; justify-content: space-between; align-items: center; }
.module-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-primary-50); color: var(--brand-primary); }
.module-status-card h2 { font-size: 1rem; margin: 0; }
.module-status-card code { width: fit-content; color: var(--brand-primary); background: #eef6ff; padding: 3px 7px; border-radius: 999px; }

.workspace-toolbar strong { font-size: 1.35rem; margin-right: 8px; }
.workspace-tabs { gap: 8px; border-bottom: 1px solid var(--border-soft); padding-bottom: 14px; }
.workspace-tabs .nav-link { border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 800; }
.workspace-tabs .nav-link.active { background: var(--brand-primary); color: #fff; }
.workspace-card { padding-top: 16px; }

.form-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.enterprise-form { display: grid; gap: 16px; }
.enterprise-form .form-control, .enterprise-form .form-select, .login-form input, input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  min-height: 42px;
}
.enterprise-form .form-control:focus, .enterprise-form .form-select:focus, .login-form input:focus, input:focus, select:focus, textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.side-note-card { position: sticky; top: calc(var(--topbar-height) + 20px); }
.check-list { display: grid; gap: 10px; margin-top: 14px; }
.check-list span { display: flex; gap: 8px; align-items: center; color: var(--text-muted); }
.check-list i { color: var(--brand-success); }

.login-body { min-height: 100vh; background: var(--brand-primary-700); }
.login-body::before { content: ""; position: fixed; inset: 0; background: var(--login-bg-image), linear-gradient(135deg, #081f3f 0%, #0b2e59 45%, #0f766e 100%); background-size: cover; background-position: center; opacity: 1; }
.login-shell { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: center; padding: 48px clamp(24px, 6vw, 86px); }
.login-brand-panel { color: #fff; max-width: 760px; }
.login-brand-lockup { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.login-brand-panel .eyebrow { color: #a7f3d0; margin-bottom: 6px; }
.login-brand-panel h1 { color: #fff; font-size: clamp(2rem, 5vw, 4.8rem); line-height: .98; margin: 0; max-width: 760px; }
.login-brand-panel h2 { color: rgba(255,255,255,.78); font-size: clamp(1rem, 2vw, 1.45rem); margin: 10px 0 0; }
.login-tagline { color: rgba(255,255,255,.82); font-size: 1.2rem; max-width: 520px; margin-bottom: 28px; }
.login-signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin-bottom: 30px; }
.login-signal-grid span { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-md); background: rgba(255,255,255,.08); color: rgba(255,255,255,.92); }
.powered-by { color: rgba(255,255,255,.68); }
.login-card { background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 30px; }
.login-card-header { margin-bottom: 24px; }
.login-card h3 { font-size: 1.65rem; margin: 14px 0 4px; }
.login-form { display: grid; gap: 18px; }
.form-field label { display: block; color: var(--text-strong); font-weight: 800; margin-bottom: 7px; }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-with-icon input { width: 100%; padding: 11px 12px 11px 40px; background: #fff; }

.app-shell.sidebar-collapsed { grid-template-columns: var(--sidebar-collapsed) 1fr; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .sidebar-section-title, .sidebar-collapsed .sidebar-link span:not(.nav-count):not(.nav-badge), .sidebar-collapsed .nav-badge, .sidebar-collapsed .nav-count { display: none; }
.sidebar-collapsed .sidebar-brand { justify-content: center; }
.sidebar-collapsed .sidebar-collapse { display: none; }
.sidebar-collapsed .sidebar-link { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-collapsed .sidebar-link.active { box-shadow: inset 0 -3px 0 var(--brand-accent); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #b7c4d4; border-radius: 999px; }
::-webkit-scrollbar-track { background: #eef3f8; }
body { scrollbar-width: thin; scrollbar-color: #b7c4d4 #eef3f8; }

@media (max-width: 1280px) {
  .attention-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-4, .span-8 { grid-column: span 6; }
}

@media (max-width: 991px) {
  .app-shell, .app-shell.sidebar-collapsed { display: block; }
  .app-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px); height: 100vh; transform: translateX(-105%); transition: transform .22s ease; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(8, 20, 37, .48); z-index: 1015; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .mobile-menu { display: inline-grid; }
  .sidebar-collapse { display: none; }
  .app-topbar { padding: 0 14px; gap: 10px; }
  .global-search { display: none; }
  .topbar-context { min-width: 0; }
  .user-meta, .topbar-create span { display: none; }
  .app-main { padding: 18px; }
  .page-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .hero-actions { justify-content: flex-start; }
  .kpi-grid, .attention-strip, .module-status-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-4, .span-8, .span-12 { grid-column: span 1; }
  .form-workspace, .login-shell { grid-template-columns: 1fr; }
  .side-note-card { position: static; }
  .login-shell { padding: 28px 18px; }
  .login-brand-panel { max-width: none; }
  .login-signal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body, button, input, select, textarea { font-size: 14px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .icon-button:nth-of-type(2) { display: none; }
  .env-badge { display: none; }
  .page-hero h1 { font-size: 1.55rem; }
  .attention-item, .kpi-card { min-height: auto; }
  .availability-summary { flex-direction: column; align-items: flex-start; }
  .inline-action-form { min-width: 0; flex-wrap: wrap; }
  .inline-action-form .form-select { max-width: none; flex: 1 1 160px; }
  .login-card { padding: 22px; }
}
