:root {
  --bg: #151515;
  --surface: #202020;
  --surface-2: #282828;
  --concrete: #b8b8b8;
  --ink: #111;
  --white: #f7f7f4;
  --muted: #a9a9a9;
  --line: #3a3a3a;
  --red: #f32626;
  --red-dark: #b8171b;
  --green: #46c255;
  --amber: #e49a18;
  --radius: 12px;
  --shadow: 0 18px 45px rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--white); background: var(--bg); font-family: Manrope, system-ui, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 230px; display: flex; flex-direction: column; padding: 22px 18px; border-right: 1px solid var(--line); background: linear-gradient(180deg,#1c1c1c,#202020); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin: 4px 6px 26px; font-size: 20px; font-weight: 800; }
.brand-mark { color: var(--red); font-size: 22px; transform: rotate(45deg); }
.nav { display: grid; gap: 7px; }
.nav a, .sidebar-footer > a { display: flex; gap: 12px; align-items: center; min-height: 39px; padding: 0 11px; border-radius: 8px; color: #dedede; font-weight: 600; font-size: 12px; }
.nav a span, .sidebar-footer > a span { width: 20px; text-align: center; color: #bfbfbf; font-size: 20px; }
.nav a:hover, .nav a.active { background: var(--red-dark); color: white; }
.nav a.active span { color: white; }
.nav-label { margin: 24px 8px 9px; padding-top: 21px; border-top: 1px solid var(--line); color: #858585; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.nav-secondary a.active { background: #303030; }
.sidebar-footer { margin-top: 20px; display: grid; gap: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.user { display: flex; align-items: center; gap: 10px; padding: 10px 6px 18px; }
.user span:last-child { min-width: 0; display: grid; }
.user small { margin-top: 2px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--red); color: white; font-size: 12px; font-weight: 800; }
.avatar-outline { background: transparent; border: 1px solid #4b4b4b; }
.avatar-photo { overflow: hidden; padding: 0; background: #2b2b2b; }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-link { color: inherit; border-radius: 10px; }
.profile-link:hover { background: #292929; }
.main { min-height: 100vh; margin-left: 230px; padding: 18px 22px 30px; }
.topbar { min-height: 60px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 2.3fr) auto auto auto; align-items: center; gap: 16px; margin-bottom: 18px; }
.top-profile { display: inline-flex; }
.welcome h1 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.welcome p { margin: 3px 0 0; color: #bbb; }
.global-search { height: 43px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #343434; border-radius: 9px; background: #282828; }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: white; background: transparent; }
.global-search kbd { color: #bbb; font-size: 11px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border: 0; border-radius: 8px; font-weight: 800; white-space: nowrap; }
.button-primary { background: var(--red); color: white; }
.button-primary:hover { background: #d91d1d; }
.button-light { min-height: 32px; background: white; color: #151515; }
.button-danger { background: #421919; color: #ff9c9c; border: 1px solid #672525; }
.button-danger:hover { background: #6d1f1f; color: white; }
.icon-button, .mobile-menu { position: relative; border: 0; color: white; background: transparent; font-size: 22px; }
.icon-button b { position: absolute; top: -8px; right: -5px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--red); font-size: 10px; }
.mobile-menu { display: none; }
.flash { margin-bottom: 16px; padding: 13px 16px; border-radius: 8px; font-weight: 700; }
.flash-success { background: #173d20; color: #8bef9a; }
.flash-error { background: #4c1818; color: #ffabab; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { min-height: 122px; display: flex; align-items: center; gap: 20px; padding: 22px; border-radius: 10px; background: var(--concrete); color: var(--ink); box-shadow: var(--shadow); }
.stat-icon { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; border-radius: 50%; background: #151515; color: white; font-size: 28px; }
.stat-alert { color: var(--red); }
.stat-card small { display: block; font-weight: 700; }
.stat-card strong { display: block; margin-top: 4px; font-size: 34px; line-height: 1; letter-spacing: -.05em; }
.stat-card p { margin: 10px 0 0; font-size: 11px; font-weight: 800; }
.stat-card p span { color: #444; font-weight: 500; }
.trend.up { color: var(--red); }
.trend.down { color: #117429; }
.stats-grid.compact .stat-card { min-height: 104px; }
.dashboard-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: 14px; }
.panel { border: 1px solid #353535; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px; }
.panel h2, .panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; }
.panel-heading a, .text-link { color: var(--red); font-weight: 800; font-size: 12px; }
.filter-row { display: flex; gap: 7px; padding: 0 18px 12px; overflow-x: auto; }
.filter { padding: 7px 12px; border: 1px solid #414141; border-radius: 7px; color: #bbb; font-size: 11px; white-space: nowrap; }
.filter.active { border-color: var(--red); background: var(--red); color: white; }
.credential-table { width: 100%; }
.credential-row { min-height: 52px; display: grid; grid-template-columns: 1.55fr .7fr 1fr .75fr .6fr .7fr 1.15fr; gap: 12px; align-items: center; padding: 8px 18px; border-top: 1px solid #363636; color: #e4e4e4; font-size: 12px; }
.credential-head { min-height: 34px; color: #a6a6a6; font-size: 10px; font-weight: 700; }
.credential-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.credential-name > span:last-child, .event-row > div, .review-row > div { min-width: 0; display: grid; }
.credential-name strong { overflow: hidden; text-overflow: ellipsis; }
.credential-name small, .event-row small, .review-row small, .audit-row small { color: #a8a8a8; }
.service-mark { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 5px; background: #3b3b3b; font-size: 9px; font-weight: 800; }
.tag, .risk, .status { justify-self: start; padding: 4px 8px; border-radius: 5px; background: #343434; font-size: 10px; }
.risk-high { color: #ff5d5d; background: #4b2020; }
.risk-medium { color: #ffb338; background: #4b351a; }
.risk-low { color: #c9c9c9; }
.danger-text { color: #ff4646; font-weight: 800; }
.warning-text { color: var(--amber); font-weight: 800; }
.actions { display: flex; gap: 5px; }
.actions form { margin: 0; }
.actions button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: white; font-size: 17px; }
.actions button:hover { background: #3a3a3a; color: var(--red); }
.posture-content { min-height: 346px; display: grid; grid-template-columns: .9fr 1.2fr; align-items: center; gap: 18px; padding: 12px 22px 24px; }
.score-ring { width: 168px; height: 168px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: conic-gradient(var(--red) 0 82%, #383838 82% 100%); position: relative; }
.score-ring::after { content: ''; position: absolute; inset: 17px; border-radius: 50%; background: var(--surface); }
.score-ring div { z-index: 1; text-align: center; }
.score-ring strong { display: block; font-size: 42px; }
.score-ring span, .score-ring small { display: block; }
.score-ring small { margin-top: 8px; color: var(--green); }
.score-list { display: grid; gap: 16px; }
.score-item { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 9px; align-items: center; }
.mini-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: white; }
.score-item div { display: grid; gap: 6px; }
.score-item b { font-size: 11px; }
.score-item i { height: 5px; border-radius: 10px; background: #393939; overflow: hidden; }
.score-item em { display: block; height: 100%; background: var(--red); }
.score-item .good { color: var(--green); }
.score-item .down { color: var(--red); }
.event-list, .review-list { padding: 0 18px 12px; }
.event-row, .review-row { min-height: 57px; display: grid; grid-template-columns: auto 1.1fr 1fr .9fr auto; gap: 10px; align-items: center; border-top: 1px solid #373737; font-size: 11px; }
.review-row { grid-template-columns: auto 1fr 1.2fr auto; }
.event-row:first-child, .review-row:first-child { border-top: 0; }
.status-success { background: #193a20; color: #6fda76; }
.status-warning { background: #49351b; color: #f2ae35; }
.status-failed { background: #4a1d1d; color: #ff6565; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 20px 2px 26px; }
.page-heading h2 { margin: 0; font-size: 32px; letter-spacing: -.05em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.profile-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 14px; }
.profile-card { overflow: hidden; }
.profile-cover { height: 118px; background: radial-gradient(circle at 30% 20%, #f32626 0 14%, transparent 15%), linear-gradient(135deg,#2a2a2a,#121212); border-bottom: 1px solid var(--line); }
.profile-card-body { padding: 0 22px 22px; }
.profile-avatar-large { width: 92px; height: 92px; flex-basis: 92px; margin-top: -46px; border: 4px solid var(--surface); font-size: 26px; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.profile-card h2 { margin: 14px 0 4px; font-size: 26px; letter-spacing: -.04em; }
.profile-card p { margin: 0 0 18px; color: var(--muted); }
.profile-summary { padding: 0; }
.profile-form input[type=file] { padding: 12px; min-height: 52px; }
.vault-panel { padding-bottom: 12px; }
.vault-toolbar { display: flex; gap: 10px; padding: 16px 18px; }
.vault-toolbar input, .vault-toolbar select { min-height: 40px; border: 1px solid #414141; border-radius: 7px; background: #292929; color: white; padding: 0 12px; }
.vault-toolbar input { flex: 1; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }
.audit-list { padding: 8px 18px; }
.audit-row { min-height: 76px; display: grid; grid-template-columns: auto 1.2fr .8fr 1.2fr .6fr auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-row > div, .audit-row time { display: grid; }
.event-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.event-dot-warning { background: var(--amber); }
.event-dot-failed { background: var(--red); }
.report-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.report-grid .panel { padding: 22px; }
.report-events { grid-column: 1 / -1; padding: 0 !important; }
.report-events h2 { padding: 18px; }
.metric-table { margin-top: 20px; }
.metric-table > div { display: grid; grid-template-columns: 1.4fr repeat(3, .8fr); gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.metric-head { color: var(--muted); font-size: 11px; }
.bars { height: 290px; display: flex; align-items: end; gap: 18px; padding-top: 30px; }
.bars > div { height: 100%; flex: 1; display: grid; grid-template-rows: 1fr auto; align-items: end; text-align: center; gap: 10px; }
.bars span { min-height: 18px; display: grid; place-items: start center; padding-top: 8px; border-radius: 8px 8px 3px 3px; background: var(--concrete); color: #151515; }
.bars small { color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.modal { width: min(1060px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid #3d3d3d; border-radius: 14px; background: #171717; box-shadow: 0 35px 90px #000; }
.modal-heading { display: flex; justify-content: space-between; align-items: start; padding: 24px 28px; border-bottom: 1px solid #3e3e3e; }
.modal-heading h2 { margin: 0; font-size: 28px; }
.modal-heading p { margin: 5px 0 0; color: var(--muted); }
.modal-heading > a { font-size: 32px; }
.credential-form { padding: 24px 28px 28px; }
.credential-form fieldset { display: flex; gap: 26px; margin: 0 0 20px; padding: 0; border: 0; }
.credential-form legend { float: left; margin-right: 28px; font-weight: 800; }
.credential-form input[type=radio] { accent-color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 38px; }
.form-column { display: grid; gap: 14px; }
.credential-form label { display: grid; gap: 7px; color: #ddd; font-weight: 700; }
.credential-form input:not([type=radio]), .credential-form select, .credential-form textarea { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #454545; border-radius: 8px; outline: 0; color: white; background: #353535; }
.credential-form textarea { min-height: 90px; padding-top: 12px; resize: vertical; }
.credential-form input:focus, .credential-form select:focus, .credential-form textarea:focus { border-color: var(--red); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.invite-form { padding-top: 22px; }
.invite-form .form-grid { gap: 24px; }
.invite-form label { min-width: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-note { margin: 16px 0 0; padding: 13px 14px; border: 1px solid #453333; border-left: 3px solid var(--red); border-radius: 8px; background: #241b1b; color: #d8bdbd; font-size: 12px; line-height: 1.55; }
.checkline { min-height: 42px; display: flex !important; grid-template-columns: none !important; flex-direction: row; align-items: center; gap: 10px !important; padding: 10px 12px; border: 1px solid #3d3d3d; border-radius: 8px; background: #252525; color: #ddd; }
.checkline input { width: auto !important; min-height: 0 !important; accent-color: var(--red); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid article, .settings-conditions { padding: 16px; border: 1px solid #3d3d3d; border-radius: 10px; background: #202020; }
.settings-grid h3, .settings-conditions h3 { margin: 0 0 12px; font-size: 15px; }
.settings-grid article { display: grid; gap: 11px; align-content: start; }
.settings-conditions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.settings-conditions h3 { grid-column: 1 / -1; }
.smart-filters { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; }
.smart-filters a { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #3d3d3d; border-radius: 8px; background: #222; color: #d7d7d7; white-space: nowrap; font-size: 11px; font-weight: 700; }
.smart-filters a:hover { border-color: var(--red); }
.smart-filters b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: white; }
.row-action, .back-link { color: var(--red); font-weight: 800; font-size: 11px; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-login-form, .inline-delete-form, .delete-credential-form, .delete-user-form { margin: 0; }
.login-cta { min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--red); color: white; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.login-cta:hover { background: #d91d1d; }
.login-cta:disabled { cursor: not-allowed; opacity: .45; background: #4c4c4c; }
.delete-cta { min-height: 28px; padding: 0 10px; border: 1px solid #5b2727; border-radius: 6px; background: #2b1f1f; color: #ff7777; font-size: 10px; font-weight: 900; letter-spacing: .02em; }
.delete-cta:hover { background: #5a2020; color: white; }
.muted-action { color: var(--muted); font-size: 10px; font-weight: 800; }
.login-launch-body { padding: 24px 28px 28px; }
.launch-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid #3d3d3d; border-radius: 10px; background: #202020; }
.launch-hero .service-mark { width: 48px; height: 48px; font-size: 13px; background: var(--red); }
.launch-hero strong { display: block; font-size: 18px; }
.launch-hero p { margin: 4px 0 0; color: var(--muted); }
.launch-fields { display: grid; gap: 0; margin-top: 16px; border: 1px solid #3d3d3d; border-radius: 10px; overflow: hidden; }
.launch-fields > div { min-height: 70px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); background: #1f1f1f; }
.launch-fields > div:first-child { border-top: 0; }
.launch-fields small { grid-column: 1 / -1; color: var(--muted); }
.launch-fields strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.request-preview { grid-template-columns: auto 1fr 1.4fr auto; }
.detail-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 14px; }
.credential-secret { grid-row: span 1; }
.secret-fields { display: grid; gap: 0; padding: 0 20px 20px; }
.secret-fields > div { min-height: 76px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.secret-fields > div:first-child { border-top: 0; }
.secret-fields small { grid-column: 1 / -1; color: var(--muted); }
.password-field { grid-template-columns: 1fr auto auto !important; }
.copy-button { min-height: 30px; padding: 0 11px; border: 1px solid #4a4a4a; border-radius: 6px; background: #303030; color: white; font-size: 10px; font-weight: 800; }
.reveal-timer { min-width: 32px; color: var(--red); font-weight: 800; }
.definition-list { display: grid; padding: 0 20px 20px; }
.definition-list > div { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.definition-list span { color: var(--muted); }
.definition-list strong { text-align: right; }
.note-list { padding: 0 20px 20px; }
.note-list > div { padding: 14px 0; border-top: 1px solid var(--line); }
.note-list p { margin: 7px 0; color: #d0d0d0; line-height: 1.6; }
.request-form, .offboarding-form { display: grid; gap: 14px; padding: 0 20px 20px; }
.request-form label, .offboarding-form label { display: grid; gap: 7px; font-weight: 700; }
.request-form textarea, .request-form select, .offboarding-form select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #454545; border-radius: 8px; background: #353535; color: white; }
.request-form textarea { min-height: 95px; resize: vertical; }
.brand-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.brand-card { min-height: 190px; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 16px; padding: 22px; border: 1px solid #3b3b3b; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.brand-card:hover { border-color: var(--red); transform: translateY(-2px); }
.brand-monogram { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: var(--concrete); color: #111; font-weight: 800; }
.brand-card h3 { margin: 3px 0 5px; font-size: 16px; }
.brand-card p { margin: 0; color: var(--muted); font-size: 11px; }
.brand-metrics { grid-column: 1 / -1; display: flex; gap: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.brand-metrics span { color: var(--muted); }
.brand-metrics strong { display: block; color: white; font-size: 21px; }
.brand-card .row-action { grid-column: 1 / -1; }
.matrix-panel { padding-bottom: 16px; }
.access-matrix { padding: 0 18px; overflow-x: auto; }
.access-matrix > div { min-width: 850px; display: grid; grid-template-columns: 1.4fr repeat(5,1fr); align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); }
.matrix-head { color: var(--muted); font-size: 10px; }
.access-matrix .allowed { color: var(--green); }
.access-matrix .blocked { color: #666; }
.split-grid, .alert-layout, .offboarding-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }
.request-list, .temp-list, .emergency-list, .notification-list { padding: 0 18px 18px; }
.request-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.request-card:first-child { border-top: 0; }
.request-main { display: flex; gap: 12px; }
.request-main h3 { margin: 0 0 5px; font-size: 13px; }
.request-main p { margin: 0 0 6px; color: #ccc; line-height: 1.5; }
.request-main small { color: var(--muted); }
.request-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-left: 46px; }
.request-actions form { margin: 0; }
.request-actions .button { min-height: 31px; font-size: 10px; }
.temp-row, .emergency-row { min-height: 72px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.temp-row:first-child, .emergency-row:first-child { border-top: 0; }
.temp-row > div { display: grid; }
.temp-row small, .emergency-row small { color: var(--muted); }
.team-table { overflow-x: auto; }
.team-row { min-width: 1120px; min-height: 66px; display: grid; grid-template-columns: 1.35fr .72fr .72fr .5fr .55fr 1.05fr .65fr; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11px; }
.team-head { min-height: 40px; color: var(--muted); font-weight: 800; }
.role-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 14px; }
.role-grid article { padding: 18px; border-radius: 10px; background: var(--concrete); color: #111; }
.role-grid h3 { margin: 0 0 7px; font-size: 14px; }
.role-grid p { margin: 0; font-size: 11px; line-height: 1.5; }
.checklist { display: grid; gap: 10px; padding: 14px; border: 1px solid #3f3f3f; border-radius: 8px; background: #292929; color: #d5d5d5; }
.readiness-score { padding: 20px; text-align: center; }
.readiness-score strong { display: block; font-size: 64px; color: var(--red); letter-spacing: -.07em; }
.security-notice { padding: 14px; border-left: 3px solid var(--red); background: #321c1c; color: #f1baba; line-height: 1.5; }
.emergency-row { grid-template-columns: 1fr auto auto auto; padding: 14px 0; }
.emergency-row p { margin: 5px 0; color: #ccc; }
.approval-count { display: grid; text-align: center; }
.approval-count strong { font-size: 20px; }
.notification-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.notification-row:first-child { border-top: 0; }
.notification-row p { margin: 5px 0; color: #ccc; }
.notification-row small { color: var(--muted); }
.notification-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #313131; font-weight: 800; }
.notification-critical { background: var(--red); }
.notification-warning { background: var(--amber); color: #111; }
.condition-list { display: grid; padding: 0 18px 18px; }
.condition-list > div { min-height: 50px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.condition-list span { color: var(--red); }
.condition-list em { color: var(--green); font-size: 10px; }
.report-catalog { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 14px; }
.report-catalog article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid #3a3a3a; border-radius: 10px; background: var(--surface); }
.report-catalog article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--red); font-size: 20px; }
.report-catalog h3 { margin: 0 0 5px; font-size: 13px; }
.report-catalog p { margin: 0; color: var(--muted); font-size: 10px; }
.security-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.security-grid article { min-height: 145px; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 12px; padding: 18px; border: 1px solid #3a3a3a; border-radius: 10px; background: var(--surface); }
.security-control-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--red); }
.security-grid h3 { margin: 2px 0 6px; font-size: 13px; }
.security-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.security-grid .status { grid-column: 1 / -1; }
.security-fields { grid-template-columns: 1fr 1fr; gap: 0 24px; }
.companion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.companion-card { padding: 18px; }
.companion-card h2 { margin-top: 20px; }
.companion-card p, .companion-card li { color: #bbb; line-height: 1.6; }
.companion-card ul { padding-left: 18px; }
.companion-visual { min-height: 260px; display: grid; place-items: center; border-radius: 10px; background: var(--concrete); color: #111; }
.browser-visual > div { width: 80%; display: grid; gap: 7px; padding: 18px; border-radius: 9px; background: #222; color: white; }
.browser-visual > span { justify-self: start; margin: 18px; align-self: start; color: var(--red); }
.browser-visual button { padding: 11px 17px; border: 0; border-radius: 7px; background: var(--red); color: white; font-weight: 800; }
.phone { width: 160px; min-height: 230px; display: grid; place-items: center; align-content: center; gap: 12px; border: 8px solid #191919; border-radius: 25px; background: #282828; color: white; }
.phone i { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--red); font-size: 30px; }
.form-grid-bottom { margin-top: 16px; }
.form-grid-bottom > div { display: grid; gap: 14px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-body { min-height: 100vh; background: #151515; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: #202020; }
.auth-brand .brand { margin: 0; }
.auth-brand h1 { margin: 0; font-size: clamp(42px,5vw,76px); line-height: .98; letter-spacing: -.07em; }
.auth-brand p { max-width: 590px; color: #aaa; font-size: 17px; line-height: 1.7; }
.auth-security { display: flex; gap: 20px; color: #bbb; font-size: 11px; font-weight: 800; }
.auth-security span:first-child { color: var(--red); }
.auth-panel { display: grid; align-content: center; gap: 28px; padding: clamp(30px,8vw,110px); background: var(--concrete); color: #111; }
.auth-panel h2 { margin: 0; font-size: 38px; letter-spacing: -.05em; }
.auth-panel p { color: #444; }
.auth-form { display: grid; gap: 17px; }
.auth-form label { display: grid; gap: 8px; font-weight: 800; }
.auth-form input { min-height: 50px; padding: 0 14px; border: 1px solid #888; border-radius: 8px; background: white; color: #111; }
.auth-form .button { min-height: 50px; }
.otp-input { font-size: 26px; letter-spacing: .4em; text-align: center; }
.demo-note { display: grid; gap: 4px; padding: 14px; border: 1px solid #8d8d8d; border-radius: 8px; }
.demo-note span { color: #444; }
@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.5fr) auto auto; }
  .topbar > .avatar { display: none; }
  .stat-card { padding: 16px; gap: 13px; }
  .stat-icon { width: 46px; height: 46px; flex-basis: 46px; font-size: 22px; }
  .stat-card strong { font-size: 28px; }
  .credential-row { grid-template-columns: 1.45fr .7fr .95fr .7fr .6fr .7fr 1fr; padding-inline: 12px; gap: 8px; }
  .posture-content { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 14px; }
  .mobile-menu { display: block; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .global-search { grid-column: 1 / -1; grid-row: 2; }
  .topbar .button-primary, .icon-button { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
  .detail-grid, .split-grid, .alert-layout, .offboarding-layout, .companion-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .brand-grid, .security-grid { grid-template-columns: repeat(2,1fr); }
  .role-grid { grid-template-columns: repeat(2,1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 380px; padding: 30px; }
  .auth-panel { padding: 40px 25px; }
  .report-events { grid-column: auto; }
}
@media (max-width: 640px) {
  .main { padding: 10px; }
  .welcome h1 { font-size: 19px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 95px; }
  .dashboard-grid { gap: 10px; }
  .panel-heading { padding-inline: 14px; }
  .panel-heading h2 { font-size: 16px; }
  .credential-table { overflow-x: auto; display: block; }
  .credential-row { min-width: 840px; }
  .event-row, .review-row { grid-template-columns: auto 1fr auto; padding: 10px 0; }
  .event-row > div:nth-of-type(2), .event-row > div:nth-of-type(3), .review-row > div:nth-of-type(2) { display: none; }
  .page-heading { align-items: start; }
  .page-heading h2 { font-size: 26px; }
  .page-heading .button { display: none; }
  .vault-toolbar { flex-wrap: wrap; }
  .vault-toolbar input { flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .brand-grid, .security-grid, .role-grid, .report-catalog { grid-template-columns: 1fr; }
  .profile-avatar-large { width: 78px; height: 78px; flex-basis: 78px; margin-top: -39px; }
  .security-fields { grid-template-columns: 1fr; }
  .settings-grid, .settings-conditions { grid-template-columns: 1fr; }
  .request-card { grid-template-columns: 1fr; }
  .request-actions { padding-left: 0; flex-wrap: wrap; }
  .emergency-row { grid-template-columns: 1fr auto; }
  .inline-fields { grid-template-columns: 1fr; }
  .auth-brand h1 { font-size: 42px; }
  .auth-security { flex-direction: column; gap: 7px; }
  .credential-form fieldset { flex-wrap: wrap; }
  .modal-backdrop { padding: 0; }
  .modal { max-height: 100vh; border-radius: 0; }
}
@media print {
  .sidebar, .topbar, .page-heading .button { display: none !important; }
  .main { margin: 0; color: #111; background: white; }
  .panel { color: #111; background: white; box-shadow: none; }
}
