:root {
  --navy-950: #0b1824;
  --navy-900: #102536;
  --navy-800: #17364c;
  --blue-700: #155e75;
  --blue-600: #0e7490;
  --blue-100: #cffafe;
  --ink: #172033;
  --muted: #64748b;
  --line: #dfe5ea;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --success: #027a48;
  --success-soft: #ecfdf3;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(16, 37, 54, 0.08);
  --sidebar: 264px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-600); }
img, svg { display: block; }
.icon { width: 20px; height: 20px; flex: none; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: white; padding: .7rem 1rem; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid rgba(14, 116, 144, .35); outline-offset: 2px; }

.app-shell { display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy-950); color: #d9e2e8; display: flex; flex-direction: column; padding: 24px 16px 18px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; color: #fff; }
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: 17px; letter-spacing: .01em; }
.brand small { color: #91a5b3; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #f3b61f; color: #172033; font-weight: 850; letter-spacing: -.04em; box-shadow: inset 0 0 0 1px #fff5; }
.brand-mark.large { width: 52px; height: 52px; border-radius: 15px; font-size: 19px; }
.nav-list { display: grid; gap: 5px; overflow-y: auto; }
.nav-list a { display: flex; gap: 11px; align-items: center; min-height: 44px; padding: 10px 12px; color: #b7c5ce; border-radius: 10px; font-weight: 650; }
.nav-list a:hover { background: #ffffff0c; color: #fff; }
.nav-list a.active { background: #1f465f; color: #fff; box-shadow: inset 3px 0 #f3b61f; }
.nav-label { color: #6f8796; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; padding: 22px 12px 6px; }
.sidebar-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 15px 10px 0; border-top: 1px solid #ffffff12; }
.sidebar-user > div:last-child { display: grid; min-width: 0; }
.sidebar-user strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; font-size: 13px; }
.sidebar-user small { color: #91a5b3; font-size: 12px; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; color: var(--navy-950); background: #dff5f9; font-weight: 800; }
.avatar.large { width: 70px; height: 70px; font-size: 22px; }
.app-main { min-width: 0; flex: 1; margin-left: var(--sidebar); }
.topbar { height: 66px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 32px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-spacer { flex: 1; }
.topbar form { margin: 0; }
.topbar-link { color: #475569; font-size: 13px; font-weight: 700; }
.button-link { display: inline-flex; gap: 7px; align-items: center; border: 0; background: transparent; cursor: pointer; padding: 6px 0; }
.button-link .icon { width: 18px; }
.menu-toggle { display: none; }
.content { width: min(1560px, 100%); padding: 34px 38px 70px; margin: 0 auto; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 6px; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { display: block; color: var(--blue-700); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.heading-actions form { margin: 0; }
.heading-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(16,37,54,.025); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 18px; margin: 0; letter-spacing: -.015em; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 750; font-size: 13px; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--blue-700); border-color: var(--blue-700); box-shadow: 0 5px 14px rgba(21,94,117,.16); }
.button-primary:hover { color: #fff; background: #0f5064; }
.button-ghost { color: #344054; background: #fff; border-color: #cfd8df; }
.button-ghost:hover { color: var(--ink); border-color: #94a3b8; background: #f8fafc; }
.button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-danger-outline { color: var(--danger); background: #fff; border-color: #f0b4ae; }
.button-danger-outline:hover { color: #8a1c13; background: var(--danger-soft); }
.button-wide { width: 100%; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: white; border-radius: 9px; cursor: pointer; }

label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 720; }
input, select, textarea { width: 100%; color: var(--ink); background: white; border: 1px solid #cbd5df; border-radius: 8px; padding: 10px 11px; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(14,116,144,.12); }
label small { color: var(--muted); font-weight: 500; }
.required { color: var(--danger); }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.check-row input { width: 18px; height: 18px; min-height: 0; flex: none; accent-color: var(--blue-700); }
.stack-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 8px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 68px; }
.show-password { position: absolute; inset: 5px 5px 5px auto; border: 0; padding: 0 9px; border-radius: 6px; background: #edf2f5; color: #475569; cursor: pointer; font-size: 12px; font-weight: 700; }

.alert, .validation-summary { margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 10px; }
.alert-success { background: var(--success-soft); border-color: #abefc6; color: #05603a; }
.alert-warning { background: var(--warning-soft); border-color: #fedf89; color: #7a2e0e; }
.alert-error { background: var(--danger-soft); border-color: #fecdca; color: #912018; }
.validation-summary { background: var(--danger-soft); border-color: #fecdca; color: #912018; }
.validation-summary ul { margin: 7px 0 0; padding-left: 20px; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric-grid.personal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { position: relative; overflow: hidden; min-height: 128px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 10px rgba(16,37,54,.025); }
.metric-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #94a3b8; }
.metric-card.progress::before { background: #7c3aed; }
.metric-card.danger::before { background: var(--danger); }
.metric-card.warning::before { background: #f79009; }
.metric-card.success::before { background: var(--success); }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-card strong { display: block; margin-top: 10px; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.metric-card a { display: inline-block; margin-top: 14px; font-size: 11px; font-weight: 750; }
.metric-note { margin: 0; padding: 13px 23px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.filter-panel { margin-bottom: 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.filter-panel summary { cursor: pointer; padding: 15px 18px; font-weight: 800; }
.filter-panel[open] summary { border-bottom: 1px solid var(--line); }
.filter-bar { display: grid; grid-template-columns: 1.6fr repeat(5, minmax(130px, 1fr)); gap: 12px; align-items: end; padding: 16px 18px; }
.filter-bar.compact { grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto; margin-bottom: 20px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.filter-search { min-width: 220px; }
.filter-check { align-self: center; margin-top: 21px; }
.filter-actions { display: flex; gap: 8px; align-items: center; }

.table-panel { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid #e8edf0; vertical-align: middle; }
thead th { color: #526170; background: #f8fafb; font-size: 10px; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; }
tbody th { font-weight: 700; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td small, th small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.task-title { display: grid; min-width: 185px; }
.task-title span { color: var(--blue-700); font-size: 10px; font-weight: 850; letter-spacing: .07em; }
.task-title strong { color: var(--ink); font-size: 13px; line-height: 1.35; }
.row-overdue { background: #fffbfa; }
.row-overdue:hover { background: #fff6f4; }
.row-muted { opacity: .68; background: #f8fafc; }
.due-overdue, .text-danger { color: var(--danger) !important; font-weight: 750; }
.actions-cell { white-space: nowrap; }
td.actions-cell { display: flex; align-items: center; gap: 4px; }
.actions-cell form { display: inline-flex; margin: 0; }
.action-button { width: 34px; height: 34px; display: inline-grid; place-items: center; color: #475569; background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; }
.action-button:hover { color: var(--blue-700); background: #eaf4f6; border-color: #cde7eb; }
.action-button.danger:hover { color: var(--danger); background: var(--danger-soft); border-color: #fecdca; }
.action-button .icon { width: 17px; height: 17px; }
.action-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status-badge, .simple-badge, .priority, .overdue-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-badge { color: var(--status-color); background: color-mix(in srgb, var(--status-color) 11%, white); border: 1px solid color-mix(in srgb, var(--status-color) 25%, white); }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--status-color); }
.simple-badge.success { color: var(--success); background: var(--success-soft); }
.simple-badge.muted { color: #475569; background: #eef2f5; }
.priority { color: #475569; background: #eef2f5; }
.priority-high { color: #9a3412; background: #fff7ed; }
.priority-urgent { color: var(--danger); background: var(--danger-soft); }
.priority-low { color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; }
.overdue-pill { color: var(--danger); background: var(--danger-soft); }
.count-badge { padding: 4px 9px; border-radius: 999px; background: #edf2f5; color: #475569; font-size: 11px; font-weight: 800; }
.pagination { display: flex; flex-wrap: wrap; gap: 5px; padding: 17px 20px; border-top: 1px solid var(--line); }
.pagination a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: #475569; font-size: 12px; font-weight: 700; }
.pagination a.active { color: white; background: var(--blue-700); border-color: var(--blue-700); }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 4px 0 0; }

.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.bar-list { display: grid; gap: 14px; padding: 20px 23px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 30px; gap: 12px; align-items: center; color: var(--ink); font-size: 12px; }
.bar-track { height: 8px; background: #edf1f4; border-radius: 999px; overflow: hidden; }
.bar-track span { display: block; width: var(--bar-width); height: 100%; background: var(--bar-color); border-radius: inherit; }
.bar-row strong { text-align: right; }
.activity-list { display: grid; padding: 7px 0; }
.activity-list a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; color: var(--ink); }
.activity-list a:hover { background: #f8fafb; }
.activity-list a > span:last-child { display: grid; }
.activity-list small { color: var(--muted); font-size: 11px; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: #f3b61f; margin-top: 6px; flex: none; box-shadow: 0 0 0 4px #fff8db; }
.attention-list { display: grid; }
.attention-list > a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 22px; border-bottom: 1px solid var(--line); color: var(--ink); }
.attention-list > a:last-child { border-bottom: 0; }
.attention-list > a > span { display: grid; gap: 3px; }
.attention-list > a > span:last-child { justify-items: end; }
.attention-list small { color: var(--muted); font-size: 11px; }

.task-form { overflow: hidden; }
.form-section { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 35px; padding: 28px 30px; border-bottom: 1px solid var(--line); }
.section-intro { display: flex; gap: 13px; align-items: flex-start; }
.section-intro > span { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 9px; color: var(--blue-700); background: #e8f4f6; font-size: 11px; font-weight: 850; }
.section-intro h2 { margin: 1px 0 4px; font-size: 16px; }
.section-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.task-form > .form-footer { padding: 20px 30px; margin: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 20px; margin-bottom: 20px; }
.detail-main { padding-bottom: 20px; }
.rich-text { padding: 22px 24px; line-height: 1.7; }
.next-action-card { display: grid; gap: 5px; margin: 5px 22px 0; padding: 15px 17px; border-left: 4px solid #f3b61f; background: #fff9e7; border-radius: 8px; }
.next-action-card > span { color: #8a5b06; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.next-action-card small { color: #7c5b1d; }
.metadata-card { padding: 21px 22px; }
.metadata-card h2 { margin: 0 0 14px; font-size: 17px; }
.metadata-card dl, .profile-summary dl { margin: 0; display: grid; }
.metadata-card dl div, .profile-summary dl div { display: grid; grid-template-columns: 115px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.metadata-card dt, .profile-summary dt { color: var(--muted); font-size: 11px; }
.metadata-card dd, .profile-summary dd { margin: 0; font-size: 12px; font-weight: 700; }
.entry-panel { margin-bottom: 20px; }
.entry-form { display: grid; gap: 17px; padding: 23px; }
.timeline-panel { overflow: hidden; }
.timeline { list-style: none; margin: 0; padding: 25px 28px 28px 50px; }
.timeline-item { position: relative; padding: 0 0 25px 28px; border-left: 2px solid #d9e2e8; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-marker { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue-600); border: 3px solid white; box-shadow: 0 0 0 2px var(--blue-600); }
.timeline-item.system .timeline-marker { background: #94a3b8; box-shadow: 0 0 0 2px #94a3b8; }
.timeline-item article { padding: 17px 19px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 11px; }
.timeline-item.system article { background: #f8fafc; }
.timeline-item header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.timeline-item header > div { display: grid; }
.timeline-item header span, .timeline-item time { color: var(--muted); font-size: 11px; }
.timeline-block { margin-top: 10px; }
.timeline-block > span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.timeline-block p { margin: 4px 0; line-height: 1.65; }
.timeline-block.next { margin-top: 13px; padding: 11px 13px; border-left: 3px solid #f3b61f; background: #fffaf0; border-radius: 6px; }
.timeline-block small { color: #7c5b1d; }
.status-change { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--muted); font-size: 11px; }

.admin-layout { display: grid; grid-template-columns: minmax(285px, .72fr) minmax(0, 1.8fr); gap: 20px; align-items: start; }
.admin-form-card { position: sticky; top: 88px; overflow: hidden; }
.admin-form-card form { padding: 21px; }
.admin-list { min-width: 0; }
.status-create { margin-bottom: 18px; overflow: hidden; }
.inline-form { display: grid; grid-template-columns: 1.3fr 1.3fr 90px 100px auto auto auto; gap: 12px; align-items: end; padding: 20px; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.status-card { padding: 20px; }
.status-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.status-card header small { color: var(--muted); }
.status-card form { display: grid; gap: 15px; }
.status-options { display: flex; gap: 20px; }
pre { max-width: 460px; overflow: auto; white-space: pre-wrap; font-size: 11px; color: #334155; }
.profile-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px; }
.profile-grid > .panel { padding: 24px; }
.profile-grid .panel-heading { margin: -24px -24px 22px; }
.profile-summary { align-content: start; }
.profile-summary h2 { margin: 15px 0 0; }
.profile-summary > p { margin: 2px 0 20px; color: var(--muted); }
.system-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.check-list { display: grid; }
.check-list > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.check-list > div:last-child { border-bottom: 0; }
.check-list > div > span:nth-child(2) { display: grid; }
.check-list small { color: var(--muted); }
.check-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 850; }
.check-icon.ok { color: var(--success); background: var(--success-soft); }
.check-icon.fail { color: var(--danger); background: var(--danger-soft); }
.system-summary { overflow: hidden; }
.system-summary dl { margin: 0; padding: 8px 20px 20px; }
.system-summary dl div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.system-summary dt { color: var(--muted); }
.system-summary dd { margin: 0; font-weight: 800; }

.delete-dialog { width: min(480px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 15px; box-shadow: 0 24px 80px rgba(11,24,36,.28); }
.delete-dialog::backdrop { background: rgba(11,24,36,.66); backdrop-filter: blur(3px); }
.delete-card { padding: 25px; }
.delete-card h2 { margin: 8px 0; }
.delete-card p { color: #475569; }
.danger-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--danger); background: var(--danger-soft); font-size: 22px; font-weight: 900; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.muted { color: var(--muted) !important; }
.error-page { max-width: 620px; margin: 7vh auto; padding: 48px; text-align: center; }
.error-page > span { color: var(--blue-700); font-size: 54px; font-weight: 900; letter-spacing: -.06em; }
.error-page h1 { margin: 5px 0; }

.auth-shell { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: radial-gradient(circle at 15% 10%, #1d4e63 0, transparent 36%), linear-gradient(135deg, #0b1824, #132f43 68%, #1a4057); }
.auth-main { width: min(460px, 100%); }
.login-card { padding: 31px; background: white; border: 1px solid #ffffff33; border-radius: 20px; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 32px; }
.login-brand > div { display: grid; }
.login-brand strong { font-size: 16px; }
.login-brand small { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.login-copy h1 { margin: 6px 0 5px; font-size: 31px; letter-spacing: -.035em; }
.login-copy p { color: var(--muted); margin: 0 0 23px; }
.login-help { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 11px; }

@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .filter-bar.compact { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .inline-form { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
}

@media (max-width: 980px) {
  :root { --sidebar: 248px; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(11,24,36,.2); }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(11,24,36,.55); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .content { padding: 26px 22px 60px; }
  .topbar { padding: 0 22px; }
  .detail-grid, .admin-layout { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .admin-form-card { position: static; }
  .form-section { grid-template-columns: 1fr; gap: 20px; }
  .dashboard-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .content { padding: 22px 14px 50px; }
  .topbar { padding: 0 14px; gap: 12px; }
  .topbar-link span { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .page-heading > .button { width: 100%; }
  .heading-actions { width: 100%; }
  .heading-actions .button, .heading-actions form { flex: 1; }
  .heading-actions form .button { width: 100%; }
  .metric-grid, .metric-grid.personal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 105px; }
  .filter-bar, .filter-bar.compact { grid-template-columns: 1fr; }
  .filter-check { margin: 0; }
  .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-section { padding: 23px 19px; }
  .task-form > .form-footer { padding: 18px; }
  .panel-heading { align-items: flex-start; padding: 18px; }
  .panel-heading .button { flex: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .responsive-table tr { padding: 13px 15px; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 6px 0; border: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .responsive-table td.actions-cell { display: flex; padding-top: 12px; }
  .responsive-table td.actions-cell::before { display: none; }
  .action-button { width: auto; min-width: 44px; height: 40px; padding: 0 10px; display: inline-flex; gap: 6px; }
  .action-text { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: 11px; }
  .timeline { padding: 20px 14px 24px 30px; }
  .timeline-item { padding-left: 19px; }
  .timeline-item article { padding: 14px; }
  .timeline-item header { flex-direction: column; gap: 4px; }
  .attention-list > a { align-items: flex-start; flex-direction: column; }
  .attention-list > a > span:last-child { justify-items: start; }
  .admin-layout { display: block; }
  .admin-list { margin-top: 18px; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .status-grid, .profile-grid { grid-template-columns: 1fr; }
  .metadata-card dl div, .profile-summary dl div { grid-template-columns: 105px 1fr; }
}

@media (max-width: 440px) {
  .metric-grid, .metric-grid.personal { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 27px; }
  .inline-form { grid-template-columns: 1fr; }
  .login-card { padding: 24px 20px; }
  .auth-shell { padding: 14px; }
}

@media print {
  .sidebar, .topbar, .button, .filter-panel, .entry-panel, .heading-actions { display: none !important; }
  .app-main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .panel { box-shadow: none; break-inside: avoid; }
}

.installer-shell { min-height: 100vh; padding: 38px 18px 70px; background: linear-gradient(180deg, #eaf0f3, #f7f8f9 360px); }
.installer-main { width: min(980px, 100%); margin: 0 auto; }
.installer-header { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; }
.installer-header h1 { margin: 3px 0 1px; font-size: 30px; letter-spacing: -.035em; }
.installer-header p { margin: 0; color: var(--muted); }
.requirements-card { margin-bottom: 20px; overflow: hidden; }
.requirements-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.requirements-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.requirements-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.req-ok { color: var(--success); }
.req-fail { color: var(--danger); }
.installer-form { overflow: hidden; }
.installer-footer { padding: 20px 28px; margin: 0; justify-content: space-between; }
.installer-footer > span { color: var(--muted); font-size: 12px; }
.installer-success { padding: 30px; text-align: center; }
.installer-success h2 { margin: 10px 0 3px; }
.installer-success > p { color: var(--muted); }
.success-check { display: grid; place-items: center; margin: 0 auto; width: 54px; height: 54px; border-radius: 50%; color: white; background: var(--success); font-size: 28px; font-weight: 800; }
.credentials-table { margin: 25px 0; overflow-x: auto; text-align: left; border: 1px solid var(--line); border-radius: 10px; }
.credentials-table code { padding: 3px 6px; border-radius: 5px; background: #eef2f5; font-size: 12px; }
.credentials-table small { display: block; color: var(--muted); }
.installer-success .alert { text-align: left; }
@media (max-width: 680px) {
  .installer-shell { padding: 24px 12px 50px; }
  .requirements-grid { grid-template-columns: 1fr; }
  .requirements-grid > div:nth-child(odd) { border-right: 0; }
  .installer-footer { align-items: stretch; flex-direction: column; }
}
