:root {
    --paper: #f3efe6;
    --paper-light: #fbf9f3;
    --paper-deep: #e8e1d4;
    --ink: #1d1e1a;
    --ink-soft: #34362f;
    --muted: #5f6158;
    --faint: #686a61;
    --line: #cbc4b6;
    --line-strong: #979386;
    --signal: #ed6228;
    --signal-dark: #a83b13;
    --success: #24603f;
    --danger: #9e3428;
    --warning: #815509;
    --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --mono: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(29, 30, 26, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 30, 26, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 12% 4%, rgba(237, 98, 40, 0.07), transparent 28rem);
    background-size: 32px 32px, 32px 32px, auto;
    background-attachment: fixed;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration-color: rgba(168, 59, 19, 0.55);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

a:hover {
    color: var(--signal-dark);
}

img,
svg {
    display: block;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

::selection {
    color: var(--ink);
    background: rgba(237, 98, 40, 0.28);
}

:focus-visible {
    outline: 3px solid var(--signal-dark);
    outline-offset: 3px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: var(--paper-light);
    background: var(--ink);
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Shared brand and controls */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    flex-shrink: 0;
}

.brand-mark {
    flex-shrink: 0;
    color: var(--signal-dark);
}

.brand-type {
    display: grid;
    gap: 1px;
}

.brand-type strong {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
}

.brand-type span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button-primary {
    color: var(--ink);
    border-color: var(--ink);
    background: var(--signal);
    box-shadow: inset 0 -2px 0 rgba(29, 30, 26, 0.2);
}

.button-primary:hover {
    color: var(--ink);
    border-color: var(--ink);
    background: #f47a45;
    box-shadow: 3px 3px 0 rgba(29, 30, 26, 0.16);
}

.button-secondary {
    color: var(--ink);
    border-color: var(--ink-soft);
    background: var(--paper-light);
}

.button-secondary:hover {
    color: var(--paper-light);
    background: var(--ink);
}

.button-ghost {
    color: var(--ink-soft);
    border-color: var(--line);
    background: rgba(251, 249, 243, 0.45);
}

.button-ghost:hover {
    color: var(--ink);
    border-color: var(--ink);
    background: var(--paper-light);
}

.button-danger {
    color: var(--danger);
    border-color: rgba(158, 52, 40, 0.52);
    background: transparent;
}

.button-danger:hover {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.button-small {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.button-block {
    width: 100%;
    justify-content: space-between;
    padding-inline: 22px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label,
.checkbox-line label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field select,
.form-field textarea,
input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    outline: none;
    background: rgba(251, 249, 243, 0.75);
    box-shadow: inset 0 1px 0 rgba(29, 30, 26, 0.03);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="url"]:hover,
input[type="number"]:hover {
    border-color: var(--ink-soft);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus {
    border-color: var(--signal-dark);
    background: var(--paper-light);
    box-shadow: 0 0 0 3px rgba(237, 98, 40, 0.15);
}

.form-field input:-webkit-autofill,
input[type="text"]:-webkit-autofill,
input[type="password"]:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px var(--paper-light) inset;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-row-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-row-label > span {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink-soft);
}

.checkbox-line input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 3px 0 0;
    accent-color: var(--signal-dark);
}

.help-text {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7;
}

.alert {
    position: relative;
    margin: 0 0 22px;
    padding: 13px 16px 13px 19px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink-soft);
    border-radius: 2px;
    color: var(--ink-soft);
    background: rgba(251, 249, 243, 0.8);
    font-size: 13px;
    line-height: 1.65;
    animation: alert-enter 280ms ease both;
}

.alert-success {
    color: #194b32;
    border-color: rgba(36, 96, 63, 0.35);
    border-left-color: var(--success);
    background: #edf4eb;
}

.alert-error,
.alert-danger {
    color: #7d281f;
    border-color: rgba(158, 52, 40, 0.35);
    border-left-color: var(--danger);
    background: #f8eae4;
}

.alert-warning {
    color: #674306;
    border-color: rgba(129, 85, 9, 0.35);
    border-left-color: var(--warning);
    background: #f8f0da;
}

.alert-info {
    color: var(--ink-soft);
    border-left-color: var(--signal-dark);
    background: #f7eee2;
}

.eyebrow,
.auth-kicker,
.page-kicker,
.section-index {
    margin-bottom: 14px;
    color: var(--signal-dark);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.5;
    text-transform: uppercase;
}

/* Authentication and installation */
.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-aside {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 40px clamp(32px, 4.5vw, 76px) 30px;
    overflow: hidden;
    border-right: 1px solid var(--line-strong);
}

.auth-aside::after {
    position: absolute;
    right: -110px;
    bottom: -110px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(168, 59, 19, 0.15);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(168, 59, 19, 0.035), 0 0 0 70px rgba(168, 59, 19, 0.025);
    content: "";
    pointer-events: none;
}

.auth-aside-copy {
    width: 100%;
    max-width: 780px;
    margin: auto 0;
    padding: 76px 0 58px clamp(66px, 7vw, 116px);
    animation: content-enter 650ms 80ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.auth-title {
    margin-bottom: 28px;
    font-family: var(--serif);
    font-size: clamp(44px, 5.25vw, 78px);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.2;
}

.auth-title em {
    position: relative;
    color: var(--signal-dark);
    font-style: normal;
}

.auth-title em::after {
    position: absolute;
    right: 0.02em;
    bottom: -0.05em;
    left: 0.02em;
    height: 3px;
    background: var(--signal);
    content: "";
}

.auth-description,
.auth-aside-copy > p:last-child,
.auth-aside > p {
    max-width: 480px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
}

.time-ruler {
    position: absolute;
    top: 23%;
    bottom: 22%;
    left: clamp(32px, 4.5vw, 76px);
    display: flex;
    width: 42px;
    flex-direction: column;
    justify-content: space-between;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1;
    pointer-events: none;
}

.time-ruler::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 25px;
    width: 17px;
    background: repeating-linear-gradient(to bottom, var(--line-strong) 0 1px, transparent 1px 13px);
    content: "";
    opacity: 0.65;
}

.time-ruler::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 23px;
    width: 1px;
    background: linear-gradient(var(--signal) 0 24%, var(--line) 24% 100%);
    content: "";
}

.time-ruler span {
    position: relative;
    z-index: 1;
    width: 18px;
    padding: 3px 0;
    background: var(--paper);
}

.auth-aside-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.live-label,
.secure-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.live-label i,
.secure-label i {
    display: inline-block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--signal-dark);
}

.live-label i {
    animation: signal-pulse 2.4s ease-in-out infinite;
}

.secure-label i {
    background: var(--success);
}

.auth-aside-footer time,
.brand-clock {
    display: grid;
    gap: 2px;
    text-align: right;
}

.auth-aside-footer time > span,
.brand-clock > span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.auth-aside-footer time > strong,
.brand-clock > strong {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.auth-panel {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 34px clamp(30px, 5vw, 82px) 26px;
    background: rgba(251, 249, 243, 0.8);
}

.auth-panel::before {
    position: absolute;
    top: 0;
    left: clamp(30px, 5vw, 82px);
    width: 72px;
    height: 4px;
    background: var(--signal);
    content: "";
}

.auth-panel-meta,
.auth-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.auth-form {
    width: 100%;
    max-width: 450px;
    margin: auto;
    padding: 64px 0;
    animation: content-enter 600ms 180ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.auth-form h2 {
    margin-bottom: 12px;
    font-family: var(--serif);
    font-size: clamp(34px, 3.5vw, 44px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.3;
}

.auth-intro {
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 13px;
}

.auth-form > form {
    display: grid;
    gap: 22px;
    margin-top: 32px;
}

.auth-form > .button {
    width: 100%;
    margin-top: 26px;
}

.auth-form .alert {
    margin-top: 22px;
}

.auth-panel-footer {
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 9px;
}

.install-notes {
    display: grid;
    max-width: 520px;
    margin: 36px 0 0 clamp(66px, 7vw, 116px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.install-notes span {
    position: relative;
    padding: 11px 8px 11px 20px;
    border-bottom: 1px solid rgba(203, 196, 182, 0.65);
    color: var(--muted);
    font-size: 12px;
}

.install-notes span:last-child {
    border-bottom: 0;
}

.install-notes span::before {
    position: absolute;
    top: 19px;
    left: 3px;
    width: 5px;
    height: 5px;
    background: var(--signal-dark);
    content: "";
}

/* Dashboard shell */
.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid var(--line-strong);
    background: rgba(243, 239, 230, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.topbar-inner {
    display: flex;
    width: 100%;
    max-width: 1536px;
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 0 auto;
    padding: 14px 32px;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.5vw, 36px);
}

.brand-clock {
    min-width: 162px;
}

.admin-identity {
    display: grid;
    gap: 1px;
    padding-left: clamp(18px, 2.5vw, 36px);
    border-left: 1px solid var(--line);
}

.admin-identity span {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.admin-identity strong {
    max-width: 180px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard {
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
    padding: 58px 32px 24px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 46px;
    animation: content-enter 500ms ease both;
}

.page-kicker {
    margin-bottom: 16px;
}

.dashboard-hero h1 {
    margin-bottom: 12px;
    font-family: var(--serif);
    font-size: clamp(46px, 5.5vw, 72px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.15;
}

.dashboard-hero h1 span {
    margin-left: 0.16em;
    color: var(--signal-dark);
}

.dashboard-intro {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-folio {
    display: grid;
    min-width: 168px;
    gap: 3px;
    padding-left: 25px;
    border-left: 1px solid var(--line-strong);
}

.page-folio > span,
.page-folio > small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.page-folio > strong {
    display: flex;
    align-items: center;
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.page-folio i {
    margin: 0 12px;
    color: var(--faint);
    font-family: var(--sans);
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 40px;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: rgba(251, 249, 243, 0.42);
    animation: content-enter 500ms 80ms ease both;
}

.stat-item {
    position: relative;
    min-width: 0;
    padding: 25px 30px 24px;
    border-right: 1px solid var(--line);
}

.stat-item:last-child {
    border-right: 0;
}

.stat-item::before {
    position: absolute;
    top: -1px;
    left: 30px;
    width: 34px;
    height: 3px;
    background: var(--ink-soft);
    content: "";
}

.stat-item.stat-enabled::before {
    background: var(--signal);
}

.stat-item dt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.stat-item dt span {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
}

.stat-item .stat-value {
    margin: 17px 0 3px;
    font-family: var(--serif);
    font-size: clamp(38px, 4vw, 50px);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.stat-item.stat-enabled .stat-value {
    color: var(--signal-dark);
}

.stat-item .stat-note {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.clients-panel {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: rgba(251, 249, 243, 0.72);
    box-shadow: 0 18px 48px rgba(29, 30, 26, 0.045);
    animation: content-enter 500ms 140ms ease both;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 26px 30px;
    border-bottom: 1px solid var(--line-strong);
}

.panel-heading .section-index {
    margin-bottom: 5px;
}

.panel-heading h2 {
    margin-bottom: 0;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.dispatch-note {
    display: flex;
    max-width: 530px;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.75;
}

.dispatch-note > span {
    color: var(--signal-dark);
    font-size: 15px;
    line-height: 1.5;
}

.table-wrap {
    overflow-x: auto;
}

.client-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    text-align: left;
}

.client-table th {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: rgba(232, 225, 212, 0.72);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.client-table td {
    padding: 22px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 12px;
    line-height: 1.7;
    transition: background-color 150ms ease;
}

.client-table tbody tr {
    animation: row-enter 360ms ease both;
}

.client-table tbody tr:nth-child(2) { animation-delay: 30ms; }
.client-table tbody tr:nth-child(3) { animation-delay: 60ms; }
.client-table tbody tr:nth-child(4) { animation-delay: 90ms; }
.client-table tbody tr:nth-child(5) { animation-delay: 120ms; }

.client-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-table tbody tr:hover td {
    background: rgba(237, 98, 40, 0.035);
}

.origin-cell {
    display: grid;
    max-width: 275px;
    gap: 7px;
}

.origin-cell a,
.origin-text {
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.origin-cell a {
    text-decoration-color: rgba(168, 59, 19, 0.45);
}

.record-id {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.05em;
}

.type-line {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.type-code {
    display: inline-flex;
    min-width: 30px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    color: var(--paper-light);
    background: var(--ink-soft);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
}

.cell-sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.cell-sub strong {
    color: var(--ink-soft);
    font-weight: 700;
}

.state-badge,
.health-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.state-badge {
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.state-badge i,
.health-status i {
    display: inline-block;
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    background: var(--faint);
}

.state-on {
    color: var(--success);
    border-color: rgba(36, 96, 63, 0.35);
    background: rgba(36, 96, 63, 0.05);
}

.state-on i {
    background: var(--success);
}

.state-off {
    color: var(--muted);
    background: rgba(95, 97, 88, 0.04);
}

.cell-stack {
    display: grid;
    gap: 1px;
    margin-top: 12px;
}

.cell-stack > span {
    color: var(--faint);
    font-size: 10px;
}

.cell-stack > strong {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dispatch-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dispatch-status::before {
    width: 12px;
    height: 2px;
    background: var(--faint);
    content: "";
}

.dispatch-sent {
    color: var(--signal-dark);
}

.dispatch-sent::before {
    background: var(--signal-dark);
}

.dispatch-failed {
    color: var(--danger);
}

.dispatch-failed::before {
    background: var(--danger);
}

.dispatch-never {
    color: var(--muted);
}

.health-healthy {
    color: var(--success);
}

.health-healthy i {
    background: var(--success);
}

.health-offline {
    color: var(--danger);
}

.health-offline i {
    background: var(--danger);
}

.health-suspect {
    color: var(--warning);
}

.health-suspect i {
    border: 1px solid var(--warning);
    background: transparent;
}

.health-unknown {
    color: var(--muted);
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 72px 24px 78px;
    text-align: center;
}

.empty-dial {
    position: relative;
    width: 76px;
    height: 76px;
    margin-bottom: 28px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, var(--line-strong) 0deg 1deg, transparent 1deg 30deg);
}

.empty-dial::before {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--paper-light);
    content: "";
}

.empty-dial::after {
    position: absolute;
    top: 35px;
    left: 35px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal-dark);
    content: "";
}

.empty-dial i {
    position: absolute;
    z-index: 1;
    top: 16px;
    left: 37px;
    width: 1px;
    height: 22px;
    background: var(--ink);
    transform-origin: 50% 100%;
    animation: dial-turn 16s linear infinite;
}

.empty-state .eyebrow {
    margin-bottom: 10px;
}

.empty-state h3 {
    margin-bottom: 8px;
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 600;
}

.empty-state > p:not(.eyebrow) {
    margin-bottom: 0;
    color: var(--muted);
}

.empty-state .button {
    margin-top: 24px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 26px;
    border-top: 1px solid var(--line-strong);
    background: rgba(232, 225, 212, 0.32);
}

.page-direction {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.page-direction:hover {
    color: var(--signal-dark);
}

.page-direction.is-disabled {
    color: var(--faint);
    cursor: default;
    opacity: 0.6;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-number {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    font-family: var(--mono);
    font-size: 11px;
    text-decoration: none;
}

.page-number:hover {
    border-color: var(--line-strong);
    background: var(--paper-light);
}

.page-number.is-current {
    color: var(--paper-light);
    border-color: var(--ink);
    background: var(--ink);
}

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 25px 2px 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
}

@keyframes content-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes alert-enter {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes row-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes signal-pulse {
    0%, 100% { opacity: 0.45; box-shadow: 0 0 0 0 rgba(168, 59, 19, 0.15); }
    50% { opacity: 1; box-shadow: 0 0 0 4px rgba(168, 59, 19, 0); }
}

@keyframes dial-turn {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .auth-layout {
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr);
    }

    .auth-aside-copy {
        padding-left: 64px;
    }

    .install-notes {
        margin-left: 64px;
    }

    .topbar-tools {
        gap: 18px;
    }

    .admin-identity {
        padding-left: 18px;
    }

    .stat-item {
        padding-inline: 22px;
    }

    .stat-item::before {
        left: 22px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        min-height: 590px;
        border-right: 0;
        border-bottom: 1px solid var(--line-strong);
    }

    .auth-title {
        font-size: clamp(48px, 9vw, 70px);
    }

    .auth-panel {
        min-height: 640px;
    }

    .topbar-inner {
        padding-inline: 22px;
    }

    .brand-clock {
        min-width: 0;
    }

    .admin-identity {
        display: none;
    }

    .dashboard {
        padding: 44px 22px 22px;
    }

    .stats-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-item:nth-child(2) {
        border-right: 0;
    }

    .stat-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 760px) {
    .topbar {
        position: relative;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding-block: 18px;
    }

    .topbar-tools {
        width: 100%;
        justify-content: space-between;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }

    .brand-clock {
        text-align: left;
    }

    .admin-identity {
        display: grid;
        margin-left: auto;
        padding-left: 18px;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .page-folio {
        width: 100%;
        grid-template-columns: 1fr auto;
        align-items: center;
        padding: 16px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .page-folio > strong {
        grid-row: 1 / span 2;
        grid-column: 2;
    }

    .page-folio > small {
        grid-column: 1;
    }

    .table-wrap {
        padding: 16px;
        overflow: visible;
    }

    .client-table,
    .client-table tbody,
    .client-table tr,
    .client-table td {
        display: block;
        width: 100%;
    }

    .client-table {
        min-width: 0;
    }

    .client-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .client-table tbody {
        display: grid;
        gap: 16px;
    }

    .client-table tr {
        overflow: hidden;
        border: 1px solid var(--line-strong);
        border-radius: 2px;
        background: var(--paper-light);
    }

    .client-table td {
        display: grid;
        grid-template-columns: minmax(88px, 27%) minmax(0, 1fr);
        gap: 8px 14px;
        padding: 16px;
        border-bottom: 1px solid var(--line) !important;
    }

    .client-table td:last-child {
        border-bottom: 0 !important;
    }

    .client-table td::before {
        grid-column: 1;
        grid-row: 1;
        color: var(--muted);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.08em;
    }

    .client-table td > * {
        min-width: 0;
        grid-column: 2;
    }

    .client-table td > .cell-sub,
    .client-table td > .cell-stack {
        margin-top: 0;
    }

    .client-table tbody tr:hover td {
        background: transparent;
    }

    .origin-cell {
        max-width: none;
    }

    .row-actions {
        gap: 10px;
    }

    .row-actions form {
        flex: 1 1 90px;
    }

    .row-actions .button {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        padding: 18px;
    }

    .page-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .dashboard-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 560px) {
    .auth-aside {
        min-height: 0;
        padding: 28px 22px 24px;
    }

    .auth-aside-copy {
        padding: 64px 0 52px;
    }

    .auth-title {
        font-size: clamp(40px, 12vw, 56px);
        letter-spacing: -0.06em;
    }

    .time-ruler {
        display: none;
    }

    .auth-aside-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .auth-aside-footer time {
        text-align: left;
    }

    .auth-panel {
        min-height: 0;
        padding: 28px 22px 22px;
    }

    .auth-panel::before {
        left: 22px;
    }

    .auth-form {
        padding: 58px 0;
    }

    .auth-panel-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .install-notes {
        margin: 0 0 42px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-label {
        display: flex;
    }

    .topbar-tools {
        flex-wrap: wrap;
        gap: 14px;
    }

    .admin-identity {
        order: 3;
        width: 100%;
        margin-left: 0;
        padding: 10px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .dashboard {
        padding: 36px 14px 20px;
    }

    .dashboard-hero {
        margin-bottom: 34px;
    }

    .dashboard-hero h1 {
        font-size: clamp(42px, 14vw, 58px);
    }

    .dashboard-intro {
        font-size: 13px;
        line-height: 1.8;
    }

    .stat-item {
        padding: 20px 16px;
    }

    .stat-item::before {
        left: 16px;
    }

    .stat-item dt {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 4px;
    }

    .stat-item .stat-value {
        margin-top: 12px;
    }

    .stat-item .stat-note {
        font-size: 10px;
    }

    .panel-heading {
        padding: 22px 18px;
    }

    .table-wrap {
        padding: 10px;
    }

    .client-table td {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 8px 10px;
        padding: 14px 12px;
    }

    .cell-stack > strong {
        font-size: 9px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .pagination {
        gap: 10px;
    }

    .page-direction {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
