:root {
  --navy: #161441;
  --navy-2: #211f55;
  --navy-3: #2d2a68;
  --orange: #ee4037;
  --ink: #20202a;
  --muted: #656577;
  --surface: #f3f3f6;
  --surface-2: #eaeaef;
  --warm: #fff3f1;
  --border: #d9d9e2;
  --white: #ffffff;
  --critical: #b42318;
  --critical-bg: #fef3f2;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --success: #027a48;
  --success-bg: #ecfdf3;
  --info: #175cd3;
  --info-bg: #eff8ff;
  --shadow: 0 18px 45px rgba(22, 20, 65, 0.12);
  --shadow-soft: 0 8px 24px rgba(22, 20, 65, 0.08);
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-width: 252px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Barlow", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

::selection { color: var(--white); background: var(--orange); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #aaaabd; border: 3px solid var(--surface); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #85859a; }

:focus-visible {
  outline: 3px solid rgba(238, 64, 55, 0.4);
  outline-offset: 3px;
}

.icon-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
#i-grid path { fill: currentColor; stroke: none; }
.icon-flip { transform: rotate(180deg); }
.is-hidden { display: none !important; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  padding: 0 19px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background 160ms ease, box-shadow 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: var(--white); background: var(--navy); box-shadow: 0 7px 18px rgba(22, 20, 65, 0.2); }
.button-primary:hover { background: var(--navy-2); box-shadow: 0 10px 24px rgba(22, 20, 65, 0.24); }
.button-dark { color: var(--white); background: var(--navy); }
.button-dark:hover { background: var(--navy-2); }
.button-ghost { color: var(--navy); background: var(--surface); border: 1px solid var(--border); }
.button-ghost:hover { background: var(--surface-2); }
.button-danger { color: var(--white); background: var(--critical); }
.button-full { width: 100%; }
.button[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease;
}
.icon-button:hover { background: var(--surface); }

/* Landing */
.landing-view { min-height: 100vh; overflow: hidden; }
.landing-header {
  width: min(1400px, calc(100% - 64px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand-lockup { display: inline-flex; align-items: center; gap: 17px; text-decoration: none; color: var(--navy); }
.brand-lockup img { width: 190px; height: auto; display: block; }
.brand-lockup > span { width: 1px; height: 28px; background: var(--border); }
.brand-lockup strong { font-size: 15px; letter-spacing: 0.01em; }
.landing-nav { display: flex; align-items: center; gap: 30px; }
.landing-nav a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.landing-nav a:hover { color: var(--navy); }

.hero {
  width: min(1400px, calc(100% - 64px));
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(500px, 0.92fr);
  gap: 80px;
  align-items: center;
  padding: 76px 0 84px;
}
.hero-copy { max-width: 760px; }
.hero h1 {
  max-width: 750px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(58px, 6vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero-copy > p { max-width: 660px; margin: 32px 0 0; color: var(--muted); font-size: 21px; line-height: 1.5; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 36px; }
.hero-actions .button { min-height: 52px; padding-inline: 23px; }
.text-link { color: var(--navy); font-weight: 700; text-decoration-color: rgba(22, 20, 65, 0.35); text-underline-offset: 6px; }
.text-link:hover { text-decoration-color: var(--orange); }
.trust-line { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 46px; color: var(--muted); font-size: 13px; font-weight: 600; }
.trust-line span { display: inline-flex; align-items: center; gap: 8px; }
.trust-line span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

.operations-preview {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 28px 65px rgba(22, 20, 65, 0.25);
  overflow: hidden;
}
.preview-topbar, .preview-alert, .funnel, .preview-list, .synthetic-label { position: relative; z-index: 1; }
.preview-topbar { display: flex; align-items: flex-start; justify-content: space-between; padding: 3px 2px 17px; }
.preview-topbar strong, .preview-topbar small { display: block; }
.preview-topbar strong { font-size: 17px; }
.preview-topbar small { margin-top: 2px; color: #c8c7db; font-size: 12px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #ffd9d6; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(238,64,55,.16); animation: signal 2s ease-out infinite; }
@keyframes signal { 0%, 100% { box-shadow: 0 0 0 4px rgba(238,64,55,.16); } 50% { box-shadow: 0 0 0 9px rgba(238,64,55,0); } }
.preview-alert { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 18px; color: var(--ink); background: var(--white); border-radius: 12px; }
.alert-glyph { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; color: var(--critical); background: var(--critical-bg); }
.preview-alert small, .preview-alert strong, .preview-alert span { display: block; }
.preview-alert small { color: var(--critical); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.preview-alert strong { margin-top: 2px; font-size: 15px; }
.preview-alert span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.preview-alert b { color: var(--critical); font-size: 28px; font-variant-numeric: tabular-nums; }
.funnel { display: grid; grid-template-columns: 1fr 20px 1fr 20px 1fr; align-items: center; margin-top: 13px; padding: 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.06); }
.funnel div { text-align: center; }
.funnel b, .funnel span { display: block; }
.funnel b { font-size: 21px; font-variant-numeric: tabular-nums; }
.funnel span { color: #c8c7db; font-size: 11px; }
.funnel i { height: 1px; background: rgba(255,255,255,.24); }
.preview-list { display: grid; gap: 8px; margin-top: 13px; }
.preview-list article { display: grid; grid-template-columns: 9px 1fr 20px; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 9px; background: rgba(255,255,255,.07); }
.preview-list strong, .preview-list small { display: block; }
.preview-list strong { font-size: 13px; }
.preview-list small { margin-top: 1px; color: #c8c7db; font-size: 11px; }
.preview-list .icon { width: 16px; opacity: .6; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; }
.state-danger { background: #ff817a; }
.state-warning { background: #fdb022; }
.state-success { background: #32d583; }
.synthetic-label { margin: 16px 2px 0; color: #9e9cb9; font-size: 9px; font-weight: 800; letter-spacing: .12em; }

.capability-band { width: min(1400px, calc(100% - 64px)); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.capability-band article { padding: 48px 44px 52px 0; }
.capability-band article + article { padding-left: 44px; border-left: 1px solid var(--border); }
.capability-band .icon { width: 28px; height: 28px; color: var(--orange); }
.capability-band h2 { margin: 20px 0 10px; color: var(--navy); font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.capability-band p { max-width: 36ch; margin: 0; color: var(--muted); }

.ownership-section { width: min(1400px, calc(100% - 64px)); margin: 0 auto; display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; padding: 110px 0; }
.ownership-section h2 { margin: 0; color: var(--navy); font-size: 54px; line-height: 1.03; letter-spacing: -.035em; }
.ownership-copy > p { max-width: 720px; margin: 0; color: var(--muted); font-size: 20px; }
.ownership-copy dl { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; margin: 45px 0 0; }
.ownership-copy dl > div { padding-top: 18px; border-top: 3px solid var(--orange); }
.ownership-copy dt { color: var(--navy); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ownership-copy dd { margin: 6px 0 0; color: var(--muted); }
.landing-footer { width: min(1400px, calc(100% - 64px)); margin: 0 auto; padding: 28px 0 38px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.landing-footer img { width: 150px; height: auto; }

/* Login */
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); }
.login-brand-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 50px 64px; color: var(--white); background: var(--navy); }
.login-brand-panel > img { width: 210px; height: auto; }
.login-brand-panel > div { max-width: 610px; }
.login-brand-panel h1 { margin: 0; font-size: clamp(48px, 5vw, 76px); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.login-brand-panel div p { max-width: 560px; margin: 26px 0 0; color: #c8c7db; font-size: 20px; }
.login-brand-panel > p { color: #9e9cb9; font-size: 12px; font-weight: 600; }
.back-button { width: max-content; display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; color: #d8d7e6; background: transparent; cursor: pointer; }
.login-form-panel { min-height: 100vh; display: grid; place-items: center; padding: 48px; background: var(--surface); }
.login-form { width: min(100%, 470px); padding: 44px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.login-form h2 { margin: 30px 0 4px; color: var(--navy); font-size: 30px; letter-spacing: -.025em; }
.login-form > p { margin: 0 0 28px; color: var(--muted); }
.demo-notice { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 9px; color: var(--info); background: var(--info-bg); }
.demo-notice .icon { width: 23px; height: 23px; }
.demo-notice span, .demo-notice strong { display: block; }
.demo-notice span { font-size: 13px; }
.login-form > label, .dialog-body > label, .form-grid label { display: grid; gap: 7px; margin-top: 17px; color: var(--navy); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #c9c9d4; border-radius: 8px; color: var(--ink); background: var(--white); transition: border 140ms ease, box-shadow 140ms ease; }
input, select { height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(22,20,65,.1); }
.login-meta { margin: 18px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.check-label { display: inline-flex !important; align-items: center; grid-template-columns: 18px 1fr; gap: 9px !important; margin: 0 !important; color: var(--muted) !important; font-weight: 500 !important; }
.check-label input { width: 17px; height: 17px; margin: 0; accent-color: var(--navy); }
.login-form > small { display: block; margin-top: 17px; color: var(--muted); text-align: center; }

/* App shell */
.app-view { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) 1fr; background: var(--surface); }
.sidebar { position: sticky; top: 0; height: 100vh; z-index: 30; display: flex; flex-direction: column; padding: 24px 16px 16px; color: var(--white); background: var(--navy); }
.sidebar-brand { display: grid; gap: 16px; padding: 0 12px 25px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-brand img { width: 184px; max-width: 100%; height: auto; }
.sidebar-brand span { color: #c8c7db; font-size: 12px; font-weight: 600; }
.sidebar nav { display: grid; gap: 3px; margin-top: 22px; overflow-y: auto; }
.nav-item { min-height: 44px; display: grid; grid-template-columns: 21px 1fr auto; gap: 12px; align-items: center; padding: 0 12px; border: 0; border-radius: 8px; color: #c8c7db; background: transparent; text-align: left; cursor: pointer; transition: color 140ms ease, background 140ms ease; }
.nav-item:hover { color: var(--white); background: rgba(255,255,255,.07); }
.nav-item.is-active { color: var(--white); background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 var(--orange); }
.nav-item span { font-size: 14px; font-weight: 600; }
.nav-item b { min-width: 22px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 10px; color: var(--white); background: rgba(238,64,55,.8); font-size: 11px; font-variant-numeric: tabular-nums; }
.sidebar-profile { margin-top: auto; display: grid; grid-template-columns: 36px 1fr 32px; gap: 10px; align-items: center; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-profile > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--navy); background: var(--white); font-size: 12px; font-weight: 800; }
.sidebar-profile strong, .sidebar-profile small { display: block; }
.sidebar-profile strong { font-size: 12px; }
.sidebar-profile small { color: #9e9cb9; font-size: 10px; }
.sidebar-profile button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; color: #c8c7db; background: transparent; cursor: pointer; }
.sidebar-profile .icon { width: 18px; }
.app-shell { min-width: 0; }
.app-topbar { height: 68px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); }
.environment-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.environment-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.topbar-actions { display: flex; align-items: center; gap: 5px; }
.notification-button { position: relative; }
.notification-button i { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border: 2px solid var(--white); border-radius: 50%; background: var(--orange); }
.avatar-button { width: 38px; height: 38px; margin-left: 6px; border: 0; border-radius: 9px; color: var(--white); background: var(--navy); font-size: 12px; font-weight: 800; cursor: pointer; }
.mobile-menu { display: none; }
.screen-content { width: min(1460px, 100%); margin: 0 auto; padding: 32px 34px 60px; }

.screen-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.screen-title h1 { margin: 0; color: var(--navy); font-size: 32px; line-height: 1.08; letter-spacing: -.03em; }
.screen-title p { margin: 7px 0 0; color: var(--muted); }
.screen-actions { display: flex; gap: 10px; }
.screen-actions .button { white-space: nowrap; }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 11px 15px; border-radius: 9px; color: #7a2e0e; background: var(--warning-bg); font-size: 13px; }
.demo-banner strong { font-weight: 800; }
.demo-banner button { padding: 0; border: 0; color: inherit; background: transparent; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); box-shadow: 0 6px 18px rgba(22,20,65,.04); overflow: hidden; }
.summary-item { min-width: 0; padding: 20px 22px; }
.summary-item + .summary-item { border-left: 1px solid var(--border); }
.summary-item span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.summary-item strong { display: block; margin-top: 8px; color: var(--navy); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-item small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.summary-item .metric-danger { color: var(--critical); }
.summary-item .metric-success { color: var(--success); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 22px; }
.stack { display: grid; align-content: start; gap: 22px; }
.panel { border-radius: var(--radius); background: var(--white); box-shadow: 0 5px 20px rgba(22,20,65,.05); }
.panel-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin: 0; color: var(--navy); font-size: 17px; }
.panel-header a, .panel-header button.link-button { padding: 0; border: 0; color: var(--navy); background: transparent; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.active-alert { padding: 20px; }
.alert-heading { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: start; }
.alert-heading h3 { margin: 0; color: var(--navy); font-size: 20px; }
.alert-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.status-pill { width: max-content; display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 0 9px; border-radius: 13px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill-critical { color: var(--critical); background: var(--critical-bg); }
.pill-warning { color: var(--warning); background: var(--warning-bg); }
.pill-success { color: var(--success); background: var(--success-bg); }
.pill-info { color: var(--info); background: var(--info-bg); }
.pill-neutral { color: var(--muted); background: var(--surface); }
.ack-bar { margin-top: 24px; }
.ack-bar-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.ack-bar-top span { color: var(--muted); font-size: 12px; }
.ack-bar-top strong { color: var(--navy); font-size: 24px; font-variant-numeric: tabular-nums; }
.progress-track { height: 9px; overflow: hidden; border-radius: 5px; background: var(--surface-2); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.alert-funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 20px; background: var(--border); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.alert-funnel div { padding: 13px; background: var(--surface); }
.alert-funnel b, .alert-funnel span { display: block; }
.alert-funnel b { color: var(--navy); font-size: 17px; font-variant-numeric: tabular-nums; }
.alert-funnel span { color: var(--muted); font-size: 11px; }
.alert-actions { display: flex; gap: 9px; margin-top: 18px; }
.alert-actions .button { min-height: 38px; font-size: 12px; }

.attention-list, .activity-list { list-style: none; margin: 0; padding: 0; }
.attention-list li, .activity-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 15px 20px; }
.attention-list li + li, .activity-list li + li { border-top: 1px solid var(--border); }
.attention-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 8px; }
.attention-icon .icon { width: 18px; }
.attention-list strong, .attention-list small, .activity-list strong, .activity-list small { display: block; }
.attention-list strong, .activity-list strong { color: var(--navy); font-size: 13px; }
.attention-list small, .activity-list small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.attention-list button { width: 28px; height: 28px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.activity-list li { grid-template-columns: 9px 1fr auto; align-items: start; }
.activity-time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.search-control { min-width: 290px; height: 42px; position: relative; }
.search-control .icon { position: absolute; left: 12px; top: 11px; width: 18px; color: var(--muted); }
.search-control input { height: 42px; padding-left: 39px; background: var(--white); }
.filter-select { width: auto; min-width: 150px; height: 42px; background: var(--white); }
.toolbar .button { min-height: 42px; font-size: 13px; }
.table-panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); box-shadow: 0 5px 20px rgba(22,20,65,.04); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { height: 44px; padding: 0 16px; color: var(--muted); background: #f8f8fa; font-size: 10px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td { height: 52px; padding: 8px 16px; border-top: 1px solid var(--border); color: #3f3f4a; white-space: nowrap; font-variant-numeric: tabular-nums; }
td strong { color: var(--navy); }
tbody tr { cursor: pointer; transition: background 120ms ease; }
tbody tr:hover { background: #fafafd; }
tbody tr:focus-visible { outline-offset: -3px; }
.table-empty { padding: 44px 20px; color: var(--muted); text-align: center; }
.row-main { display: grid; gap: 2px; }
.row-main small { color: var(--muted); }
.table-footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.table-pagination { display: flex; gap: 5px; }
.table-pagination button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; color: var(--navy); background: var(--white); cursor: pointer; }
.table-pagination button.is-active { color: var(--white); background: var(--navy); border-color: var(--navy); }
.segmented { width: max-content; display: flex; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.segmented button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.segmented button.is-active { color: var(--navy); background: var(--white); box-shadow: 0 3px 10px rgba(22,20,65,.08); }

.facility-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .72fr); gap: 22px; }
.site-map { min-height: 520px; position: relative; overflow: hidden; border-radius: var(--radius); color: var(--white); background: var(--navy); box-shadow: var(--shadow-soft); }
.site-map::before, .site-map::after { content: ""; position: absolute; inset: 0; }
.site-map::before { opacity: .22; background-image: linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px); background-size: 48px 48px; }
.site-map::after { inset: 72px 30px 40px; border: 2px solid rgba(238,64,55,.65); border-radius: 48% 52% 42% 58%; transform: rotate(-8deg); }
.map-head { position: relative; z-index: 2; display: flex; justify-content: space-between; padding: 20px; }
.map-head h2 { margin: 0; font-size: 18px; }
.map-head span { color: #c8c7db; font-size: 11px; }
.map-node { position: absolute; z-index: 3; display: grid; grid-template-columns: 31px 1fr; gap: 9px; align-items: center; padding: 9px 11px; border-radius: 9px; color: var(--ink); background: var(--white); box-shadow: var(--shadow-soft); }
.map-node i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: var(--white); background: var(--orange); font-style: normal; font-size: 10px; font-weight: 800; }
.map-node strong, .map-node small { display: block; }
.map-node strong { font-size: 11px; }
.map-node small { color: var(--muted); font-size: 9px; }
.node-1 { top: 24%; left: 12%; }
.node-2 { top: 47%; right: 9%; }
.node-3 { bottom: 13%; left: 22%; }
.node-4 { top: 31%; left: 47%; }
.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; }
.settings-nav, .settings-panel { border-radius: var(--radius); background: var(--white); box-shadow: 0 5px 20px rgba(22,20,65,.04); }
.settings-nav { padding: 10px; }
.settings-nav button { width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.settings-nav button.is-active { color: var(--navy); background: var(--surface); }
.settings-panel { padding: 24px; }
.settings-panel h2 { margin: 0; color: var(--navy); font-size: 20px; }
.settings-panel > p { margin: 5px 0 24px; color: var(--muted); }
.setting-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { color: var(--navy); font-size: 14px; }
.setting-row small { margin-top: 3px; color: var(--muted); }
.toggle { width: 44px; height: 24px; position: relative; border: 0; border-radius: 12px; background: #b9b9c6; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: transform 150ms ease; }
.toggle.is-on { background: var(--navy); }
.toggle.is-on::after { transform: translateX(20px); }

/* Dialog and drawer */
.dialog { width: min(640px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 90px rgba(22,20,65,.32); }
.dialog::backdrop { background: rgba(15,14,43,.62); }
.dialog form { margin: 0; }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 22px; }
.dialog-header { border-bottom: 1px solid var(--border); }
.dialog-header small { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.dialog-header h2 { margin: 2px 0 0; color: var(--navy); font-size: 23px; }
.dialog-body { padding: 4px 22px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.audience-preview { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 13px 14px; border-radius: 9px; color: var(--navy); background: var(--surface); }
.audience-preview .icon { color: var(--orange); }
.audience-preview span { font-size: 13px; }
.dialog-actions { border-top: 1px solid var(--border); background: #fafafd; }
.dialog-actions .button { min-height: 40px; }
.detail-drawer { width: min(470px, 100%); height: 100vh; position: fixed; top: 0; right: 0; z-index: 80; visibility: hidden; pointer-events: none; transform: translateX(105%); color: var(--ink); background: var(--white); box-shadow: -20px 0 60px rgba(22,20,65,.2); transition: transform 220ms var(--ease), visibility 0s linear 220ms; }
.detail-drawer.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(15,14,43,.45); }
.drawer-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-header small { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.drawer-header h2 { margin: 2px 0 0; color: var(--navy); font-size: 23px; }
.drawer-content { height: calc(100vh - 86px); overflow-y: auto; padding: 22px; }
.drawer-hero { padding: 18px; border-radius: 11px; background: var(--surface); }
.drawer-hero p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.detail-list { margin: 22px 0; }
.detail-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 0; color: var(--navy); font-size: 13px; font-weight: 600; }
.drawer-section { margin-top: 26px; }
.drawer-section h3 { margin: 0 0 10px; color: var(--navy); font-size: 15px; }
.drawer-section p { margin: 0; color: var(--muted); font-size: 13px; }
.drawer-actions { display: flex; gap: 9px; margin-top: 24px; }
.drawer-actions .button { min-height: 40px; font-size: 12px; }
.toast { min-width: 290px; position: fixed; left: 50%; bottom: 24px; z-index: 100; visibility: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, 150%); padding: 14px 18px; border-radius: 9px; color: var(--white); background: var(--navy); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; text-align: center; transition: transform 220ms var(--ease), opacity 160ms ease, visibility 0s linear 220ms; }
.toast.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition-delay: 0s; }

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { max-width: 900px; }
  .operations-preview { width: min(100%, 720px); }
  .dashboard-grid, .facility-layout { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .summary-item:nth-child(4) { border-top: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .landing-header, .hero, .capability-band, .ownership-section, .landing-footer { width: min(100% - 36px, 1400px); }
  .landing-nav a { display: none; }
  .brand-lockup img { width: 150px; }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: clamp(54px, 12vw, 78px); }
  .capability-band { grid-template-columns: 1fr; }
  .capability-band article { padding: 34px 0; }
  .capability-band article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  .ownership-section { grid-template-columns: 1fr; gap: 36px; padding: 80px 0; }
  .login-view { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 360px; padding: 36px; }
  .login-brand-panel > img { width: 180px; }
  .login-brand-panel h1 { font-size: 48px; }
  .login-form-panel { min-height: auto; padding: 48px 24px; }
  .app-view { grid-template-columns: 1fr; }
  .sidebar { width: var(--sidebar-width); position: fixed; left: 0; transform: translateX(-105%); box-shadow: 18px 0 45px rgba(22,20,65,.24); transition: transform 200ms var(--ease); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; }
  .screen-content { padding: 28px 22px 50px; }
  .app-topbar { padding: 0 20px; }
}

@media (max-width: 640px) {
  .landing-header { height: 76px; }
  .brand-lockup strong, .brand-lockup > span { display: none; }
  .landing-nav .button { min-height: 40px; padding: 0 13px; font-size: 12px; }
  .hero { min-height: 0; gap: 42px; padding: 48px 0 60px; }
  .hero h1 { font-size: 51px; }
  .hero-copy > p { font-size: 18px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .trust-line { display: grid; }
  .operations-preview { padding: 14px; border-radius: 13px; }
  .preview-topbar { display: grid; gap: 10px; }
  .preview-alert { grid-template-columns: 42px 1fr; }
  .preview-alert b { grid-column: 2; font-size: 22px; }
  .funnel { padding: 12px 7px; }
  .funnel b { font-size: 16px; }
  .ownership-section h2 { font-size: 42px; }
  .ownership-copy dl { grid-template-columns: 1fr; gap: 24px; }
  .landing-footer { align-items: flex-start; flex-direction: column; gap: 18px; }
  .login-brand-panel { min-height: auto; gap: 26px; padding: 26px 24px 32px; }
  .login-brand-panel > img { width: 168px; }
  .login-brand-panel h1 { font-size: 39px; }
  .login-brand-panel div p { font-size: 16px; }
  .login-form { padding: 28px 20px; }
  .login-form-panel { padding: 28px 14px; }
  .login-meta { align-items: flex-start; flex-direction: column; }
  .environment-badge { max-width: 170px; line-height: 1.2; }
  .topbar-actions .icon-button:first-child { display: none; }
  .screen-header { align-items: stretch; flex-direction: column; }
  .screen-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .screen-actions .button { padding-inline: 12px; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-item + .summary-item { border-left: 0; border-top: 1px solid var(--border); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .toolbar-left { align-items: stretch; flex-direction: column; }
  .search-control { min-width: 0; width: 100%; }
  .filter-select { width: 100%; }
  .alert-heading { grid-template-columns: 42px 1fr; }
  .alert-heading .status-pill { grid-column: 2; }
  .alert-funnel { grid-template-columns: 1fr 1fr; }
  .alert-actions { flex-wrap: wrap; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { width: auto; white-space: nowrap; }
  .setting-row { align-items: flex-start; padding: 16px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .dialog-header, .dialog-actions { padding-inline: 17px; }
  .dialog-body { padding-inline: 17px; }
  .detail-list > div { grid-template-columns: 105px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
