:root {
  --ink: #101113;
  --muted: #66686d;
  --gold: #d8b15b;
  --gold-dark: #9b7025;
  --pale: #fbf3e5;
  --line: #dedede;
  --canvas: #f7f7f5;
  --white: #fff;
  --black: #08090a;
  --radius: 11px;
  --shadow: 0 9px 30px rgba(15, 16, 17, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.5 Manrope, Inter, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { color: inherit; font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.icon { flex: none; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 7px; color: var(--gold-dark); font-size: 11px; font-weight: 800; letter-spacing: 2.6px; text-transform: uppercase; }
.eyebrow.small { margin-bottom: 3px; font-size: 9px; letter-spacing: 1.6px; }

/* Shared header */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: 82px; display: flex; align-items: center; gap: 32px; padding: 0 28px; color: #fff; background: linear-gradient(110deg, #111315, #070809); box-shadow: 0 8px 26px rgba(0,0,0,.17); }
.brand { position: absolute; left: 50%; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 15px; min-width: 325px; transform: translateX(-50%); text-align: center; }
.brand strong { font-size: 17px; font-weight: 500; letter-spacing: 10px; }
.brand > span { color: #fff; font-size: 10px; }
.brand small { grid-column: 1 / -1; margin-top: -10px; color: #e0bc66; font-size: 8px; letter-spacing: 6px; }
.portal-title { display: flex; flex-direction: column; font-size: 15px; }
.portal-title small { color: #c9c9c7; font-size: 10px; }
.user-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-button { position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 0; color: #fff; background: transparent; cursor: pointer; }
.notification-dot { position: absolute; top: 2px; right: 1px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #16120b; background: var(--gold); font-size: 9px; font-weight: 800; }
.account-menu { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border: 0; border-radius: 999px; color: #fff; background: transparent; cursor: pointer; }
.account-trigger:hover, .account-menu.open .account-trigger { background: rgba(255,255,255,.08); }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #eccd81; background: #292826; font-size: 12px; font-weight: 700; }
.user-copy { display: flex; min-width: 120px; flex-direction: column; text-align: left; }
.user-copy b { font-size: 12px; }
.user-copy small { color: #ccc; font-size: 10px; }
.account-trigger > .icon { transform: rotate(90deg); transition: transform .2s; }
.account-menu.open .account-trigger > .icon { transform: rotate(-90deg); }
.account-dropdown { position: absolute; top: calc(100% + 12px); right: 0; display: none; width: 255px; overflow: hidden; border: 1px solid rgba(216,177,91,.42); border-radius: 11px; color: #f6f4ef; background: #1a1c1d; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.account-menu.open .account-dropdown { display: block; }
.account-dropdown > div { display: flex; flex-direction: column; padding: 17px 18px; background: #171300; }
.account-dropdown small { color: #c8bfae; }
.account-dropdown form { margin: 0; }
.account-dropdown button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; color: #fff; background: #1a1c1d; cursor: pointer; }
.account-dropdown button:hover { color: #f0cb75; background: #24231d; }
.mobile-menu { display: none; border: 0; color: #fff; background: none; cursor: pointer; }

/* Sidebar */
.sidebar { position: fixed; top: 82px; bottom: 0; left: 0; z-index: 40; display: flex; width: 268px; flex-direction: column; padding: 14px 20px 20px; overflow-y: auto; color: #fff; background: #050606; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a { display: flex; min-height: 44px; align-items: center; gap: 14px; padding: 10px 13px; border-radius: 7px; font-weight: 600; }
.sidebar nav a .icon { color: #e5be62; }
.sidebar nav a:hover { background: #20211f; }
.sidebar nav a.active { color: #f0cd7b; background: linear-gradient(100deg, #35332f, #232322); }
.support-box { display: flex; flex-direction: column; margin-top: 20px; padding: 17px; border: 1px solid #44403a; border-radius: 8px; }
.support-box h3 { margin: 0; color: #edc86e; font-size: 15px; }
.support-box p { margin: 6px 0 12px; color: #d1d1cf; font-size: 11px; }
.support-box .button { min-height: 36px; padding: 0 10px; font-size: 10px; }
.support-box hr { width: 100%; margin: 15px 0; border: 0; border-top: 1px solid #353535; }
.support-box > small { margin-bottom: 4px; color: #aaa; font-size: 9px; text-transform: uppercase; }
.support-box > span { color: #ddd; font-size: 10px; }
.copyright { margin-top: auto; color: #8e8e8e; font-size: 9px; }

/* Main surfaces */
.dashboard-main { min-width: 0; margin: 82px 0 0 268px; padding: 25px clamp(18px, 2.4vw, 36px) 42px; }
.dashboard-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.dashboard-welcome h1, .section-heading h1 { margin: 0; font-size: clamp(25px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.7px; }
.dashboard-welcome p:last-child, .section-heading p:last-child { margin: 6px 0 0; color: var(--muted); }
.button-row { display: flex; gap: 11px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid #a8a9ab; border-radius: 6px; color: var(--ink); background: #fff; font-weight: 700; cursor: pointer; }
.button:hover { border-color: var(--gold-dark); }
.button.primary { border-color: #101112; color: #fff; background: linear-gradient(120deg,#171819,#070809); }
.button.gold { border: 0; color: #17130a; background: linear-gradient(120deg,#f2d78d,#d7a849); }
.dark-icon, .soft-icon { display: grid; width: 52px; height: 52px; flex: none; place-items: center; border-radius: 50%; color: #e5bd62; background: linear-gradient(145deg,#252526,#080909); }
.soft-icon { width: 43px; height: 43px; color: #93681f; background: var(--pale); }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat-card { display: flex; gap: 15px; min-height: 152px; padding: 18px; }
.stat-card > div { display: flex; min-width: 0; flex-direction: column; }
.stat-card b { font-size: 12px; }
.stat-card strong { margin: 1px 0; font-size: 31px; line-height: 1.2; }
.stat-card small { min-height: 39px; color: var(--muted); font-size: 11px; }
.stat-card a, .panel header > a { display: flex; align-items: center; gap: 8px; margin-top: auto; color: #7a571c; font-size: 10px; font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.panel { min-width: 0; padding: 18px; }
.panel.span-2 { grid-column: 1 / -1; }
.panel > header, .registry > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel h2, .registry h2 { margin: 0; font-size: 16px; }

.data-table { min-width: 0; }
.data-table .table-head, .data-table .table-row { display: grid; align-items: center; gap: 12px; }
.data-table .table-head { padding: 9px 8px; border-bottom: 1px solid #e4e4e4; color: #74767a; font-size: 9px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.data-table .table-row { min-height: 61px; padding: 10px 8px; border-bottom: 1px solid #ededed; font-size: 11px; transition: background .15s; }
.data-table .table-row:last-child { border-bottom: 0; }
.data-table .table-row:hover { background: #fffaf0; }
.data-table .table-row > span { min-width: 0; }
.data-table .table-row > span:first-child { display: flex; flex-direction: column; }
.data-table .table-row > span:first-child small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.controls-table .table-head, .controls-table .table-row { grid-template-columns: minmax(220px,1.7fr) .9fr .9fr .9fr .5fr; }
.wide .table-head, .wide .table-row { grid-template-columns: minmax(215px,1.55fr) .75fr .75fr 1fr .55fr .75fr 30px; }
.evidence-table .table-head, .evidence-table .table-row { grid-template-columns: minmax(220px,1.5fr) .7fr .7fr .7fr .7fr 30px; }
.risk-table .table-head, .risk-table .table-row, .findings-table .table-head, .findings-table .table-row { grid-template-columns: minmax(220px,1.5fr) .7fr .5fr .7fr .7fr .65fr 30px; }
.table-row small { display: block; color: var(--muted); font-size: 9px; }
.status { display: inline-flex; width: max-content; align-items: center; border-radius: 20px; padding: 4px 9px; color: #7d5717; background: #faecd3; font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.status-implemented, .status-approved, .status-complete, .status-closed, .status-effective { color: #246439; background: #e3f3e7; }
.status-in_progress, .status-in_review, .status-remediation, .status-ready_for_review, .status-pending_review, .status-monitoring { color: #285e91; background: #e4f0ff; }
.status-not_started, .status-planned, .status-draft, .status-open, .status-not_tested { color: #7d5717; background: #faecd3; }
.status-ineffective, .status-rejected, .status-expired, .status-cancelled { color: #9b3b32; background: #fde8e5; }
.stack-list { display: flex; flex-direction: column; }
.stack-list > a { display: grid; grid-template-columns: 32px 1fr 18px; align-items: center; gap: 10px; padding: 12px 3px; border-bottom: 1px solid #eee; }
.stack-list > a:last-child { border-bottom: 0; }
.stack-list > a > div { min-width: 0; }
.stack-list b, .stack-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-list small { color: var(--muted); font-size: 10px; }
.severity { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eee; font-size: 10px; font-weight: 900; }
.severity-critical { color: #fff; background: #9b2c25; }
.severity-high { color: #8e2c25; background: #f6d9d5; }
.severity-medium { color: #7c571d; background: #f8e7c8; }
.severity-low { color: #286292; background: #e3f0fb; }
.timeline-list > div { display: flex; align-items: center; gap: 14px; padding: 11px 3px; border-bottom: 1px solid #eee; }
.timeline-list > div:last-child { border: 0; }
.timeline-list time { display: grid; width: 46px; height: 48px; place-items: center; border-radius: 7px; color: #fff; background: #171819; line-height: 1; }
.timeline-list time b { font-size: 18px; }
.timeline-list time small { color: #e5bd62; font-size: 8px; }
.timeline-list > div > span { display: flex; min-width: 0; flex-direction: column; }
.timeline-list > div > span small { color: var(--muted); font-size: 10px; }
.security-strip { display: flex; align-items: center; gap: 15px; margin-top: 14px; padding: 15px 23px; border-radius: 7px; color: #fff; background: linear-gradient(120deg,#111315,#070809); }
.security-strip > .icon { color: #e6bf64; }
.security-strip > div { display: flex; flex-direction: column; }
.security-strip small { color: #ccc; font-size: 10px; }
.security-strip > span { margin-left: auto; color: #edca78; font-size: 10px; font-weight: 800; }

/* Section pages */
.section-heading { position: relative; display: flex; min-height: 130px; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 15px; padding: 25px 29px; overflow: hidden; border: 1px solid #e5dccb; border-radius: 12px; background: linear-gradient(135deg,#fff,#fff9ee); box-shadow: var(--shadow); }
.section-heading::after { position: absolute; right: 8%; width: 220px; height: 220px; border: 1px solid rgba(216,177,91,.14); border-radius: 50%; content: ""; }
.section-heading > * { position: relative; z-index: 1; }
.heading-icon { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 50%; color: #edc76e; background: #141516; }
.notice { margin: 13px 0; padding: 12px 15px; border: 1px solid #ead9ab; border-radius: 7px; color: #70521e; background: #fff8e8; }
.notice.success { border-color: #b9dfc2; color: #285f36; background: #edf9ef; }
.notice.error { border-color: #efc1bb; color: #8f342c; background: #fff0ee; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.mini-stat-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.mini-stat-grid article { display: flex; min-height: 80px; flex-direction: column; justify-content: center; padding: 13px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.mini-stat-grid small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.mini-stat-grid b { font-size: 25px; }

.create-panel { margin-bottom: 14px; overflow: hidden; scroll-margin-top: 100px; }
.create-panel > summary { display: flex; min-height: 72px; align-items: center; gap: 13px; padding: 14px 19px; color: #fff; background: linear-gradient(110deg,#17191a,#0a0b0c); cursor: pointer; list-style: none; }
.create-panel > summary::-webkit-details-marker, .record-action summary::-webkit-details-marker, .inline-action summary::-webkit-details-marker, .expandable > details > summary::-webkit-details-marker { display: none; }
.create-panel > summary > .icon { color: #e9c66d; }
.create-panel > summary span { display: flex; flex-direction: column; }
.create-panel > summary small { color: #bebfbd; font-size: 10px; }
.create-panel > summary em { margin-left: auto; color: #e9c66d; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 20px; }
.form-grid label, .record-action form label, .inline-action form label, .expandable details form label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #505257; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #d7d8d9; border-radius: 6px; outline: none; color: var(--ink); background: #fff; text-transform: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #b88934; box-shadow: 0 0 0 3px rgba(216,177,91,.17); }
.check-field { flex-direction: row !important; align-items: center; text-transform: none !important; }
.check-field input { width: 17px; min-height: 17px; }
.form-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
.file-field { display: flex !important; min-height: 94px; flex-direction: row !important; align-items: center; gap: 14px !important; padding: 15px; border: 1px dashed #c7ad74; border-radius: 8px; color: #72521f !important; background: #fffaf1; text-transform: none !important; }
.file-field span { display: flex; flex-direction: column; }
.file-field input { margin-left: auto; max-width: 300px; border: 0; background: transparent; }

.registry { min-width: 0; padding: 18px; overflow: visible; }
.search-box { display: flex; width: min(280px,38vw); align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.search-box input { min-height: 37px; padding: 5px 0; border: 0; box-shadow: none; }
.expandable > details { position: relative; }
.expandable > details > summary { padding: 7px; border-radius: 5px; cursor: pointer; list-style: none; font-weight: 900; letter-spacing: 2px; }
.expandable > details[open] > summary { background: #eee; }
.expandable details form, .expandable details .menu-link { position: absolute; right: 0; z-index: 20; width: 260px; padding: 14px; border: 1px solid #ddd; border-radius: 9px; background: #fff; box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.expandable details form { display: grid; gap: 10px; }
.expandable details .menu-link { bottom: calc(100% + 4px); width: 100%; padding: 9px 14px; color: #7a571c; font-weight: 800; }
.risk-score { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 7px; font-style: normal; font-weight: 900; }
.risk-critical { color: #fff; background: #962d25; }
.risk-high { color: #8f342b; background: #f3d4d0; }
.risk-medium { color: #7d581d; background: #f8e6c3; }
.risk-low { color: #24628f; background: #e3f0fa; }
.severity-pill { display: inline-flex; padding: 4px 9px; border-radius: 20px; font-size: 9px; font-style: normal; font-weight: 800; }

/* Framework and record cards */
.framework-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.framework-card { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 17px; min-height: 280px; padding: 21px; overflow: hidden; }
.framework-card.active-program { border-color: #d8bd83; background: linear-gradient(145deg,#fff,#fffaf0); }
.framework-mark { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 9px; color: #eccb7a; background: #111315; font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.framework-copy { min-width: 0; }
.framework-copy h2 { margin: 10px 0 6px; font-size: 19px; }
.framework-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.framework-meta { display: flex; gap: 24px; margin-top: 18px; }
.framework-meta span { display: flex; flex-direction: column; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.framework-meta b { color: var(--ink); font-size: 13px; text-transform: none; }
.inline-action, .active-detail { grid-column: 1 / -1; margin-top: auto; }
.inline-action > summary { width: max-content; list-style: none; }
.inline-action form { display: grid; grid-template-columns: 180px 1fr auto; align-items: end; gap: 12px; margin-top: 13px; padding-top: 14px; border-top: 1px solid #eee; }
.active-detail { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid #eadbb9; }
.active-detail b { display: flex; align-items: center; gap: 8px; color: #2f683e; }
.active-detail small { color: var(--muted); }
.card-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.record-card { min-width: 0; padding: 20px; }
.record-card > header { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.record-card h2 { margin: 2px 0 0; font-size: 16px; }
.record-card header small { color: #8a6526; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.record-card > p { min-height: 42px; color: var(--muted); font-size: 11px; }
.record-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.record-metrics span { display: flex; min-width: 0; flex-direction: column; }
.record-metrics small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.record-metrics b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.record-action { margin-top: 13px; }
.record-action > summary { display: flex; align-items: center; justify-content: space-between; color: #76551d; font-size: 10px; font-weight: 800; cursor: pointer; list-style: none; }
.record-action form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #eee; }
.record-action form label:last-of-type { grid-column: 1 / -1; }
.record-action form .button { grid-column: 1 / -1; justify-self: end; }

.empty-state { display: flex; min-height: 120px; flex-direction: column; align-items: center; justify-content: center; padding: 22px; color: var(--muted); text-align: center; }
.empty-state b { color: var(--ink); }
.empty-state.compact { min-height: 90px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; padding: 12px 18px; border-left: 4px solid var(--gold); border-radius: 6px; color: #fff; background: #111; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(80px); transition: .25s; }
.toast.visible { opacity: 1; transform: none; }

/* Login */
.login-page { min-height: 100vh; background: #0a0b0c; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(410px,.92fr) 1.2fr; }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 56px clamp(40px,7vw,105px); overflow: hidden; color: #fff; background: radial-gradient(circle at 25% 35%,rgba(216,177,91,.15),transparent 28%), linear-gradient(145deg,#111315,#050606); }
.login-brand-panel::after { position: absolute; right: -180px; bottom: -160px; width: 520px; height: 520px; border: 1px solid rgba(216,177,91,.18); border-radius: 50%; box-shadow: 0 0 0 75px rgba(216,177,91,.025), 0 0 0 150px rgba(216,177,91,.02); content: ""; }
.login-brand-panel .brand { position: static; transform: none; }
.login-brand-panel > div, .login-brand-panel > small { position: relative; z-index: 1; }
.login-brand-panel h1 { margin: 12px 0 18px; font-size: clamp(42px,5vw,68px); line-height: 1.04; letter-spacing: -2.4px; }
.login-brand-panel p:last-child { max-width: 510px; color: #c6c7c5; font-size: 14px; }
.login-brand-panel > small { display: flex; align-items: center; gap: 8px; color: #d7c18d; }
.login-form-panel { display: grid; place-items: center; padding: 35px; background: #f7f7f5; }
.login-card { width: min(440px,100%); padding: 38px; border: 1px solid #ddd; border-radius: 13px; background: #fff; box-shadow: 0 22px 70px rgba(0,0,0,.1); }
.login-card h2 { margin: 0; font-size: 28px; }
.login-intro { margin: 7px 0 24px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form label { margin-top: 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.login-form input { min-height: 48px; }
.login-submit { margin-top: 17px; }

@media (max-width: 1150px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .data-table { overflow-x: auto; }
  .data-table .table-head, .data-table .table-row { min-width: 900px; }
  .controls-table .table-head, .controls-table .table-row { min-width: 760px; }
  .user-copy { display: none; }
}

@media (max-width: 900px) {
  .topbar { height: 72px; padding: 0 16px; }
  .portal-title { display: none; }
  .brand { min-width: 270px; }
  .brand strong { font-size: 14px; letter-spacing: 8px; }
  .mobile-menu { display: block; }
  .sidebar { top: 72px; width: 250px; transform: translateX(-105%); transition: transform .22s; }
  body.menu-open .sidebar { transform: none; box-shadow: 15px 0 50px rgba(0,0,0,.3); }
  .dashboard-main { margin: 72px 0 0; padding: 20px 16px 34px; }
  .dashboard-grid, .framework-grid, .card-card-grid { grid-template-columns: 1fr; }
  .panel.span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-3 { grid-column: 1 / -1; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 390px; padding: 38px; }
  .login-brand-panel h1 { font-size: 45px; }
}

@media (max-width: 620px) {
  .brand { min-width: 205px; gap: 7px; }
  .brand strong { font-size: 12px; letter-spacing: 5px; }
  .brand small { font-size: 6px; letter-spacing: 3px; }
  .icon-button { display: none; }
  .dashboard-welcome, .section-heading { align-items: stretch; flex-direction: column; }
  .dashboard-welcome .button-row, .section-heading .button { width: 100%; }
  .button-row .button { flex: 1; }
  .stat-grid, .mini-stat-grid, .mini-stat-grid.three { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: auto; }
  .file-field { flex-direction: column !important; align-items: flex-start; }
  .file-field input { margin-left: 0; }
  .registry > header { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .inline-action form { grid-template-columns: 1fr; }
  .security-strip { align-items: flex-start; }
  .security-strip > span { display: none; }
  .record-card > header { grid-template-columns: 44px 1fr; }
  .record-card > header > .status { grid-column: 2; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 18px; }
  .login-card { padding: 27px 22px; }
}
