:root {
  --navy: #042b63;
  --navy-strong: #031f49;
  --cyan: #006b98;
  --cyan-bright: #00a7e8;
  --pale-blue: #eef8fc;
  --light-gray: #f0f1f3;
  --surface: #ffffff;
  --canvas: #f7f9fb;
  --ink: #17243a;
  --muted: #5f6c7f;
  --border: #d9e0e8;
  --green: #197a35;
  --green-soft: #eaf6ed;
  --red: #b42318;
  --red-soft: #fff1f0;
  --warning: #8a5700;
  --warning-soft: #fff7e6;
  --focus: #006a9d;
  --radius: 10px;
  --sidebar: 232px;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a, input, select { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan); }
::selection { color: #fff; background: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); letter-spacing: -.025em; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.125rem; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--navy); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar); padding: 28px 18px 20px; color: #fff; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 55px; margin: 0 6px 31px; color: #fff; font-size: .85rem; line-height: 1.35; text-decoration: none; }
.brand:hover { color: #fff; }
.brand strong { font-size: 1rem; }
.brand-mark { display: inline-flex; align-items: end; gap: 3px; width: 31px; height: 34px; flex: 0 0 auto; }
.brand-mark i { display: block; width: 7px; background: var(--cyan-bright); transform: skewY(-24deg); }
.brand-mark i:nth-child(1) { height: 18px; }
.brand-mark i:nth-child(2) { height: 28px; }
.brand-mark i:nth-child(3) { height: 23px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a, .sidebar-admin a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; color: #cbd8e8; border-radius: 8px; text-decoration: none; }
.sidebar nav a:hover, .sidebar-admin a:hover { color: #fff; background: rgba(255,255,255,.09); }
.sidebar nav a[aria-current="page"], .sidebar-admin a[aria-current="page"] { color: var(--navy); background: #fff; font-weight: 700; }
.sidebar a:focus-visible { outline-color: #fff; }
.sidebar nav svg, .sidebar-admin svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar nav svg:first-child { fill: none; }
.sidebar nav a:first-child svg { fill: currentColor; stroke: none; }
.sidebar-admin { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); }
.sidebar-admin > span { display: block; padding: 0 12px 8px; color: #8fa7c3; font-size: .73rem; font-weight: 700; letter-spacing: .08em; }
.tenant-chip { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 10px 0; border-top: 1px solid rgba(255,255,255,.18); }
.tenant-chip > span:last-child { display: grid; min-width: 0; }
.tenant-chip strong { font-size: .85rem; }
.tenant-chip small { overflow: hidden; color: #aabbd0; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; color: var(--navy); background: #d8eff8; border-radius: 50%; font-size: .78rem; font-weight: 800; }

.app-frame { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; min-height: 64px; padding: 0 38px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.tenant-name { font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 17px; margin-left: auto; }
.topbar-actions > a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--ink); text-decoration: none; }
.topbar-actions svg { width: 21px; height: 21px; }
.user-link { gap: 9px; font-weight: 700; }
.logout-form { margin: 0; }
.logout-form button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 6px 10px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: .76rem; font-weight: 800; cursor: pointer; }
.logout-form button:hover { color: var(--navy); background: var(--pale-blue); border-color: var(--border); }
.sample-badge, .status-label { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; color: var(--navy); background: var(--pale-blue); border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.nav-toggle { display: none; width: 44px; height: 44px; color: var(--navy); background: transparent; border: 0; border-radius: 7px; }
.nav-toggle svg { width: 23px; height: 23px; }

.main-content { width: min(100%, 1400px); min-height: calc(100vh - 64px); padding: 24px 42px 56px; }
.main-content:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.angled-rule { display: block; width: calc(100% + 84px); height: 23px; margin: -24px -42px 26px; color: var(--navy); }
.angled-rule path { vector-effect: non-scaling-stroke; }
.page-header, .dashboard-header { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-header h1, .dashboard-header h1 { margin-bottom: 8px; }
.page-header p, .dashboard-header p { max-width: 72ch; margin-bottom: 0; color: var(--muted); }
.dashboard-header { display: block; }
.dashboard-header strong { color: var(--navy); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--cyan-bright); }
.section-heading h2 { margin: 0; color: var(--cyan); }
.section-heading > span { color: var(--muted); font-size: .78rem; }
.process-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.process-card { position: relative; display: grid; place-content: center; min-height: 112px; padding: 17px; text-align: center; border-radius: var(--radius); }
.process-card:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -24px; width: 24px; height: 1px; background: var(--navy); }
.process-card:not(:last-child)::before { content: ""; position: absolute; z-index: 1; top: calc(50% - 3px); right: -24px; border: 3px solid transparent; border-left-color: var(--navy); }
.process-card span { color: #4f6884; font-size: .72rem; font-weight: 700; }
.process-card h3 { margin: 1px 0 0; font-size: 1.04rem; }
.process-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.process-neutral { background: var(--light-gray); }
.process-dark { color: #fff; background: var(--navy); }
.process-dark span { color: #a9caef; }
.process-dark h3, .process-dark p { color: #fff; }
.process-dark p { color: #bfd0e5; }
.automation-line { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; color: var(--green); font-size: .87rem; }
.automation-line > span { width: 13px; height: 13px; border: 2px solid var(--green); border-radius: 50%; box-shadow: inset 0 0 0 3px #fff; background: var(--green); }
.automation-line em { font-style: normal; font-weight: 800; }
.dashboard-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 30px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.dashboard-summary > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 14px; min-height: 74px; padding: 13px 20px; }
.dashboard-summary > div + div { border-left: 1px solid var(--border); }
.dashboard-summary span { grid-column: 1; color: var(--muted); font-size: .76rem; }
.dashboard-summary strong { grid-column: 1; color: var(--navy); font-size: 1.05rem; }
.dashboard-summary small, .dashboard-summary a { grid-area: 1 / 2 / 3; font-size: .75rem; }
.dashboard-summary a, .reason-panel > a, .mail-preview article a, .alert > a, .breadcrumb a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.status-ok { color: var(--green); font-weight: 800; }
.future-heading { margin-bottom: 9px; }
.future-heading > span { padding: 2px 9px; color: var(--cyan); background: var(--pale-blue); border-radius: 999px; font-weight: 700; }
.future-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.future-grid article { position: relative; min-height: 96px; padding: 19px 86px 17px 20px; background: var(--pale-blue); border: 1px solid var(--cyan-bright); border-radius: var(--radius); }
.future-grid strong { color: var(--navy); font-size: 1rem; }
.future-grid p { margin: 4px 0 0; color: #4d6076; font-size: .82rem; line-height: 1.45; }
.future-grid span { position: absolute; top: 18px; right: 17px; padding: 2px 8px; color: var(--cyan); background: #fff; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.foundation-note { margin: 10px 0 0; padding: 13px 16px; color: #fff; background: var(--navy); border-radius: 7px; text-align: center; font-size: .84rem; }

.toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) 160px 120px 120px 100px auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 15px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.search-field { position: relative; }
.search-field svg { position: absolute; bottom: 11px; left: 12px; width: 19px; height: 19px; color: var(--muted); }
.search-field input { padding-left: 39px; }
input, select { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #8795a6; border-radius: 7px; }
input::placeholder { color: #5f6b7a; }
input:hover, select:hover { border-color: #7f90a4; }
input:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); box-shadow: none; }
input:disabled, select:disabled, button:disabled { cursor: not-allowed; opacity: .55; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 16px; color: var(--navy); background: #fff; border: 1px solid #8795a6; border-radius: 7px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button-compact { min-width: 44px; padding-inline: 10px; font-size: .72rem; }
.button:hover { color: var(--navy); background: var(--pale-blue); border-color: var(--cyan); }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.button-primary:hover { color: #fff; background: #064083; border-color: #064083; }
.button-danger { color: var(--red); border-color: #e6aaa4; }
.button-danger:hover { color: #fff; background: var(--red); border-color: var(--red); }
.button-block { width: 100%; }

.table-panel, .form-panel, .list-panel, .settings-section, .report-actions, .mail-preview, .admin-note { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.table-title, .panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 12px 17px; border-bottom: 1px solid var(--border); }
.table-title h2, .panel-heading h2 { margin: 0; }
.table-title h2 strong { color: var(--cyan); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 17px; border-top: 1px solid var(--border); }
.pagination > :first-child { justify-self: start; }
.pagination > :last-child { justify-self: end; }
.table-title > span, .panel-heading > span { color: var(--muted); font-size: .73rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
th { padding: 11px 15px; color: #4c5b6f; background: var(--light-gray); text-align: left; font-size: .72rem; white-space: nowrap; }
td { padding: 14px 15px; border-top: 1px solid #e6ebf0; vertical-align: middle; }
tbody tr:hover { background: #f8fbfd; }
td a { font-weight: 800; }
td small { display: block; margin-top: 3px; color: var(--muted); }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-success { color: var(--green); background: var(--green-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }

.alert { display: flex; align-items: center; gap: 9px 18px; margin-bottom: 17px; padding: 13px 16px; border: 1px solid; border-radius: var(--radius); }
.alert span { flex: 1; }
.alert-error { color: #741b14; background: var(--red-soft); border-color: #e8b8b3; }
.alert-success { color: #145d2b; background: var(--green-soft); border-color: #add7b8; }
.alert a { color: inherit; font-weight: 800; }
.empty-state { display: grid; justify-items: center; padding: 62px 20px; background: #fff; border: 1px dashed #b9c5d1; border-radius: var(--radius); text-align: center; }
.empty-state svg { width: 47px; height: 47px; margin-bottom: 13px; color: var(--cyan); }
.empty-state h2 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); }
.loading-panel { display: grid; gap: 13px; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.loading-panel div { height: 44px; border-radius: 5px; background: linear-gradient(90deg, #edf1f4 25%, #f7f9fa 40%, #edf1f4 65%); background-size: 400% 100%; animation: loading 1.5s ease-in-out infinite; }
@keyframes loading { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .loading-panel div { animation: none; background: #edf1f4; }
}

.breadcrumb { display: flex; gap: 8px; margin-bottom: 19px; color: var(--muted); font-size: .78rem; }
.detail-header { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.detail-header h1 { margin: 10px 0 7px; }
.detail-header p { color: var(--muted); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; }
.detail-section, .reason-panel { padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.detail-section dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detail-section dl div { padding: 15px 0; border-top: 1px solid var(--border); }
.detail-section dt { color: var(--muted); font-size: .74rem; }
.detail-section dd { margin: 4px 0 0; font-weight: 700; }
.reason-panel { background: var(--pale-blue); border-color: #b7dfef; }
.reason-panel ul { padding-left: 19px; }
.reason-panel li { margin: 10px 0; }
.reason-panel a { font-weight: 800; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 18px; }
.form-panel, .list-panel { padding: 21px; }
.form-panel h2 { margin-bottom: 18px; }
.form-panel form, .compact-form { display: grid; gap: 14px; }
.form-panel label, .compact-form label, .inline-form label { display: grid; gap: 5px; color: #4e5c6f; font-size: .78rem; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 9px; margin-top: 5px; }
.panel-heading { margin: -21px -21px 0; }
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; }
.rule-list li + li { border-top: 1px solid var(--border); }
.rule-list p { margin: 4px 0 2px; color: var(--muted); font-size: .78rem; }
.rule-list small { color: var(--cyan); }
.toggle-form { display: flex; align-items: center; gap: 8px; }
.filter-actions { display: flex; align-items: center; gap: 8px; }
.switch { display: grid; place-content: center; justify-items: center; gap: 2px; min-width: 44px; min-height: 44px; color: var(--muted); font-size: .67rem; }
.switch input { appearance: none; position: relative; width: 38px; min-height: 22px; margin: 0; padding: 0; background: #aeb8c4; border: 0; border-radius: 999px; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 180ms ease; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.integration-note { max-width: 52ch; margin: 9px 0 0; color: var(--muted); font-size: .74rem; }
.disabled-action { display: grid; justify-items: end; gap: 5px; max-width: 230px; text-align: right; }
.disabled-action small { color: var(--muted); font-size: .72rem; }

.settings-stack { display: grid; gap: 16px; }
.settings-section { display: grid; grid-template-columns: minmax(210px, .75fr) minmax(400px, 1.25fr); gap: 32px; padding: 23px; }
.settings-section h2 { margin-bottom: 6px; }
.settings-section > div:first-child p { max-width: 48ch; margin: 0; color: var(--muted); font-size: .82rem; }
.report-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 23px; }
.report-actions h2 { margin-bottom: 5px; }
.report-actions p { margin: 0; color: var(--muted); font-size: .82rem; }
.report-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.report-row-actions form { margin: 0; }
.reports-table { margin-top: 16px; }
.reports-table td:first-child strong { overflow-wrap: anywhere; }
.inline-form { display: grid; grid-template-columns: 1fr 1.5fr auto; align-items: end; gap: 11px; }
.weekday-field { grid-column: 1 / -1; margin: 2px 0 0; padding: 0; border: 0; }
.weekday-field legend { margin-bottom: 7px; color: #4e5c6f; font-size: .78rem; font-weight: 800; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-options label { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; color: var(--navy); background: var(--pale-blue); border: 1px solid #a7c9d9; border-radius: 7px; cursor: pointer; }
.weekday-options input { width: 18px; min-height: 18px; margin: 0 0 2px; accent-color: var(--navy); }
.recipient-list { display: grid; gap: 0; }
.recipient-list > div { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.recipient-list > div + div { border-top: 1px solid var(--border); }
.recipient-list > div > span:nth-child(2) { display: grid; margin-right: auto; }
.recipient-list small { color: var(--muted); }
.recipient-list .button { justify-self: start; margin-top: 9px; }
.recipient-form { display: grid; grid-template-columns: 1fr 1.35fr auto; align-items: end; gap: 9px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.recipient-form label { display: grid; gap: 5px; color: #4e5c6f; font-size: .78rem; font-weight: 800; }
.compact-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
.api-key-form { grid-template-columns: minmax(0, 1fr) auto; }
.api-key-form .integration-note { grid-column: 1 / -1; }
.api-key-management { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.api-key-management label, .api-key-management input, .api-key-management p { width: 100%; }
.api-key-management input { min-width: 0; }
.api-key-management form { margin: 0; }
.member-table table { margin-bottom: 12px; }
.member-table th, .member-table td { padding-left: 12px; }
.mail-preview { padding: 22px; }
.mail-preview > div { display: flex; justify-content: space-between; }
.mail-preview > div span { color: var(--muted); font-size: .74rem; }
.mail-preview article { max-width: 580px; padding: 17px; background: var(--pale-blue); border-radius: 7px; }
.mail-preview article p { margin: 4px 0 10px; color: var(--muted); }
.danger-section { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 21px 23px; background: #fff; border: 1px solid #e7c1bd; border-radius: var(--radius); }
.danger-section h2 { margin-bottom: 4px; }
.danger-section p { margin: 0; color: var(--muted); }

.health-strip { display: grid; grid-template-columns: 1.5fr 1fr 1fr; align-items: center; gap: 18px; margin-bottom: 12px; padding: 17px 19px; color: #fff; background: var(--navy); border-radius: var(--radius); }
.health-strip > div { display: flex; align-items: center; gap: 10px; }
.health-strip > div > span:last-child, .health-strip > div:not(:first-child) { display: grid; }
.health-strip span, .health-strip small { color: #bcd0e6; font-size: .72rem; }
.health-strip strong { font-variant-numeric: tabular-nums; }
.health-dot { display: block; width: 11px; height: 11px; background: #45d36b; border-radius: 50%; box-shadow: 0 0 0 5px rgba(69,211,107,.15); }
.health-strip .button { min-height: 38px; color: #fff; background: transparent; border-color: #7994b5; }
.health-strip .button:hover { background: rgba(255,255,255,.1); }
.platform-actions { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 12px 15px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.platform-actions form { margin: 0; }
.platform-actions .integration-note { margin: 0 0 0 5px; }
.admin-note { margin-top: 18px; padding: 19px; }
.admin-note h2 { margin-bottom: 5px; }
.admin-note p { margin: 0; color: var(--muted); }

.login-page { background: #fff; }
.login-main { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(430px, .85fr); min-height: 100vh; }
.login-intro { position: relative; display: grid; place-items: center; overflow: hidden; padding: 80px; color: #fff; background: var(--navy); }
.login-intro::after { content: ""; position: absolute; right: -140px; bottom: -260px; width: 480px; height: 480px; border: 1px solid rgba(0,167,232,.45); transform: rotate(35deg); }
.login-intro .angled-rule { position: absolute; top: 48px; left: 0; width: 100%; margin: 0; color: var(--cyan-bright); }
.login-copy { position: relative; z-index: 1; width: min(100%, 560px); }
.brand-mark-large { width: 48px; height: 50px; gap: 5px; }
.brand-mark-large i { width: 10px; }
.brand-mark-large i:nth-child(1) { height: 26px; }.brand-mark-large i:nth-child(2) { height: 42px; }.brand-mark-large i:nth-child(3) { height: 34px; }
.login-copy h1 { margin: 20px 0 18px; color: #fff; font-size: 2.65rem; }
.login-copy > p { max-width: 35ch; color: #c7d7e9; font-size: 1.05rem; }
.mini-flow { display: flex; gap: 28px; margin: 50px 0 0; padding: 0; list-style: none; counter-reset: flow; }
.mini-flow li { position: relative; color: #fff; font-size: .8rem; font-weight: 700; }
.mini-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -20px; color: var(--cyan-bright); }
.login-panel { display: grid; place-items: center; padding: 45px; }
.login-panel form { width: min(100%, 390px); }
.login-panel h2 { margin-bottom: 5px; font-size: 1.8rem; }
.login-panel form > p { margin-bottom: 28px; color: var(--muted); }
.login-panel label { display: block; margin: 14px 0 6px; color: #485568; font-size: .8rem; font-weight: 800; }
.login-panel .button { margin-top: 22px; }
.login-panel .form-help { margin: 16px 0 0; font-size: .75rem; text-align: center; }
.table-panel td small { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.table-panel .inline-form { grid-template-columns: 1.4fr 1fr auto auto; }
.pending-panel { width: min(100%, 390px); }
.pending-panel h2 { margin-bottom: 5px; font-size: 1.8rem; }
.pending-panel p { margin-bottom: 14px; color: var(--muted); }
.pending-panel .button { margin-top: 22px; }
.status-page { display: grid; place-items: center; padding: 30px; text-align: center; }
.status-page main { max-width: 540px; }
.status-page main > strong { color: var(--cyan); font-size: 3rem; }
.status-page p { color: var(--muted); }

@media (max-width: 1100px) {
  :root { --sidebar: 205px; }
  .sidebar { padding-inline: 13px; }
  .main-content { padding-inline: 30px; }
  .angled-rule { width: calc(100% + 60px); margin-inline: -30px; }
  .process-flow { gap: 15px; }
  .process-card:not(:last-child)::after { right: -15px; width: 15px; }
  .process-card:not(:last-child)::before { right: -15px; }
  .dashboard-summary > div { padding-inline: 14px; }
  .split-layout { grid-template-columns: 1fr; }
  .settings-section { grid-template-columns: 1fr; gap: 17px; }
  .login-intro { padding: 55px; }
}

@media (min-width: 821px) and (max-height: 800px) {
  .topbar { min-height: 56px; }
  .main-content { min-height: calc(100vh - 56px); padding-top: 18px; padding-bottom: 20px; }
  .angled-rule { height: 18px; margin-top: -18px; margin-bottom: 18px; }
  .page-header, .dashboard-header { margin-bottom: 15px; }
  .section-heading { margin-bottom: 10px; padding-bottom: 6px; }
  .process-card { min-height: 92px; padding-block: 12px; }
  .automation-line { min-height: 36px; }
  .dashboard-summary { margin-bottom: 20px; }
  .dashboard-summary > div { min-height: 62px; padding-block: 9px; }
  .future-grid article { min-height: 82px; padding-top: 14px; padding-bottom: 13px; }
  .future-grid span { top: 13px; }
  .foundation-note { padding-block: 10px; }
}

@media (max-width: 820px) {
  .sidebar { visibility: hidden; transform: translateX(-105%); transition: visibility 0s linear 180ms, transform 180ms ease-out; box-shadow: 16px 0 35px rgba(3,31,73,.22); }
  .nav-open .sidebar { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .nav-open::after { content: ""; position: fixed; z-index: 19; inset: 0; background: rgba(3,31,73,.38); }
  .app-frame { margin-left: 0; }
  .nav-toggle { position: fixed; z-index: 30; top: 10px; left: 12px; display: inline-grid; place-items: center; }
  .topbar { padding-right: 20px; padding-left: 68px; }
  .main-content { padding: 20px 24px 45px; }
  .angled-rule { width: calc(100% + 48px); margin: -20px -24px 24px; }
  .process-flow { grid-template-columns: 1fr 1fr; }
  .process-card:nth-child(2)::after { display: none; }
  .dashboard-summary { grid-template-columns: 1fr; }
  .dashboard-summary > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .detail-layout { grid-template-columns: 1fr; }
  .disabled-action { justify-items: start; text-align: left; }
  .health-strip { grid-template-columns: 1fr 1fr; }
  .login-main { grid-template-columns: 1fr; }
  .login-intro { min-height: 330px; padding: 70px 38px 42px; }
  .login-copy h1 { font-size: 2rem; }
  .login-panel { padding: 45px 30px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .topbar { min-height: 64px; padding-right: 11px; padding-left: 64px; }
  .tenant-name, .sample-badge, .user-link > span:last-child { display: none; }
  .topbar-actions { gap: 12px; }
  .main-content { padding: 17px 16px 38px; }
  .angled-rule { width: calc(100% + 32px); height: 18px; margin: -17px -16px 21px; }
  h1 { font-size: 1.55rem; }
  .page-header, .dashboard-header { margin-bottom: 20px; }
  .dashboard-header p br { display: none; }
  .process-flow { grid-template-columns: 1fr; gap: 22px; }
  .process-card { min-height: 95px; }
  .process-card:not(:last-child)::after { top: auto; right: 50%; bottom: -22px; width: 1px; height: 22px; }
  .process-card:not(:last-child)::before { top: auto; right: calc(50% - 3px); bottom: -22px; border: 3px solid transparent; border-top-color: var(--navy); }
  .process-card:nth-child(2)::after { display: block; }
  .automation-line { flex-wrap: wrap; padding: 10px 6px; text-align: center; }
  .future-grid { grid-template-columns: 1fr; }
  .future-grid article { padding-right: 74px; }
  .foundation-note { text-align: left; }
  .toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .toolbar .button { width: 100%; }
  .table-panel { border: 0; background: transparent; }
  .table-title { margin-bottom: 9px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tbody { display: grid; gap: 9px; }
  tr { padding: 13px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
  td { display: grid; grid-template-columns: 88px 1fr; padding: 7px 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 700; }
  td:first-child, td.notice-title-cell { display: block; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
  td:first-child::before, td.notice-title-cell::before { display: block; margin-bottom: 3px; }
  td:first-child > a, td.notice-title-cell > a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
  .split-layout, .field-grid { grid-template-columns: 1fr; }
  .detail-header { display: grid; }
  .detail-header .button { justify-self: start; }
  .detail-section dl { grid-template-columns: 1fr; }
  .settings-section { padding: 18px; }
  .report-actions { align-items: stretch; flex-direction: column; padding: 18px; }
  .report-actions .button { width: 100%; }
  .inline-form, .compact-form { grid-template-columns: 1fr; }
  .recipient-form { grid-template-columns: 1fr; }
  .danger-section { align-items: start; flex-direction: column; }
  .health-strip { grid-template-columns: 1fr; }
  .platform-actions { align-items: stretch; flex-direction: column; }
  .platform-actions .button { width: 100%; }
  .health-strip > div { padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.15); }
  .login-intro { min-height: 300px; padding: 65px 25px 35px; }
  .login-copy h1 { font-size: 1.75rem; }
  .mini-flow { gap: 22px; margin-top: 32px; }
  .mini-flow li { font-size: .72rem; }
  .mini-flow li:not(:last-child)::after { right: -16px; }
  .login-panel { padding: 36px 20px; }
}
