:root {
  color-scheme: light;
  --navy: #0a1a4c;
  --navy-2: #102b69;
  --blue: #0f50d8;
  --ink: #0b173d;
  --muted: #667397;
  --line: #dce3f0;
  --page: #f4f7fd;
  --surface: #ffffff;
  --green: #098658;
  --red: #f04452;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--page); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.eyebrow { margin: 0 0 12px; color: #0d4dd1; font-size: 13px; font-weight: 800; letter-spacing: .18em; }
.primary-button, .secondary-button { min-height: 46px; border-radius: 12px; padding: 0 18px; border: 0; font-weight: 750; cursor: pointer; }
.primary-button { color: #fff; background: var(--blue); box-shadow: 0 10px 22px rgba(15,80,216,.18); }
.primary-button:hover { background: #0b43bb; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { color: var(--navy); background: #edf2fb; }
.form-message { min-height: 20px; margin: 12px 0 0; color: #c3283c; font-size: 14px; line-height: 1.45; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 520px) minmax(0, 1fr); background: #fff; }
.login-panel { width: min(100%, 460px); margin: auto; padding: 48px 42px; }
.login-brand { width: 106px; margin-bottom: 74px; padding: 13px 15px; border: 1px solid #e4e9f3; border-radius: 15px; box-shadow: 0 12px 28px rgba(19,38,89,.08); }
.login-brand img { display: block; width: 100%; height: 23px; object-fit: contain; }
.login-panel h1 { margin: 0; font-size: clamp(40px, 5vw, 58px); line-height: 1; letter-spacing: -.055em; }
.login-copy { margin: 20px 0 36px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.login-panel form > label { display: block; margin: 17px 0 8px; color: #26345b; font-size: 14px; font-weight: 750; }
.input-wrap { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 15px; border: 1px solid #ccd5e5; border-radius: 12px; background: #fff; transition: border .18s, box-shadow .18s; }
.input-wrap:focus-within { border-color: #3970e2; box-shadow: 0 0 0 4px rgba(15,80,216,.1); }
.input-wrap > i { color: #7d89a7; }
.input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 16px; }
.password-toggle { width: 32px; height: 32px; border: 0; background: transparent; color: #6a789c; cursor: pointer; }
.login-button { width: 100%; margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-help { margin: 22px 0 0; color: #7b87a3; font-size: 13px; text-align: center; }
.login-visual { position: relative; min-height: 100vh; overflow: hidden; background: #dfe9f8; }
.login-visual > img { width: 100%; height: 100%; object-fit: cover; }
.login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,24,72,.04), rgba(7,24,72,.34)); }
.login-visual-copy { position: absolute; z-index: 1; left: clamp(40px, 7vw, 100px); right: 40px; bottom: 70px; color: #fff; }
.login-visual-copy span { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.login-visual-copy strong { display: block; max-width: 560px; font-size: clamp(32px, 4.5vw, 64px); line-height: 1.06; letter-spacing: -.045em; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 145px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 3; inset: 0 auto 0 0; width: 145px; padding: 38px 14px 30px; display: flex; flex-direction: column; align-items: stretch; color: #fff; background: linear-gradient(180deg, #17336f 0%, #071946 100%); }
.sidebar-logo { width: 84px; margin: 0 auto 48px; padding: 15px 10px; border-radius: 12px; background: #fff; box-shadow: 0 12px 26px rgba(0,0,0,.17); }
.sidebar-logo img { display: block; width: 100%; height: 24px; object-fit: contain; }
.sidebar nav { display: grid; gap: 14px; }
.nav-item { min-height: 94px; padding: 15px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; border: 0; border-radius: 15px; color: #cbd7f1; background: transparent; cursor: pointer; font-size: 14px; }
.nav-item i { font-size: 22px; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.105); }
.sidebar-profile { margin-top: auto; padding-top: 34px; display: grid; justify-items: center; text-align: center; border-top: 1px solid rgba(255,255,255,.18); }
.avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #29477e; font-size: 14px; font-weight: 800; }
.sidebar-profile strong { display: block; max-width: 100px; margin-top: 11px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile span { display: block; margin-top: 4px; color: #bac8e6; font-size: 12px; }
.sidebar-profile button { width: 34px; height: 34px; margin-top: 12px; border: 0; border-radius: 10px; color: #c5d2ed; background: transparent; cursor: pointer; }
.sidebar-profile button:hover { color: #fff; background: rgba(255,255,255,.1); }

.workspace { grid-column: 2; min-height: 100vh; padding: 55px clamp(34px, 5.2vw, 82px) 42px; background: radial-gradient(circle at 52% 0%, #fff 0, #f7f9fd 36%, #f2f6fc 100%); }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 47px; }
.workspace-header h1 { margin: 0; font-size: clamp(42px, 5vw, 64px); line-height: .98; letter-spacing: -.055em; }
.workspace-header > div > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 18px; }
.header-actions { display: flex; align-items: center; gap: 25px; }
.notification-button { position: relative; width: 44px; height: 44px; border: 0; background: transparent; font-size: 21px; cursor: pointer; }
.notification-button .notification-dot { position: absolute; top: 5px; right: 5px; color: var(--red); font-size: 8px; -webkit-text-stroke: 2px var(--page); }
.environment { min-height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(19,38,89,.05); font-weight: 750; }
.environment .environment-dot { color: var(--green); font-size: 10px; filter: drop-shadow(0 0 5px rgba(9,134,88,.35)); }
.environment .chevron { margin-left: 4px; font-size: 11px; }
.view { max-width: 1320px; }
.section-heading { margin-bottom: 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading h2, .page-intro h2, .settings-header h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.section-heading button { display: flex; align-items: center; gap: 13px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.section-heading > span { color: var(--muted); font-size: 14px; }
.system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.system-card { position: relative; min-height: 258px; padding: 32px 36px 28px; border: 1px solid #d9e1ee; border-radius: 17px; background: rgba(255,255,255,.86); text-decoration: none; box-shadow: 0 12px 28px rgba(29,51,103,.045); }
.system-card.live-card { border-left: 2px solid #3a7cff; }
.system-card:hover { box-shadow: 0 18px 38px rgba(29,51,103,.1); transform: translateY(-2px); }
.system-card, .card-arrow { transition: .18s ease; }
.card-top { min-height: 77px; display: flex; align-items: flex-start; justify-content: space-between; }
.system-icon, .activity-icon { display: grid; place-items: center; color: #0f48bd; background: linear-gradient(145deg, #eaf1ff, #dce8fc); }
.system-icon { width: 79px; height: 79px; border-radius: 16px; font-size: 31px; }
.system-icon.purple, .activity-icon.purple { color: #253fb6; background: linear-gradient(145deg, #f1f1ff, #e3e4ff); }
.status { margin-top: 10px; padding: 7px 14px; border-radius: 999px; color: #77819d; background: #edf0f5; font-size: 13px; font-weight: 750; }
.status.live { color: #087950; background: #e3f7ee; }
.status.live i { margin-right: 6px; font-size: 7px; }
.system-card h3 { margin: 26px 0 8px; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.system-card p { max-width: 300px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.48; }
.card-arrow { position: absolute; right: 28px; bottom: 28px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #eef3ff; }
.live-card:hover .card-arrow { transform: translateX(4px); }
.add-card { border-style: dashed; box-shadow: none; background: rgba(255,255,255,.25); }
.add-card .system-icon { color: #5476bd; background: #eff3fb; }
.planned-card .card-arrow { opacity: .45; }
.lower-grid { margin-top: 44px; padding-top: 34px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 42px; border-top: 1px solid var(--line); }
.activity-panel .section-heading { margin-bottom: 10px; }
.activity-list { padding: 2px 26px; border: 1px solid #e1e6f0; border-radius: 17px; background: rgba(255,255,255,.86); }
.activity-list > * { width: 100%; min-height: 83px; display: grid; grid-template-columns: 48px minmax(0,1fr) 16px; align-items: center; gap: 18px; border: 0; border-bottom: 1px solid #e4e9f2; background: transparent; text-align: left; text-decoration: none; }
.activity-list > *:last-child { border-bottom: 0; }
.activity-list button, .activity-list a { cursor: pointer; }
.activity-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 20px; }
.activity-list strong, .activity-list small { display: block; }
.activity-list strong { font-size: 15px; }
.activity-list small { margin-top: 5px; color: var(--muted); font-size: 13px; }
.activity-list > * > i { color: #7590bd; font-size: 12px; }
.mission-card { position: relative; min-height: 277px; overflow: hidden; border-radius: 17px; background: #dfe9f8; }
.mission-card > img { width: 100%; height: 100%; object-fit: cover; }
.mission-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(226,236,251,.98) 0%, rgba(226,236,251,.9) 38%, rgba(226,236,251,.12) 69%); }
.mission-copy { position: absolute; z-index: 1; inset: 43px auto 30px 43px; width: 270px; }
.mission-copy h2 { margin: 0; font-size: 29px; line-height: 1.05; letter-spacing: -.04em; }
.mission-copy p { margin: 13px 0 0; color: #647397; font-size: 14px; line-height: 1.5; }
.mission-copy > span { display: block; width: 24px; height: 3px; margin: 27px 0 23px; border-radius: 2px; background: #163b9c; }
.mission-copy img { width: 74px; height: 18px; object-fit: contain; object-position: left; }
.page-intro { margin-bottom: 24px; }
.page-intro h2, .settings-header h2 { font-size: 30px; }
.page-intro p, .settings-header p { margin: 8px 0 0; color: var(--muted); }
.systems-full { grid-template-columns: repeat(2, minmax(0, 430px)); }
.settings-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 25px; }
.settings-header .primary-button { display: flex; align-items: center; gap: 9px; }
.staff-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 12px 30px rgba(29,51,103,.05); }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th, td { padding: 18px 20px; border-bottom: 1px solid #e5e9f1; text-align: left; vertical-align: middle; }
th { color: #75809b; background: #f8faff; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
td { font-size: 14px; }
td strong, td small { display: block; }
td small { margin-top: 5px; color: var(--muted); }
.role-pill, .state-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.role-pill { color: #29478f; background: #edf2ff; }
.state-pill.active { color: #087950; background: #e3f7ee; }
.state-pill.suspended { color: #a63a49; background: #fdecef; }
.edit-account { border: 0; color: var(--blue); background: transparent; font-weight: 750; cursor: pointer; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); }

dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); box-shadow: 0 30px 80px rgba(5,18,54,.28); }
dialog::backdrop { background: rgba(7,19,55,.55); backdrop-filter: blur(5px); }
.dialog-card > header { padding: 25px 28px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-card h2 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #f1f4fa; cursor: pointer; }
.dialog-body { max-height: calc(100vh - 210px); padding: 25px 28px; overflow: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label > span, fieldset legend { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 750; }
.form-grid input, .form-grid select { width: 100%; min-height: 47px; padding: 0 12px; border: 1px solid #ccd5e5; border-radius: 10px; background: #fff; }
fieldset { margin: 25px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-grid label, .active-choice { min-height: 67px; padding: 12px; display: flex; align-items: center; gap: 11px; border: 1px solid #e1e6ef; border-radius: 11px; }
.choice-grid input, .active-choice input { width: 18px; height: 18px; accent-color: var(--blue); }
.choice-grid strong, .choice-grid small, .active-choice strong, .active-choice small { display: block; }
.choice-grid strong, .active-choice strong { font-size: 13px; }
.choice-grid small, .active-choice small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.active-choice { margin-top: 18px; }
.dialog-card > footer { padding: 18px 28px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); }

@media (max-width: 1050px) {
  .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-card { display: none; }
  .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .login-screen { display: block; }
  .login-panel { min-height: 100vh; padding: 34px 24px; }
  .login-brand { margin-bottom: 65px; }
  .login-visual { display: none; }
  .app-shell { display: block; padding-bottom: 76px; }
  .sidebar { position: fixed; inset: auto 0 0 0; width: auto; height: 72px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); flex-direction: row; align-items: center; }
  .sidebar-logo, .sidebar-profile { display: none; }
  .sidebar nav { width: 100%; display: flex; justify-content: space-around; gap: 8px; }
  .nav-item { min-height: 56px; flex: 1; padding: 6px; gap: 4px; border-radius: 11px; font-size: 11px; }
  .nav-item i { font-size: 18px; }
  .workspace { padding: 28px 20px 35px; }
  .workspace-header { margin-bottom: 35px; }
  .workspace-header h1 { font-size: 40px; }
  .workspace-header > div > p:last-child { font-size: 16px; }
  .header-actions { gap: 2px; }
  .environment { display: none; }
  .system-grid, .systems-full { grid-template-columns: 1fr; }
  .system-card { min-height: 235px; }
  .lower-grid { gap: 28px; }
  .mission-card { min-height: 260px; }
  .settings-header { align-items: flex-start; flex-direction: column; }
  .form-grid, .choice-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.workspace-header h1{font-size:32px;letter-spacing:-.03em}.workspace-header{margin-bottom:32px}.launcher-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,160px));gap:32px 24px}.launcher{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;text-decoration:none;font-size:14px;font-weight:600;padding:12px 6px;border-radius:14px}.launcher:hover{background:#e8eef9}.launcher:focus-visible{outline:3px solid #3970e2}.launcher-icon{display:grid;place-items:center;width:76px;height:76px;border-radius:20px;color:#fff;background:linear-gradient(145deg,#578eff,#164ac9);box-shadow:0 5px 12px #14285318;font-size:30px}.warranty-icon{background:linear-gradient(145deg,#2baeb1,#087c87)}@media(max-width:650px){.launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.workspace-header h1{font-size:28px}}

.launcher-grid{grid-template-columns:repeat(auto-fill,170px);gap:32px 30px}.launcher{gap:12px;font-size:15px;font-weight:550}.launcher-art{width:112px;height:112px;object-fit:contain;filter:drop-shadow(0 5px 5px #18245018)}@media(max-width:650px){.launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 12px}.launcher-art{width:100px;height:100px}}
