:root {
  --bg: #f2f4ef;
  --surface: #ffffff;
  --surface-2: #f7f9f6;
  --ink: #18211c;
  --muted: #6e7b73;
  --line: #e1e7e2;
  --green-950: #0a1f17;
  --green-900: #102a1f;
  --green-800: #17382a;
  --green-700: #24533f;
  --green-500: #4d8269;
  --green-100: #e6f0e9;
  --gold: #d4ae55;
  --gold-soft: #f3ead2;
  --red: #ad423d;
  --red-soft: #fae9e7;
  --amber: #a06c18;
  --amber-soft: #fbf0d9;
  --blue: #376a82;
  --blue-soft: #e7f1f5;
  --radius: 18px;
  --shadow: 0 9px 30px rgba(26, 44, 34, .07);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 282px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--green-950), #0d271d); color: #fff; padding: 22px 17px; display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 7px 22px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: #17241d; font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.brand-title { font-size: 13px; font-weight: 900; letter-spacing: .06em; }
.brand-subtitle { color: #9eb0a6; font-size: 10px; margin-top: 4px; }
.nav-label { color: #668277; font-weight: 800; font-size: 9px; letter-spacing: .17em; padding: 15px 12px 7px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #bdccc4; border-radius: 11px; padding: 10px 11px; display: grid; grid-template-columns: 27px 1fr auto; gap: 8px; align-items: center; text-align: left; font-size: 12px; font-weight: 650; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.09); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav-icon { color: #78998a; font-size: 9px; font-weight: 800; }
.nav-item.active .nav-icon { color: var(--gold); }
.badge { background: #9e413e; color: #fff; border-radius: 999px; min-width: 22px; text-align: center; padding: 3px 7px; font-size: 10px; }
.badge.amber { background: #8d681c; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.secure-card { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); border-radius: 12px; padding: 11px; margin-bottom: 8px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.secure-dot { width: 9px; height: 9px; border-radius: 50%; background: #65c58f; box-shadow: 0 0 0 4px rgba(101,197,143,.1); }
.secure-card strong { display: block; font-size: 11px; }
.secure-card small { display: block; color: #91aa9e; font-size: 9px; margin-top: 3px; }
.nav-item.secondary { color: #819a8f; }

.main { min-width: 0; padding: 0 32px 42px; }
.topbar { height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 5px; }
h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.menu-btn { display: none; border: 0; background: var(--surface); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); position: relative; font-size: 11px; font-weight: 800; }
.notif-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--red); border: 2px solid #fff; border-radius: 50%; }
.notification-wrap { position: relative; }
.notification-panel { position: absolute; top: 50px; right: 0; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(18, 40, 29, .18); z-index: 120; overflow: hidden; }
.notification-panel[hidden] { display: none; }
.notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.notification-head h3 { margin: 4px 0 0; font-size: 15px; }
.notification-read-all { border: 0; background: transparent; color: var(--green-700); font-size: 9px; font-weight: 800; padding: 3px 0; cursor: pointer; white-space: nowrap; }
.notification-list { max-height: 390px; overflow-y: auto; }
.notification-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; text-align: left; padding: 13px 16px; cursor: pointer; color: var(--ink); }
.notification-item:hover { background: #f8fbf9; }
.notification-item.is-read { background: #fcfdfc; }
.notification-bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 4px; box-shadow: 0 0 0 3px rgba(181, 68, 68, .08); }
.notification-item.is-read .notification-bullet { background: #c8d2cc; box-shadow: none; }
.notification-copy strong { display: block; font-size: 10px; line-height: 1.35; }
.notification-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.notification-time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.notification-footer { padding: 10px 16px; color: var(--muted); font-size: 8px; background: #fafcfa; }
.icon-btn { cursor: pointer; }
.icon-btn:focus-visible { outline: 3px solid rgba(24, 104, 73, .2); outline-offset: 2px; }
.profile { display: flex; align-items: center; gap: 9px; }
.avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--green-900); color: #fff; font-size: 12px; font-weight: 900; }
.profile-copy { display: flex; flex-direction: column; font-size: 11px; }
.profile-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.view { display: none; }
.view.active { display: block; }
.hero { background: linear-gradient(135deg, #153a2a, #102b20 64%, #274b3a); color: #fff; border-radius: 22px; padding: 27px 29px; display: flex; justify-content: space-between; align-items: center; gap: 22px; box-shadow: var(--shadow); }
.hero.compact-hero { padding: 24px 28px; margin-bottom: 18px; }
.hero-kicker, .section-label { font-size: 9px; letter-spacing: .15em; font-weight: 900; color: #76887f; }
.hero-kicker { color: #c3d2ca; }
.hero h2 { margin: 7px 0 7px; font-size: 27px; letter-spacing: -.03em; }
.hero p { margin: 0; max-width: 680px; font-size: 12px; line-height: 1.55; color: #b7c8bf; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-size: 11px; font-weight: 800; }
.btn-primary { background: var(--gold); color: #1b271f; }
.btn-light { background: #f6f8f5; border: 1px solid #e5e9e5; color: #24342b; }
.hero .btn-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); color: #fff; }
.link-btn { border: 0; background: none; padding: 5px; color: var(--green-500); font-size: 10px; font-weight: 800; }

.dashboard-section-head { display: flex; justify-content: space-between; align-items: end; margin: 21px 2px 10px; }
.dashboard-section-head.materiel-head { margin-top: 6px; }
.dashboard-section-head h3 { margin: 4px 0 0; font-size: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: 0 4px 18px rgba(21,48,34,.035); }
.stat-card.featured { border-color: #d7dfd7; background: linear-gradient(180deg,#fff,#fbfcfa); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 650; }
.stat-code { min-width: 30px; height: 27px; padding: 0 7px; display: grid; place-items: center; border-radius: 8px; background: var(--green-100); color: var(--green-700); font-size: 8px; font-weight: 900; letter-spacing: .05em; }
.stat-code.red { background: var(--red-soft); color: var(--red); }
.stat-code.amber { background: var(--amber-soft); color: var(--amber); }
.stat-code.green { background: #e4f2e8; color: #3d7656; }
.stat-value { margin: 11px 0 7px; font-size: 29px; font-weight: 850; letter-spacing: -.04em; }
.stat-meta { color: var(--muted); font-size: 9px; }
.stat-meta.positive { color: #407558; }

.content-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 15px; margin-bottom: 15px; }
.bottom-grid { grid-template-columns: 1.4fr .8fr; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: 0 4px 18px rgba(21,48,34,.035); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { margin: 4px 0 0; font-size: 16px; }
.panel-head h4 { margin: 4px 0 0; }
.count-pill { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 800; }
.muted-small { color: var(--muted); font-size: 9px; }

.action-list { display: flex; flex-direction: column; gap: 9px; }
.command-action { display: grid; grid-template-columns: 4px 1fr auto; gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; cursor: pointer; transition: .18s ease; }
.command-action:hover { transform: translateY(-1px); box-shadow: 0 8px 19px rgba(20,45,34,.065); }
.action-stripe { align-self: stretch; border-radius: 99px; background: var(--gold); }
.action-stripe.red { background: var(--red); }
.action-stripe.amber { background: var(--amber); }
.action-stripe.blue { background: var(--blue); }
.command-action strong { display: block; font-size: 11px; }
.command-action span { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.command-action .action-type { font-size: 8px; font-weight: 900; color: var(--green-700); margin: 0 0 3px; letter-spacing: .08em; }
.action-chevron { color: #9aa49f; font-weight: 900; }

.readiness-meter { display: flex; align-items: center; gap: 18px; margin: 5px 0 17px; }
.readiness-ring { width: 105px; height: 105px; border-radius: 50%; background: conic-gradient(var(--green-500) 0 85%, #e8ece9 85% 100%); display: grid; place-items: center; flex: 0 0 auto; }
.readiness-ring:before { content: ""; position: absolute; }
.readiness-ring > div { width: 75px; height: 75px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; text-align: center; }
.readiness-ring strong { font-size: 20px; }
.readiness-ring span { color: var(--muted); font-size: 8px; margin-top: 2px; }
.readiness-copy strong { display: block; font-size: 20px; }
.readiness-copy span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.category-mini-list { display: flex; flex-direction: column; gap: 8px; }
.category-mini { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.category-mini strong { font-size: 10px; }
.category-mini span { color: var(--muted); font-size: 9px; }
.category-mini-bar { grid-column: 1/-1; height: 5px; background: #edf0ed; border-radius: 99px; overflow: hidden; }
.category-mini-bar i { display: block; height: 100%; background: var(--green-500); border-radius: 99px; }

.activity-feed { display: flex; flex-direction: column; }
.activity-row { display: grid; grid-template-columns: 54px 10px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid #edf0ed; }
.activity-row:last-child { border-bottom: 0; }
.activity-time { color: var(--muted); font-size: 9px; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); margin-top: 3px; }
.activity-dot.gold { background: var(--gold); }
.activity-dot.red { background: var(--red); }
.activity-copy strong { display: block; font-size: 10px; }
.activity-copy span { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.activity-tag { font-size: 8px; border-radius: 999px; padding: 4px 7px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.quality-score { background: var(--green-900); color: white; border-radius: 14px; padding: 17px; margin-bottom: 13px; }
.quality-score strong { display: block; font-size: 26px; }
.quality-score span { font-size: 9px; color: #aabdb3; }
.quality-list { display: flex; flex-direction: column; gap: 9px; }
.quality-list div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #edf0ed; font-size: 10px; }
.quality-list div:last-child { border: 0; }

.page-actions { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search-wrap { min-width: 280px; flex: 1; max-width: 520px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 0 12px; }
.search-wrap span { color: #8a958f; font-size: 9px; font-weight: 800; }
.search-wrap input { width: 100%; padding: 11px 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.toolbar-actions { display: flex; gap: 8px; }
select, input[type="date"], textarea { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
select { padding: 10px 28px 10px 11px; font-size: 10px; }
.list-panel { padding: 0; overflow: hidden; }
.list-panel .panel-head { padding: 18px 19px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 850px; }
th { text-align: left; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: #89958f; padding: 11px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfa; }
td { padding: 12px 14px; border-bottom: 1px solid #edf0ed; font-size: 10px; color: #38443d; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fbfcfa; }
.letter-title { display: block; color: var(--ink); font-weight: 750; max-width: 310px; }
.letter-number { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.priority { display: inline-flex; padding: 5px 7px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 7px; font-weight: 900; letter-spacing: .06em; }
.priority.high { background: var(--red-soft); color: var(--red); }
.priority.medium { background: var(--amber-soft); color: var(--amber); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: #e6f2ea; color: #3c7254; font-size: 8px; font-weight: 850; white-space: nowrap; }
.status-pill.red { background: var(--red-soft); color: var(--red); }
.status-pill.amber { background: var(--amber-soft); color: var(--amber); }
.status-pill.gray { background: #edf0ee; color: #657169; }
.status-pill.blue { background: var(--blue-soft); color: var(--blue); }
.table-action { border: 0; background: transparent; color: var(--green-500); font-weight: 900; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.category-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.category-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px; cursor: pointer; }
.category-card:hover { border-color: #ccd9d0; background: #fbfcfa; }
.category-card-head { display: flex; justify-content: space-between; gap: 10px; }
.category-card strong { font-size: 11px; }
.category-card .big { display: block; margin-top: 9px; font-size: 22px; font-weight: 850; }
.category-card small { color: var(--muted); font-size: 8px; }
.category-card .mini-status { margin-top: 9px; display: flex; gap: 10px; font-size: 8px; color: var(--muted); }
.status-bars { display: flex; flex-direction: column; gap: 13px; }
.status-bar-row .row-head { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; margin-bottom: 6px; }
.status-bar-row .bar { height: 7px; background: #edf0ed; border-radius: 99px; overflow: hidden; }
.status-bar-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green-500); }
.status-bar-row.warning .bar i { background: var(--amber); }
.status-bar-row.danger .bar i { background: var(--red); }
.status-bar-row.blue .bar i { background: var(--blue); }

.maintenance-list { display: flex; flex-direction: column; gap: 9px; }
.maintenance-item { border: 1px solid var(--line); border-radius: 13px; padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 12px; cursor: pointer; }
.maintenance-item:hover { background: #fbfcfa; }
.maintenance-item strong { display: block; font-size: 11px; }
.maintenance-item span { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.maintenance-meta { text-align: right; }
.maintenance-meta strong { color: var(--amber); }

.tracking-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.track-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
.track-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.track-head strong { font-size: 11px; }
.track-head span { color: var(--muted); font-size: 9px; }
.timeline { position: relative; margin-top: 15px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; padding-bottom: 13px; }
.timeline-item:before { content: ""; position: absolute; left: 3px; top: 8px; bottom: -3px; width: 1px; background: #dce3de; }
.timeline-item:last-child:before { display: none; }
.timeline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); margin-top: 3px; z-index: 1; }
.timeline-item strong { font-size: 9px; }
.timeline-item span:last-child { grid-column: 2; color: var(--muted); font-size: 8px; margin-top: 3px; }
.movement-timeline .timeline-item { grid-template-columns: 13px 120px 1fr; }
.movement-timeline .timeline-item strong { grid-column: 3; }
.movement-timeline .timeline-item span:last-child { grid-column: 3; }
.movement-date { color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8,19,14,.55); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 80; }
.modal-backdrop.open { display: flex; }
.modal { width: min(720px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 25px 70px rgba(0,0,0,.18); position: relative; }
.asset-modal { width: min(790px, 100%); }
.modal-close { position: absolute; right: 17px; top: 16px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: #f1f3f1; color: #5d6962; }
.modal-header, .asset-modal-head { display: flex; justify-content: space-between; gap: 15px; align-items: start; padding-right: 38px; }
.modal-header h2, .asset-modal-head h2 { font-size: 20px; margin: 6px 0 0; }
.asset-code-block .mono { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 19px 0; }
.detail-grid > div { border: 1px solid var(--line); background: var(--surface-2); border-radius: 11px; padding: 11px; }
.detail-grid span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 4px; }
.detail-grid strong { font-size: 10px; }
.document-preview { border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.doc-icon { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 9px; font-weight: 900; }
.document-preview strong { display: block; font-size: 10px; }
.document-preview span { display: block; font-size: 8px; color: var(--muted); margin-top: 3px; }
.modal-section { margin-top: 18px; }
.modal-section h4 { margin: 0 0 6px; font-size: 12px; }
.modal-section p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 9px; font-weight: 800; color: #526059; }
.form-grid label.full { grid-column: 1/-1; }
.form-grid select, .form-grid input, .form-grid textarea { padding: 10px; }
.asset-qr-row { display: grid; grid-template-columns: 68px 1fr; gap: 13px; align-items: center; border: 1px dashed #ccd5cf; background: #fafbfa; border-radius: 13px; padding: 12px; }
.fake-qr { width: 62px; height: 62px; display: grid; place-items: center; border: 8px double #20352a; background: repeating-linear-gradient(45deg,#20352a 0 4px,#fff 4px 8px); }
.fake-qr span { background: #fff; border: 2px solid #20352a; padding: 3px; font-size: 8px; font-weight: 900; }
.asset-qr-row strong { font-size: 10px; }
.asset-qr-row p { margin: 4px 0 0; font-size: 8px; line-height: 1.5; color: var(--muted); }
.compact-timeline { margin-top: 6px; }

.empty-state { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-icon { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); font-weight: 900; }
.empty-state h3 { margin: 13px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #17261e; color: #fff; border-radius: 11px; padding: 11px 15px; font-size: 10px; box-shadow: var(--shadow); transition: .2s ease; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 240px 1fr; }
  .main { padding: 0 22px 35px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid, .bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -290px; width: 276px; transition: left .2s ease; box-shadow: 14px 0 40px rgba(0,0,0,.14); }
  .sidebar.open { left: 0; }
  .main { padding: 0 16px 28px; }
  .menu-btn { display: inline-flex; }
  .profile-copy { display: none; }
  .hero { align-items: flex-start; flex-direction: column; }
  .page-actions { flex-direction: column; }
  .search-wrap { max-width: none; min-width: 0; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions select { flex: 1; }
  .tracking-content { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { height: 80px; }
  .eyebrow { display: none; }
  h1 { font-size: 20px; }
  .topbar-actions .icon-btn { display: grid; }
  .notification-panel { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 88px); }
  .hero { border-radius: 16px; padding: 22px; }
  .hero h2 { font-size: 23px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 24px; }
  .panel { padding: 15px; }
  .category-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .document-preview { grid-template-columns: auto 1fr; }
  .document-preview .btn { grid-column: 1/-1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.full { grid-column: 1; }
  .toolbar-actions { flex-wrap: wrap; }
  .toolbar-actions .btn { flex: 1; }
  .readiness-meter { align-items: flex-start; }
  .movement-timeline .timeline-item { grid-template-columns: 13px 1fr; }
  .movement-timeline .timeline-item strong, .movement-timeline .timeline-item span:last-child { grid-column: 2; }
  .movement-date { grid-column: 2; margin-bottom: 3px; }
}

/* Admin workspace additions */
.role-switch-wrap { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 5px 6px 5px 9px; }
.role-switch-wrap > span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.role-switcher { border: 0; background: var(--surface-2); padding: 7px 24px 7px 9px; font-size: 9px; font-weight: 800; }
.admin-hero { background: linear-gradient(135deg, #183b2c, #153126 58%, #3b543a); }
.admin-quick-panel { margin-bottom: 15px; }
.quick-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.quick-action { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px; text-align: left; display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; align-items: center; color: var(--ink); transition: .18s ease; }
.quick-action:hover { transform: translateY(-1px); border-color: #cad7ce; box-shadow: 0 8px 20px rgba(20,45,34,.06); }
.quick-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); font-size: 9px; font-weight: 900; grid-row: 1 / span 2; }
.quick-action strong { font-size: 10px; }
.quick-action small { color: var(--muted); font-size: 8px; line-height: 1.4; margin-top: 3px; }
.admin-grid { grid-template-columns: 1.3fr .7fr; }
.admin-task-list { display: flex; flex-direction: column; gap: 9px; }
.admin-task { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.admin-task .task-stripe { align-self: stretch; border-radius: 99px; background: var(--amber); }
.admin-task .task-stripe.red { background: var(--red); }
.admin-task .task-stripe.blue { background: var(--blue); }
.admin-task strong { display: block; font-size: 10px; }
.admin-task span { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.admin-task button { border: 0; background: var(--surface-2); color: var(--green-700); border-radius: 8px; padding: 7px 9px; font-size: 8px; font-weight: 900; }
.page-subtitle { margin: 4px 0 0; font-size: 20px; letter-spacing: -.02em; }
.master-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.master-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 15px; box-shadow: 0 4px 18px rgba(21,48,34,.03); }
.master-card span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.master-card strong { display: block; margin-top: 8px; font-size: 24px; }
.master-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.form-modal { width: min(780px, 100%); }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; color: var(--ink); font-size: 10px; }
.admin-form input:disabled { background: var(--surface-2); color: var(--muted); }
.form-submit-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.admin-only[hidden] { display: none !important; }

@media (max-width: 1120px) {
  .quick-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .master-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .role-switch-wrap > span { display: none; }
  .role-switch-wrap { padding: 4px; }
}

@media (max-width: 560px) {
  .role-switch-wrap { display: flex; }
  .quick-action-grid { grid-template-columns: 1fr; }
  .master-grid { grid-template-columns: 1fr 1fr; }
  .form-submit-row { grid-column: 1; }
}

/* Login experience */
.login-page { min-height: 100vh; background: #eef2ed; padding: 24px; display: grid; place-items: center; }
.login-shell { width: min(1180px, 100%); min-height: 700px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border-radius: 28px; background: #fff; box-shadow: 0 28px 80px rgba(18, 42, 29, .14); border: 1px solid #dfe6df; }
.login-brand-panel { position: relative; overflow: hidden; color: #fff; padding: 44px 46px; background: radial-gradient(circle at 85% 18%, rgba(212,174,85,.20), transparent 28%), linear-gradient(145deg, #0a1f17 0%, #113326 58%, #1c4936 100%); display: flex; flex-direction: column; }
.login-brand-panel:after { content: ""; position: absolute; width: 410px; height: 410px; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; right: -160px; bottom: -150px; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); pointer-events: none; }
.login-brand-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.login-emblem { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold); color: #17241d; font-size: 14px; font-weight: 950; letter-spacing: .08em; box-shadow: 0 9px 24px rgba(0,0,0,.12); }
.login-brand-title { font-size: 13px; font-weight: 950; letter-spacing: .08em; }
.login-brand-subtitle { margin-top: 5px; color: #a8beb2; font-size: 10px; }
.login-intro { margin: auto 0 34px; max-width: 590px; position: relative; z-index: 1; }
.login-kicker { display: inline-block; color: #d7c184; font-size: 9px; font-weight: 950; letter-spacing: .17em; }
.login-kicker.dark { color: var(--green-500); }
.login-intro h1 { margin: 12px 0 14px; font-size: clamp(34px, 4.3vw, 54px); line-height: 1.04; letter-spacing: -.045em; max-width: 620px; }
.login-intro p { max-width: 560px; margin: 0; color: #b7c8bf; font-size: 12px; line-height: 1.75; }
.login-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; position: relative; z-index: 1; }
.login-capability-grid article { border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.055); border-radius: 15px; padding: 15px; backdrop-filter: blur(8px); }
.login-capability-grid article > span { display: block; color: #d7c184; font-size: 8px; font-weight: 900; margin-bottom: 10px; }
.login-capability-grid strong { display: block; font-size: 11px; }
.login-capability-grid small { display: block; margin-top: 6px; color: #9fb5aa; font-size: 9px; line-height: 1.45; }
.login-security-note { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-top: 16px; color: #dce7e0; position: relative; z-index: 1; }
.login-security-note strong { display: block; font-size: 10px; }
.login-security-note small { display: block; color: #8fa69a; font-size: 8px; margin-top: 3px; line-height: 1.45; }
.login-form-panel { padding: 38px 48px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(180deg, #fff, #fbfcfa); }
.login-card { width: min(430px, 100%); margin: 0 auto; }
.login-card-head h2 { margin: 8px 0 7px; font-size: 30px; letter-spacing: -.035em; }
.login-card-head p { margin: 0 0 27px; color: var(--muted); font-size: 11px; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-form label { color: #3e4d44; font-size: 9px; font-weight: 850; letter-spacing: .02em; }
.login-form input { width: 100%; margin-top: 7px; border: 1px solid #dce4de; background: #fff; border-radius: 12px; padding: 13px 14px; color: var(--ink); font-size: 11px; outline: none; transition: .18s ease; }
.login-form input:focus { border-color: #6f9c83; box-shadow: 0 0 0 3px rgba(77,130,105,.10); }
.password-field { position: relative; }
.password-field input { padding-right: 68px; }
.password-toggle { position: absolute; right: 8px; top: 14px; border: 0; background: var(--surface-2); color: var(--green-700); border-radius: 8px; padding: 7px 9px; font-size: 8px; font-weight: 900; }
.login-submit { border: 0; border-radius: 12px; background: var(--green-900); color: #fff; padding: 13px 16px; font-size: 10px; font-weight: 900; margin-top: 2px; box-shadow: 0 8px 20px rgba(16,42,31,.15); }
.login-submit:hover { background: #17392b; }
.login-error { min-height: 15px; color: var(--red); font-size: 9px; font-weight: 700; margin-top: -4px; }
.demo-divider { display: flex; align-items: center; gap: 12px; margin: 27px 0 13px; color: #89968e; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.demo-divider:before, .demo-divider:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.demo-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.demo-account { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; padding: 11px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--ink); }
.demo-account:hover { border-color: #b8cbbf; background: #fbfdfb; }
.demo-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--green-900); color: #fff; font-size: 9px; font-weight: 950; }
.demo-avatar.commander { background: var(--gold); color: #273229; }
.demo-account strong { display: block; font-size: 9px; }
.demo-account small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.demo-credential-note { margin-top: 10px; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: center; }
.login-footer { margin-top: 24px; text-align: center; color: #98a39c; font-size: 8px; }
.logout-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 10px; padding: 9px 11px; font-size: 9px; font-weight: 850; }
.logout-btn:hover { color: var(--red); border-color: #e5c4c1; background: #fffafa; }

@media (max-width: 900px) {
  .login-page { padding: 0; background: #fff; }
  .login-shell { width: 100%; min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; border: 0; }
  .login-brand-panel { padding: 28px 28px 34px; min-height: 360px; }
  .login-intro { margin: 55px 0 28px; }
  .login-intro h1 { font-size: 37px; }
  .login-form-panel { padding: 38px 28px 48px; }
}

@media (max-width: 560px) {
  .login-brand-panel { min-height: 320px; padding: 23px 20px 28px; }
  .login-brand-title { font-size: 11px; }
  .login-brand-subtitle { font-size: 8px; }
  .login-intro { margin: 42px 0 24px; }
  .login-intro h1 { font-size: 30px; }
  .login-intro p { font-size: 10px; }
  .login-capability-grid { display: none; }
  .login-form-panel { padding: 32px 20px 40px; }
  .login-card-head h2 { font-size: 26px; }
  .demo-login-grid { grid-template-columns: 1fr; }
  .logout-btn { padding: 8px 9px; }
}

[hidden] { display: none !important; }
zip -qr /mnt/data/Topography_Command_System_Ditopad_V2_Login_Premium.zip .
ls -lh /mnt/data/Topography_Command_System_Ditopad_V2_Login_Premium.zip login-hero-photo.png


/* Refined login hero - photo-led composition */
.login-brand-panel {
  isolation: isolate;
  background: #0d2a1e !important;
}
.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(6,24,16,.14) 0%, rgba(6,24,16,.10) 34%, rgba(6,24,16,.46) 68%, rgba(6,24,16,.86) 100%),
    linear-gradient(90deg, rgba(6,24,16,.28) 0%, rgba(6,24,16,0) 44%),
    url('./login-hero-photo.png');
  background-size: cover;
  background-position: center 58%;
  transform: scale(1.015);
  transform-origin: center;
}
.login-brand-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  pointer-events: none;
}
.login-brand-row,
.login-photo-spacer,
.login-hero-caption,
.login-capability-grid,
.login-security-note {
  position: relative;
  z-index: 1;
}
.login-brand-row {
  align-self: flex-start;
  padding: 9px 11px 9px 9px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(7,27,18,.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.login-emblem {
  width: 48px;
  height: 48px;
  padding: 5px;
  overflow: hidden;
}
.login-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.login-brand-subtitle {
  color: rgba(235,244,239,.72);
}
.login-photo-spacer {
  flex: 1 1 auto;
  min-height: 265px;
}
.login-hero-caption {
  max-width: 560px;
  margin: 0 0 20px;
  padding: 0 2px;
}
.login-hero-caption strong {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: clamp(22px, 2.15vw, 31px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0,0,0,.28);
}
.login-hero-caption small {
  display: block;
  max-width: 520px;
  margin-top: 8px;
  color: rgba(235,244,239,.78);
  font-size: 10px;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0,0,0,.30);
}
.login-capability-grid {
  gap: 9px;
}
.login-capability-grid article {
  padding: 13px 14px;
  background: rgba(7,27,18,.46);
  border-color: rgba(255,255,255,.11);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.login-capability-grid strong { color: #fff; }
.login-capability-grid small { color: rgba(228,239,233,.68); }
.login-security-note {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 900px) {
  .login-brand-panel::before { background-position: center 54%; }
  .login-photo-spacer { min-height: 230px; }
  .login-hero-caption strong { font-size: 26px; }
}

@media (max-width: 600px) {
  .login-brand-panel { min-height: 390px !important; }
  .login-brand-panel::before {
    background-position: center 58%;
    background-image:
      linear-gradient(180deg, rgba(6,24,16,.12) 0%, rgba(6,24,16,.16) 44%, rgba(6,24,16,.82) 100%),
      url('./login-hero-photo.png');
  }
  .login-photo-spacer { min-height: 185px; }
  .login-hero-caption { margin-bottom: 0; }
  .login-hero-caption strong { font-size: 23px; }
  .login-hero-caption small { font-size: 9px; }
  .login-security-note { margin-top: 12px; }
}

/* Login brand: text-only treatment */
.login-brand-row { padding: 14px 18px; gap: 0; }
.login-brand-title { font-size: 15px; letter-spacing: .065em; }
.login-brand-subtitle { margin-top: 6px; font-size: 10px; }

/* Compact login brand label - keep clear of the Dittopad emblem in hero image */
.login-brand-row {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  width: auto;
  max-width: 300px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(7, 27, 18, .28);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.login-brand-title {
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .075em;
  font-weight: 800;
  white-space: nowrap;
}
.login-brand-subtitle {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.3;
  color: rgba(235,244,239,.74);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .login-brand-row {
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    padding: 7px 9px;
    border-radius: 9px;
  }
  .login-brand-title { font-size: 8.5px; }
  .login-brand-subtitle { font-size: 7px; }
}
