:root {
    --ink: #162c3f;
    --muted: #566b79;
    --rail: #10293b;
    --rail-soft: #1c4054;
    --teal: #176b68;
    --teal-deep: #0d5754;
    --canvas: #f3f7f8;
    --line: #d9e4e8;
    --amber: #ad671e;
    --bs-primary: var(--teal);
    --bs-primary-rgb: 23,107,104;
}
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif; }
a { color: var(--teal-deep); }
a:hover { color: #073f3d; }
:focus-visible { outline: 3px solid #ce8731; outline-offset: 3px; }
.skip-link { position: absolute; z-index: 100; left: 1rem; top: -5rem; padding: .65rem 1rem; background: #fff; border-radius: .4rem; }
.skip-link:focus { top: 1rem; }
.workspace-shell { min-height: 100vh; display: grid; grid-template-columns: 15rem minmax(0,1fr); }
.workspace-rail { background: var(--rail); color: #c9dae1; padding: 2rem 1rem 1.3rem; display: flex; flex-direction: column; gap: 2.75rem; }
.brand-lockup { display: inline-flex; align-items: center; gap: .8rem; width: fit-content; color: #fff; text-decoration: none; }
.brand-lockup:hover { color: #fff; }
.brand-mark { width: 2.25rem; height: 2.25rem; display: inline-block; position: relative; border: 2px solid #8ccdc4; border-radius: .4rem; transform: rotate(-8deg); }
.brand-mark span { position: absolute; width: 1.1rem; height: 2px; background: #8ccdc4; top: .62rem; left: .47rem; transform: rotate(-35deg); }
.brand-mark span + span { top: 1.4rem; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand-wordmark strong { font-size: 1.2rem; letter-spacing: .04em; }
.brand-wordmark small { color: #afcbd3; font-size: .78rem; margin-top: .2rem; }
.rail-caption { color: #a8c0cb; font-size: .75rem; margin: 0 0 -2rem .8rem; }
.rail-link { color: #e5eff3; display: flex; gap: .8rem; align-items: center; padding: .8rem; border-radius: .4rem; text-decoration: none; font-weight: 600; }
.rail-link:hover, .rail-link.is-current { background: var(--rail-soft); color: #fff; }
.rail-link-mark { width: .6rem; height: .6rem; border: 1.5px solid currentColor; border-radius: 2px; }
.rail-footer { margin-top: auto; padding: 0 .8rem; color: #a8c0cb; font-size: .74rem; }
.rail-footer-line { display: block; width: 2.5rem; height: 2px; background: #8ccdc4; margin-bottom: .75rem; }
.workspace-content { min-width: 0; display: flex; flex-direction: column; }
.workspace-topbar { min-height: 4.5rem; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1.25rem,3vw,3rem); }
.topbar-location { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .83rem; font-weight: 600; }
.topbar-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--teal); }
.topbar-account { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.account-name { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .82rem; }
.signout-button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: .4rem; padding: .45rem .8rem; font-weight: 600; }
.signout-button:hover { color: var(--teal); border-color: var(--teal); }
.workspace-main { flex: 1; width: 100%; max-width: 97rem; padding: clamp(1.5rem,3vw,3rem); }
.workspace-footer { color: var(--muted); font-size: .75rem; padding: 1rem clamp(1.25rem,3vw,3rem); border-top: 1px solid var(--line); }
.page-kicker { color: var(--teal-deep); font-size: .78rem; font-weight: 700; margin: 0 0 .6rem; }
.page-heading { font-size: clamp(2rem,3.2vw,3rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 690; margin: 0; }
.page-intro { color: var(--muted); max-width: 45rem; margin: .85rem 0 0; line-height: 1.55; }
.page-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.btn-primary { --bs-btn-color: #fff; --bs-btn-bg: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--teal-deep); --bs-btn-hover-border-color: var(--teal-deep); --bs-btn-focus-shadow-rgb: 23,107,104; font-weight: 650; }
.btn-outline-primary { --bs-btn-color: var(--teal-deep); --bs-btn-border-color: #85aaa8; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--teal); --bs-btn-hover-border-color: var(--teal); }
.btn { border-radius: .4rem; padding: .55rem .9rem; }
.btn-sm { padding: .35rem .7rem; }
.metric-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.metric { position: relative; padding: 1.2rem 1.35rem; min-height: 7.2rem; background: #fff; border: 1px solid var(--line); border-radius: .55rem; overflow: hidden; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: .23rem; background: var(--teal); }
.metric:nth-child(2)::before { background: #4786a1; }
.metric:nth-child(3)::before { background: var(--amber); }
.metric-label, .metric-note { display: block; color: var(--muted); font-size: .8rem; }
.metric-label { font-weight: 600; }
.metric-value { display: block; margin-top: .65rem; font-size: 2.05rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-note { margin-top: .5rem; font-size: .76rem; }
.surface { background: #fff; border: 1px solid var(--line); border-radius: .55rem; }
.surface-heading { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.surface-heading h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.surface-heading p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.site-table { margin: 0; }
.site-table thead { background: #f7fafb; }
.site-table th { padding: .8rem 1.1rem; color: #526775; font-size: .76rem; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
.site-table td { padding: 1rem 1.1rem; border-color: #e8eff1; vertical-align: middle; font-size: .88rem; }
.site-table tbody tr:last-child td { border-bottom: 0; }
.site-table tbody tr:hover { background: #f8fbfb; }
.site-name { display: block; color: var(--ink); font-weight: 700; }
.site-domain { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.site-detail { display: block; color: var(--muted); font-size: .76rem; margin-top: .28rem; }
.status-pill { display: inline-flex; align-items: center; gap: .42rem; padding: .28rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ""; width: .39rem; height: .39rem; border-radius: 50%; background: currentColor; }
.status-pill.is-active { color: #0d6252; background: #e5f4ed; }
.status-pill.is-inactive { color: #606d76; background: #eef1f3; }
.status-pill.is-warning { color: #945915; background: #fff3e2; }
.status-pill.is-info { color: #275f7c; background: #e9f4f8; }
.empty-state { padding: 3.25rem 1.5rem; text-align: center; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.3rem; }
.back-link { display: inline-block; font-size: .82rem; font-weight: 650; margin-bottom: 1.25rem; text-underline-offset: .2em; }
.form-shell { max-width: 73rem; }
.form-section { padding: clamp(1.25rem,2.5vw,2rem); }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section-header { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.25rem; }
.form-section-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.form-section-header p { color: var(--muted); font-size: .83rem; margin: 0; }
.form-label, .form-check-label { font-size: .85rem; font-weight: 650; }
.form-control, .form-select { border-color: #bdcdd4; border-radius: .38rem; min-height: 2.7rem; }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(23,107,104,.14); }
.field-note { color: var(--muted); font-size: .75rem; margin-top: .3rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: 1.2rem clamp(1.25rem,2.5vw,2rem); border-top: 1px solid var(--line); background: #f9fbfb; border-radius: 0 0 .55rem .55rem; }
.warning-surface { margin-top: 1.5rem; padding: 1.4rem 1.6rem; border: 1px solid #e8cfac; background: #fffbf5; border-radius: .55rem; }
.warning-surface h2 { font-size: 1rem; font-weight: 700; margin-bottom: .45rem; }
.warning-surface p { font-size: .85rem; color: #665747; max-width: 47rem; }
.credential-value { display: block; padding: .8rem 1rem; background: #f4f8f9; border: 1px solid var(--line); border-radius: .35rem; overflow-wrap: anywhere; font-size: .85rem; }
.access-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(120deg,#10293b 0 39%,#edf4f4 39% 100%); }
.access-header { padding: 2rem clamp(1.5rem,5vw,5rem); }
.access-main { flex: 1; display: grid; place-items: center; padding: 2rem 1rem 3rem; }
.access-panel { width: min(100%,61rem); display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1fr); background: #fff; border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; box-shadow: 0 1.4rem 3rem rgba(16,41,59,.13); }
.access-intro { background: var(--rail); color: #fff; padding: clamp(2rem,4vw,3.8rem); display: flex; flex-direction: column; justify-content: space-between; min-height: 25rem; }
.access-intro h1 { font-size: clamp(2rem,3vw,2.8rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 690; margin: 0 0 1rem; }
.access-intro p { color: #c9dae1; line-height: 1.55; max-width: 19rem; }
.access-line { width: 3.5rem; height: .22rem; background: #8ccdc4; }
.access-form { padding: clamp(2rem,4vw,3.8rem); align-self: center; }
.access-form h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 .4rem; }
.access-form .form-intro { color: var(--muted); font-size: .85rem; margin-bottom: 1.7rem; }
.access-footer { color: #b5ccd6; font-size: .75rem; padding: 1rem clamp(1.5rem,5vw,5rem); }
@media (max-width: 900px) {
    .workspace-shell { grid-template-columns: minmax(0,1fr); }
    .workspace-rail { padding: .9rem 1.25rem; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
    .rail-caption, .rail-footer { display: none; }
    .workspace-rail nav { margin-left: auto; }
    .rail-link { padding: .55rem .7rem; font-size: .8rem; }
}
@media (max-width: 720px) {
    .page-heading-row { align-items: stretch; flex-direction: column; }
    .metric-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .metric:last-child { grid-column: 1 / -1; }
    .site-table thead { display: none; }
    .site-table, .site-table tbody, .site-table tr, .site-table td { display: block; width: 100%; }
    .site-table tr { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
    .site-table tr:last-child { border-bottom: 0; }
    .site-table td { display: grid; grid-template-columns: 6.8rem minmax(0,1fr); gap: .7rem; align-items: start; padding: .45rem .2rem; border: 0; }
    .site-table td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; font-weight: 650; padding-top: .1rem; }
    .access-panel { grid-template-columns: 1fr; }
    .access-intro { min-height: 0; gap: 1rem; }
}
@media (max-width: 460px) {
    .form-section-header { flex-direction: column; align-items: start; gap: .25rem; }
    .account-name { max-width: 8rem; }
    .brand-wordmark strong { font-size: 1rem; }
    .brand-mark { width: 2rem; height: 2rem; }
    .rail-link-mark { display: none; }
    .metric-row { grid-template-columns: 1fr; }
    .metric:last-child { grid-column: auto; }
    .site-table td { grid-template-columns: 5.8rem minmax(0,1fr); }
    .access-page { background: #10293b; }
}
@media (prefers-reduced-motion: no-preference) {
    .btn, .rail-link, .signout-button { transition: background-color .16s ease,border-color .16s ease,color .16s ease; }
}
