:root {
    --navy-950: #071d2d;
    --navy-900: #0a2942;
    --navy-800: #123b57;
    --navy-100: #dce8ef;
    --teal-700: #14736d;
    --teal-600: #1f887f;
    --teal-100: #dff1ef;
    --amber-700: #9a6907;
    --amber-100: #fff4d8;
    --green-700: #28754d;
    --green-100: #e3f3e9;
    --red-700: #a23b3b;
    --red-100: #fbe7e7;
    --ink: #233746;
    --muted: #71808b;
    --line: #dce4e8;
    --surface: #ffffff;
    --canvas: #f3f6f7;
    --shadow: 0 12px 34px rgba(10, 41, 66, .08);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 30px 20px 22px; color: #d7e4eb; background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 64%, #0d354d); overflow-y: auto; }
.brand, .auth-brand { display: flex; align-items: center; gap: 11px; }
.brand { padding: 0 8px 30px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; color: white; background: var(--teal-600); border-radius: 10px; font-family: Georgia, serif; font-size: 23px; font-weight: 700; box-shadow: 0 8px 22px rgba(31,136,127,.28); }
.brand strong, .auth-brand strong { display: block; color: white; font-size: 14px; letter-spacing: .2px; }
.brand small, .auth-brand small { display: block; margin-top: 3px; color: #9fb3bf; font-size: 9px; letter-spacing: 1.15px; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; margin-top: 28px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; color: #aec0ca; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 600; transition: .2s ease; }
.main-nav a span { width: 20px; color: #7fa1b2; text-align: center; font-size: 17px; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.06); }
.main-nav a.active { color: white; background: linear-gradient(90deg, rgba(31,136,127,.3), rgba(31,136,127,.13)); border-color: rgba(101,193,185,.16); box-shadow: inset 3px 0 var(--teal-600); }
.main-nav a.active span { color: #66c1ba; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.035); }
.secure-dot { width: 9px; height: 9px; border: 2px solid #77d1a4; border-radius: 50%; box-shadow: 0 0 0 4px rgba(119,209,164,.1); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { color: #dbe8ee; font-size: 10px; text-transform: uppercase; letter-spacing: .65px; }
.sidebar-footer small { margin-top: 2px; color: #7f99a7; font-size: 9px; }

.main-content { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 19px 38px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.eyebrow { display: block; margin-bottom: 6px; color: var(--teal-700); font-size: 9px; font-weight: 800; letter-spacing: 1.35px; text-transform: uppercase; }
.topbar h1 { margin: 0; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.language-switch, .document-language, .pdf-language { display: inline-flex; padding: 3px; background: #eef2f4; border: 1px solid var(--line); border-radius: 9px; }
.language-switch a, .document-language a, .pdf-language a { min-width: 32px; padding: 7px 8px; color: #788791; border-radius: 6px; font-size: 10px; font-weight: 800; text-align: center; }
.language-switch a.active, .document-language a.active, .pdf-language a.active { color: white; background: var(--navy-900); box-shadow: 0 2px 8px rgba(10,41,66,.15); }
.user-menu { display: flex; align-items: center; gap: 9px; padding-left: 16px; border-left: 1px solid var(--line); }
.avatar { width: 35px; height: 35px; display: inline-grid; place-items: center; color: var(--navy-900); background: var(--teal-100); border-radius: 50%; font-weight: 800; }
.user-menu strong, .user-menu small { display: block; }
.user-menu strong { max-width: 130px; overflow: hidden; color: var(--navy-900); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; }
.page-body { width: 100%; max-width: 1500px; margin: 0 auto; padding: 30px 38px 55px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: auto; padding: 18px 38px; color: #8a979f; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .4px; }

.flash { max-width: 1500px; margin: 18px 38px -5px; padding: 12px 16px; color: var(--navy-900); background: var(--teal-100); border: 1px solid #b8ddd9; border-radius: 10px; font-size: 12px; font-weight: 600; }
.flash.error { color: #7f2626; background: var(--red-100); border-color: #eec5c5; }
.flash.success { color: #175c3a; background: var(--green-100); border-color: #b9dec8; }

.hero-panel { position: relative; overflow: hidden; min-height: 235px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 38px 40px; color: white; background: linear-gradient(116deg, #09263b 0%, #0b3c54 63%, #146b6a 120%); border-radius: 19px; box-shadow: 0 18px 42px rgba(10,41,66,.16); }
.hero-panel::before, .hero-panel::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); }
.hero-panel::before { width: 340px; height: 340px; right: -70px; top: -180px; }
.hero-panel::after { width: 220px; height: 220px; right: 110px; bottom: -185px; }
.hero-panel > * { position: relative; z-index: 1; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: #8bd2c9; font-size: 9px; font-weight: 800; letter-spacing: 1.25px; }
.hero-kicker i { width: 7px; height: 7px; background: #6bd4a0; border-radius: 50%; box-shadow: 0 0 0 5px rgba(107,212,160,.12); }
.hero-panel h2 { margin: 0; max-width: 670px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 3.2vw, 46px); font-weight: 500; line-height: 1.06; letter-spacing: -.7px; }
.hero-panel h2 em { color: #86cec7; font-style: italic; }
.hero-panel p { max-width: 680px; margin: 17px 0 0; color: #b6cbd5; font-size: 12px; line-height: 1.7; }

.button { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .15px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--navy-900); box-shadow: 0 8px 19px rgba(10,41,66,.16); }
.button.secondary { color: var(--navy-900); background: white; border-color: var(--line); }
.button.ghost { color: var(--navy-900); background: transparent; border-color: var(--line); }
.button.light { min-width: 165px; color: var(--navy-900); background: white; box-shadow: 0 10px 28px rgba(0,0,0,.13); }
.button.small { min-height: 34px; padding: 0 12px; font-size: 10px; }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }

.system-hero { align-items: center; }
.system-overall { display: inline-flex; align-items: center; justify-content: center; min-width: 170px; min-height: 42px; padding: 0 16px; border-radius: 99px; font-size: 9px; font-weight: 900; letter-spacing: .55px; }
.system-overall.pass, .check-result.pass { color: var(--green-700); background: var(--green-100); }
.system-overall.fail, .check-result.fail { color: var(--red-700); background: var(--red-100); }
.system-overall.pending { color: var(--amber-700); background: var(--amber-100); }
.check-result { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 99px; font-size: 8px; font-weight: 900; letter-spacing: .45px; }
.system-table td:first-child { width: 34%; }
.system-table td:nth-child(2) { width: 110px; }
.browser-check-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 24px; }
.browser-check-panel h2 { margin-top: 5px; color: var(--navy-900); font-family: Georgia, serif; font-size: 22px; }
.browser-check-panel p { margin-top: 8px; color: var(--muted); font-size: 10px; }
.system-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 20px 0; }
.metric-card { min-height: 106px; display: flex; align-items: center; gap: 15px; padding: 18px 19px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 18px rgba(10,41,66,.035); }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; font-size: 18px; }
.metric-icon.navy { color: var(--navy-900); background: #e5edf2; }
.metric-icon.amber { color: var(--amber-700); background: var(--amber-100); }
.metric-icon.teal { color: var(--teal-700); background: var(--teal-100); }
.metric-icon.green { color: var(--green-700); background: var(--green-100); }
.metric-card span, .metric-card small, .metric-card strong { display: block; }
.metric-card span { color: #73818b; font-size: 9px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
.metric-card strong { margin-top: 3px; color: var(--navy-900); font-family: Georgia, serif; font-size: 27px; font-weight: 600; line-height: 1; }
.metric-card small { margin-top: 5px; color: #9aa5ab; font-size: 8.5px; }

.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 25px rgba(10,41,66,.04); }
.panel-header { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 23px; border-bottom: 1px solid var(--line); }
.panel-header.compact { min-height: 70px; }
.panel-header h2 { margin: 0; color: var(--navy-900); font-family: Georgia, serif; font-size: 20px; font-weight: 600; }
.search-form { height: 38px; display: flex; align-items: center; overflow: hidden; width: min(390px, 45vw); background: #f6f8f9; border: 1px solid var(--line); border-radius: 9px; }
.search-form span { padding-left: 12px; color: #87959d; }
.search-form input { min-width: 0; flex: 1; padding: 0 10px; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 11px; }
.search-form button { height: 100%; padding: 0 13px; color: white; background: var(--navy-900); border: 0; font-size: 9px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 18px; color: #81909a; background: #f8fafb; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 800; letter-spacing: .65px; text-align: left; text-transform: uppercase; }
.data-table td { padding: 17px 18px; border-bottom: 1px solid #e7ecef; vertical-align: middle; font-size: 11px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfc; }
.data-table td strong, .data-table td span, .data-table td small { display: block; }
.data-table td strong { color: var(--ink); font-size: 10.5px; }
.data-table td span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.data-table td small { margin-top: 4px; color: #98a3aa; font-size: 8px; }
.case-number { color: var(--navy-900); font-size: 11px; font-weight: 800; }
.status-badge { width: fit-content; display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 9px; color: var(--navy-800); background: #e7eef2; border-radius: 99px; font-size: 8px !important; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.status-badge i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-badge.awaiting_authority { color: var(--amber-700); background: var(--amber-100); }
.status-badge.action_required { color: var(--red-700); background: var(--red-100); }
.status-badge.notified { color: var(--teal-700); background: var(--teal-100); }
.status-badge.closed { color: var(--green-700); background: var(--green-100); }
.row-action { width: 31px; height: 31px; display: grid; place-items: center; margin-left: auto; color: var(--navy-900); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.empty-state { padding: 40px !important; color: var(--muted); text-align: center !important; }
.archive-panel { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 20px; padding: 25px 27px; }
.archive-panel h2 { margin: 0; color: var(--navy-900); font-family: Georgia, serif; font-size: 20px; }
.archive-panel p { max-width: 650px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.archive-visual { min-width: 200px; display: grid; grid-template-columns: 48px auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; padding: 12px; background: #f4f7f8; border: 1px solid var(--line); border-radius: 11px; }
.archive-visual > span { grid-row: 1 / 3; display: grid; place-items: center; width: 48px; height: 48px; color: white; background: var(--navy-900); border-radius: 8px; font-size: 10px; font-weight: 800; }
.archive-visual strong { color: var(--navy-900); font-size: 11px; }
.archive-visual small { color: var(--muted); font-size: 9px; }

.case-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 20px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--teal-700); font-size: 10px; font-weight: 800; }
.case-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-heading h2 { margin: 0; color: var(--navy-900); font-family: Georgia, serif; font-size: 30px; font-weight: 600; }
.case-heading p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.case-heading-actions, .case-heading-actions { display: flex; gap: 8px; }
.case-meta-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 19px; background: var(--navy-900); border-radius: 13px; }
.case-meta-strip > div { min-height: 76px; padding: 17px 20px; border-right: 1px solid rgba(255,255,255,.12); }
.case-meta-strip > div:last-child { border: 0; }
.case-meta-strip span, .case-meta-strip strong { display: block; }
.case-meta-strip span { color: #87a1b0; font-size: 8px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
.case-meta-strip strong { margin-top: 7px; color: white; font-size: 11px; }
.case-meta-strip .deadline-text { color: #ffd780; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, .72fr); gap: 19px; align-items: start; }
.case-main, .case-sidebar { display: grid; gap: 19px; }
.source-badge, .count-pill { padding: 6px 9px; color: var(--teal-700); background: var(--teal-100); border-radius: 99px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.detail-grid > div { min-height: 110px; padding: 20px 23px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(even) { border-right: 0; }
.detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-grid span, .detail-grid strong, .detail-grid small { display: block; }
.detail-grid span { color: #83919a; font-size: 8px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.detail-grid strong { margin-top: 7px; color: var(--navy-900); font-size: 11px; line-height: 1.45; }
.detail-grid small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.notification-panel { overflow: hidden; }
.regulatory-note { display: flex; align-items: flex-start; gap: 12px; margin: 20px 23px 5px; padding: 14px 15px; color: #75530d; background: var(--amber-100); border: 1px solid #efd48e; border-left: 4px solid #d19a29; border-radius: 9px; }
.regulatory-note strong { white-space: nowrap; font-size: 9px; text-transform: uppercase; letter-spacing: .55px; }
.regulatory-note span { font-size: 10px; line-height: 1.5; }
.content-block { display: grid; grid-template-columns: 33px 1fr; gap: 10px; padding: 22px 23px; border-bottom: 1px solid var(--line); }
.content-block:last-child { border-bottom: 0; }
.content-block > span { color: var(--teal-600); font-size: 9px; font-weight: 800; }
.content-block h3 { margin: 0 0 9px; color: var(--navy-900); font-size: 11px; text-transform: uppercase; letter-spacing: .45px; }
.content-block p { margin: 0; color: #4a5b67; font-size: 11px; line-height: 1.75; }
.content-block.accent { background: #f4faf9; box-shadow: inset 3px 0 var(--teal-600); }
.action-list { display: grid; }
.action-item { display: grid; grid-template-columns: 30px minmax(0,1fr) auto 105px; align-items: center; gap: 11px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.action-item:last-child { border-bottom: 0; }
.action-item.completed { opacity: .62; }
.action-check { width: 25px; height: 25px; display: grid; place-items: center; color: var(--teal-700); background: var(--teal-100); border-radius: 50%; font-weight: 800; }
.action-copy strong, .action-copy span { display: block; }
.action-copy strong { color: var(--ink); font-size: 10.5px; line-height: 1.5; }
.action-copy span { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.priority-tag { padding: 5px 8px; color: var(--navy-800); background: #e6edf1; border-radius: 99px; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.priority-tag.high, .priority-tag.critical { color: var(--red-700); background: var(--red-100); }
.action-item select { width: 100%; padding: 7px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 8px; }
.side-panel { padding: 20px; }
.side-panel h3 { margin: 0 0 16px; color: var(--navy-900); font-family: Georgia, serif; font-size: 17px; }
.side-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.side-heading > span { min-width: 24px; height: 24px; display: grid; place-items: center; color: white; background: var(--navy-900); border-radius: 50%; font-size: 9px; font-weight: 800; }
.side-details { display: grid; gap: 0; margin: 0; }
.side-details div { padding: 10px 0; border-top: 1px solid var(--line); }
.side-details dt { color: #87949c; font-size: 7.5px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; }
.side-details dd { margin: 5px 0 0; color: var(--ink); font-size: 10px; line-height: 1.45; }
.document-list { display: grid; gap: 7px; }
.document-list a { display: grid; grid-template-columns: 34px minmax(0,1fr) 14px; align-items: center; gap: 9px; padding: 9px; background: #f7f9fa; border: 1px solid #e4eaed; border-radius: 8px; }
.file-icon { width: 32px; height: 34px; display: grid; place-items: center; color: #8a3838; background: #fae7e7; border-radius: 6px; font-size: 7px; font-weight: 900; }
.file-icon.output { color: white; background: var(--navy-900); }
.document-list strong, .document-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-list strong { color: var(--ink); font-size: 8.5px; }
.document-list small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.document-list b { color: var(--teal-700); }
.upload-form { display: grid; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.upload-drop { display: grid; place-items: center; min-height: 103px; padding: 13px; color: var(--muted); border: 1px dashed #b7c7cf; border-radius: 9px; cursor: pointer; text-align: center; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-drop > span { color: var(--teal-700); font-size: 22px; }
.upload-drop strong { color: var(--navy-900); font-size: 9px; }
.upload-drop small { font-size: 7px; }
.muted { color: var(--muted); font-size: 10px; line-height: 1.5; }
.timeline-list { position: relative; display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.timeline-list::before { content: ""; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.timeline-list li { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 10px; }
.timeline-list i { z-index: 1; width: 9px; height: 9px; margin-top: 2px; background: var(--teal-600); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #9bc9c5; }
.timeline-list strong, .timeline-list span, .timeline-list small { display: block; }
.timeline-list strong { color: var(--ink); font-size: 8.5px; }
.timeline-list span { margin-top: 3px; color: var(--muted); font-size: 7.5px; }
.timeline-list small { margin-top: 2px; color: #9ca6ac; font-size: 7px; }

.case-form { display: grid; gap: 18px; }
.form-toolbar { position: sticky; z-index: 4; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 14px; background: rgba(243,246,247,.93); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(12px); }
.form-toolbar > div { display: flex; align-items: center; gap: 11px; }
.record-id { color: var(--navy-900); font-size: 10px; font-weight: 800; }
.form-section { padding: 23px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(10,41,66,.035); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 21px; }
.section-heading > span { min-width: 30px; padding-top: 3px; color: var(--teal-700); font-size: 9px; font-weight: 900; }
.section-heading > div { flex: 1; }
.section-heading h2 { margin: 0; color: var(--navy-900); font-family: Georgia, serif; font-size: 20px; font-weight: 600; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.field > span { color: #61717c; font-size: 8px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; color: var(--ink); background: #fbfcfc; border: 1px solid #d7e0e4; border-radius: 8px; outline: 0; font-size: 10.5px; line-height: 1.45; transition: border .15s ease, box-shadow .15s ease; }
.field input, .field select { min-height: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #70aaa5; box-shadow: 0 0 0 3px rgba(31,136,127,.1); background: white; }
.info-field { padding: 11px; background: #f3f7f8; border: 1px solid var(--line); border-radius: 8px; }
.info-field strong { color: var(--navy-900); font-size: 10px; }
.check-field { display: flex; align-items: flex-start; gap: 9px; padding: 11px; background: #f5faf9; border: 1px solid #cee4e1; border-radius: 9px; cursor: pointer; }
.check-field input { margin-top: 3px; accent-color: var(--teal-700); }
.check-field strong, .check-field small { display: block; }
.check-field strong { color: var(--navy-900); font-size: 9.5px; }
.check-field small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.translation-tabs { margin-top: 20px; }
.tab-buttons { display: flex; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab-buttons button { padding: 8px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 800; }
.tab-buttons button.active { color: white; background: var(--navy-900); }
.tab-panel { display: none; padding-top: 18px; }
.tab-panel.active { display: block; }
.action-editor { display: grid; gap: 12px; }
.action-edit-row { padding: 17px; background: #f8fafb; border: 1px solid var(--line); border-radius: 11px; }
.action-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.action-row-top strong { color: var(--navy-900); font-size: 9px; text-transform: uppercase; letter-spacing: .45px; }
.remove-action { width: 27px; height: 27px; display: grid; place-items: center; color: var(--red-700); background: var(--red-100); border: 0; border-radius: 7px; cursor: pointer; font-size: 17px; }
.form-submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 19px; color: white; background: var(--navy-900); border-radius: 13px; }
.form-submit-bar strong, .form-submit-bar span { display: block; }
.form-submit-bar strong { font-size: 10px; }
.form-submit-bar span { margin-top: 3px; color: #97adba; font-size: 8px; }
.form-submit-bar .button { color: var(--navy-900); background: white; }
.hidden { display: none !important; }

.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: radial-gradient(circle at 80% 12%, rgba(31,136,127,.18), transparent 29%), linear-gradient(135deg, var(--navy-950), #0a324a); }
.auth-card, .install-card { width: min(440px, 100%); padding: 32px; background: white; border: 1px solid rgba(255,255,255,.3); border-radius: 19px; box-shadow: 0 35px 80px rgba(0,0,0,.24); }
.install-card { width: min(820px, 100%); }
.install-preflight { display: grid; gap: 5px; margin: 18px 0; padding: 13px 15px; border: 1px solid; border-radius: 10px; }
.install-preflight strong { font-size: 10px; }
.install-preflight span { font-size: 8.5px; line-height: 1.55; }
.install-preflight.pass { color: var(--green-700); background: var(--green-100); border-color: #afdabe; }
.install-preflight.fail { color: var(--red-700); background: var(--red-100); border-color: #e6bcbc; }
.auth-brand { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-brand strong { color: var(--navy-900); }
.auth-brand small { color: var(--muted); }
.auth-copy, .install-heading { padding: 27px 0 18px; }
.auth-copy h1, .install-heading h1 { margin: 0; color: var(--navy-900); font-family: Georgia, serif; font-size: 29px; font-weight: 600; }
.auth-copy p, .install-heading p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.auth-form, .install-form { display: grid; gap: 15px; }
.install-form .form-section { padding: 19px; box-shadow: none; background: #fbfcfc; }
.auth-security { margin-top: 19px; padding-top: 16px; color: #87949c; border-top: 1px solid var(--line); font-size: 8px; text-align: center; }
.auth-security span { color: var(--green-700); }

@media (max-width: 1180px) {
    .app-shell { grid-template-columns: 80px minmax(0,1fr); }
    .sidebar { padding: 27px 13px; }
    .brand { justify-content: center; padding: 0 0 25px; }
    .brand > span + span, .main-nav a:not(.active) { font-size: 0; }
    .brand > span + span, .main-nav a { justify-content: center; }
    .main-nav a { padding: 0; }
    .main-nav a span { font-size: 18px; }
    .main-nav a.active { font-size: 0; }
    .sidebar-footer { justify-content: center; }
    .sidebar-footer div { display: none; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .case-layout { grid-template-columns: 1fr; }
    .case-sidebar { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
}

@media (max-width: 800px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; display: block; padding: 15px; }
    .brand, .sidebar-footer { display: none; }
    .main-nav { grid-template-columns: repeat(4, 1fr); margin: 0; }
    .main-nav a { min-height: 40px; font-size: 0; }
    .topbar { min-height: 74px; padding: 14px 18px; }
    .topbar h1 { font-size: 20px; }
    .user-menu { display: none; }
    .page-body { padding: 20px 16px 40px; }
    .hero-panel { min-height: 290px; flex-direction: column; align-items: flex-start; padding: 28px; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .panel-header { align-items: flex-start; flex-direction: column; }
    .search-form { width: 100%; }
    .case-heading { align-items: flex-start; flex-direction: column; }
    .case-meta-strip { grid-template-columns: 1fr 1fr; }
    .case-meta-strip > div:nth-child(2) { border-right: 0; }
    .case-meta-strip > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
    .case-sidebar { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid > div { border-right: 0; }
    .detail-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
    .detail-grid > div:last-child { border-bottom: 0; }
    .action-item { grid-template-columns: 30px minmax(0,1fr); }
    .action-item .priority-tag, .action-item form { grid-column: 2; }
    .form-grid.four, .form-grid.two { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .archive-panel, .form-submit-bar { align-items: flex-start; flex-direction: column; }
    .archive-visual { width: 100%; }
    .app-footer { padding: 16px; flex-direction: column; }
}

@media (max-width: 520px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .topbar-actions .language-switch { display: none; }
    .case-meta-strip { grid-template-columns: 1fr; }
    .case-meta-strip > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .case-heading-actions { width: 100%; flex-direction: column; }
    .case-heading-actions .button { width: 100%; }
    .auth-page { padding: 15px; }
    .auth-card, .install-card { padding: 23px; }
}
