:root {
    --page: #f4f8f3;
    --surface: #ffffff;
    --surface-soft: #f8fbf7;
    --surface-green: #edf7ea;
    --border: #dce8de;
    --border-strong: #c8d9cb;
    --ink: #17221b;
    --ink-soft: #34443a;
    --muted: #58675d;
    --muted-light: #647369;
    --primary: #247b42;
    --primary-dark: #176b3a;
    --primary-deep: #0d4c2b;
    --primary-bright: #59a943;
    --lime: #a8d46f;
    --lime-soft: #e8f4d8;
    --active: #14804a;
    --active-soft: #e8f7ee;
    --danger: #bf3d42;
    --danger-soft: #fcebed;
    --warning: #a35e00;
    --warning-soft: #fff3d8;
    --info: #2e6d91;
    --info-soft: #e9f3f9;
    --shadow-sm: 0 4px 14px rgba(24, 65, 39, .06);
    --shadow: 0 14px 38px rgba(24, 65, 39, .09);
    --shadow-lg: 0 28px 70px rgba(13, 55, 31, .16);
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --sidebar-width: 252px;
    --font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
select {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

code {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--primary-dark);
    background: var(--surface-soft);
    font-family: Consolas, "Courier New", monospace;
    font-size: .88em;
}

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 9px;
    color: #fff;
    background: var(--primary-deep);
    transform: translateY(-160%);
    transition: transform .2s ease;
}

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

:focus-visible {
    outline: 3px solid rgba(36, 123, 66, .3);
    outline-offset: 2px;
}

.brand-logo {
    display: block;
    width: 208px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-logo--on-dark {
    box-sizing: content-box;
    border-radius: 12px;
    padding: 10px 14px;
    background: #fff;
}

.brand-logo--large {
    width: min(270px, 78%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--primary-bright);
    content: "";
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 10px 16px;
    font-weight: 680;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.button svg {
    width: 18px;
    height: 18px;
}

.button:not(:disabled):active {
    transform: translateY(1px);
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 18px rgba(23, 107, 58, .19);
}

.button--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2e8a4b 0%, #126031 100%);
    box-shadow: 0 10px 24px rgba(23, 107, 58, .25);
}

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

.button--secondary:hover:not(:disabled) {
    border-color: #a9c4af;
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.button--ghost {
    border-color: transparent;
    color: var(--muted);
    background: transparent;
}

.button--ghost:hover:not(:disabled) {
    color: var(--primary-dark);
    background: var(--surface-green);
}

.button--large {
    min-height: 48px;
    padding-inline: 22px;
}

.button--icon {
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.button.is-loading svg {
    animation: spin .85s linear infinite;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 13px;
}

.alert > svg {
    width: 19px;
    min-width: 19px;
    height: 19px;
    margin-top: 1px;
}

.alert strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

.alert ul {
    margin: 5px 0 0;
    padding-left: 17px;
}

.alert--error {
    border-color: #f1c9cc;
    color: #8d2f34;
    background: var(--danger-soft);
}

.alert--success {
    border-color: #bfe3cb;
    color: #12683a;
    background: var(--active-soft);
}

.alert--warning {
    border-color: #eed8a8;
    color: #82500a;
    background: var(--warning-soft);
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field label,
.label-row label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 680;
}

.field small {
    color: var(--muted);
    font-size: 12px;
}

.field input,
.field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input::placeholder {
    color: #6d7b72;
}

.field input:focus,
.field select:focus,
.input-wrap:focus-within {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 4px rgba(89, 169, 67, .12);
}

.input-wrap {
    display: flex;
    min-height: 46px;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-wrap > svg {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-left: 13px;
    color: #7d8b81;
}

.input-wrap input {
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.input-wrap input:focus {
    box-shadow: none;
}

.password-toggle {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    color: var(--muted);
    background: transparent;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-toggle.is-visible svg {
    opacity: .55;
}

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

.label-row > span {
    color: var(--muted-light);
    font-size: 11px;
}

/* Login */
.auth-page {
    overflow-x: hidden;
    background: #f8faf7;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 45%) 1fr;
}

.auth-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 64px);
    color: #fff;
    background:
        radial-gradient(circle at 15% 15%, rgba(170, 221, 103, .18), transparent 31%),
        linear-gradient(145deg, #0e5a31 0%, #176b3a 50%, #0c4b2c 100%);
}

.auth-visual::after {
    position: absolute;
    right: -110px;
    bottom: -120px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(213, 241, 184, .13);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(213, 241, 184, .04),
        0 0 0 90px rgba(213, 241, 184, .025);
    content: "";
}

.auth-visual .brand-logo {
    position: relative;
    z-index: 2;
}

.auth-visual__copy {
    position: relative;
    z-index: 2;
    max-width: 540px;
    margin-block: auto;
    padding-block: 45px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #dff3d0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-kicker i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a9db67;
    box-shadow: 0 0 0 5px rgba(169, 219, 103, .13);
}

.auth-visual__title {
    margin: 0 0 22px;
    font-size: clamp(48px, 6vw, 76px);
    font-weight: 760;
    letter-spacing: -.055em;
    line-height: .98;
}

.auth-visual__description {
    max-width: 510px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 17px;
    line-height: 1.7;
}

.auth-visual__status {
    position: relative;
    z-index: 2;
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 13px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 13px;
    padding: 11px 15px;
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(12px);
}

.auth-visual__status strong,
.auth-visual__status span {
    display: block;
}

.auth-visual__status strong {
    font-size: 13px;
}

.auth-visual__status span:not(.status-pulse) {
    margin-top: 2px;
    color: rgba(255, 255, 255, .65);
    font-size: 11px;
}

.status-pulse {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a8dd6b;
    box-shadow: 0 0 0 5px rgba(168, 221, 107, .13);
}

.auth-visual__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.auth-visual__glow--one {
    top: 17%;
    right: -40px;
    width: 150px;
    height: 150px;
    background: rgba(172, 226, 101, .07);
}

.auth-visual__glow--two {
    bottom: 19%;
    left: -80px;
    width: 240px;
    height: 240px;
    background: rgba(231, 247, 217, .04);
}

.network-pattern {
    position: absolute;
    z-index: 1;
    inset: 0;
    opacity: .38;
    pointer-events: none;
}

.network-line {
    position: absolute;
    height: 1px;
    transform-origin: left;
    background: linear-gradient(90deg, transparent, rgba(207, 238, 159, .4), transparent);
}

.network-line--1 {
    top: 29%;
    left: 41%;
    width: 48%;
    transform: rotate(33deg);
}

.network-line--2 {
    top: 52%;
    left: 10%;
    width: 46%;
    transform: rotate(-25deg);
}

.network-line--3 {
    top: 68%;
    left: 43%;
    width: 36%;
    transform: rotate(-42deg);
}

.network-node {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(223, 244, 207, .7);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(223, 244, 207, .05);
}

.network-node--1 {
    top: 28.5%;
    left: 41%;
}

.network-node--2 {
    top: 51%;
    left: 10%;
}

.network-node--3 {
    top: 65%;
    left: 72%;
}

.network-node--4 {
    top: 76%;
    left: 43%;
}

.auth-content {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 48px clamp(24px, 6vw, 88px) 28px;
}

.auth-card {
    width: min(440px, 100%);
}

.auth-card__heading {
    margin-bottom: 30px;
}

.auth-card__heading h1 {
    margin: 11px 0 8px;
    color: var(--ink);
    font-size: clamp(29px, 3vw, 36px);
    letter-spacing: -.035em;
    line-height: 1.15;
}

.auth-card__heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-card > .alert {
    margin-bottom: 20px;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.button--login {
    min-height: 50px;
    margin-top: 6px;
}

.button--login svg {
    margin-left: auto;
}

.auth-card__footer {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 27px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.auth-card__footer svg {
    width: 17px;
    min-width: 17px;
    height: 17px;
    color: var(--primary);
}

.auth-card__footer-copy {
    display: grid;
    gap: 5px;
}

.auth-mobile-brand {
    display: none;
    width: min(440px, 100%);
    margin-bottom: 38px;
}

.auth-copyright {
    margin: 0;
    color: var(--muted-light);
    font-size: 10px;
}

.restricted-setup {
    display: flex;
    width: min(470px, calc(100% - 36px));
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto;
    padding-block: 48px;
    text-align: center;
}

.restricted-setup .brand-logo {
    margin-bottom: auto;
}

.restricted-setup__icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 19px;
    color: var(--primary);
    background: var(--surface-green);
}

.restricted-setup__icon svg {
    width: 30px;
    height: 30px;
}

.restricted-setup h1 {
    margin: 20px 0 9px;
    font-size: 30px;
    letter-spacing: -.04em;
}

.restricted-setup p {
    margin: 0 auto auto;
    color: var(--muted);
    line-height: 1.7;
}

/* Setup */
.setup-page {
    background:
        radial-gradient(circle at 0 0, rgba(168, 212, 111, .18), transparent 28rem),
        var(--page);
}

.setup-shell {
    display: grid;
    width: min(1240px, calc(100% - 48px));
    min-height: 100vh;
    grid-template-columns: minmax(280px, .68fr) minmax(560px, 1.35fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
    margin: 0 auto;
    padding-block: 58px;
}

.setup-intro {
    position: sticky;
    top: 58px;
    display: flex;
    min-height: calc(100vh - 116px);
    flex-direction: column;
}

.setup-intro__content {
    margin-block: auto;
    padding-block: 60px;
}

.setup-intro__content h1 {
    max-width: 430px;
    margin: 13px 0 18px;
    font-size: clamp(38px, 4.8vw, 60px);
    letter-spacing: -.052em;
    line-height: 1.02;
}

.setup-intro__content p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.setup-security-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.setup-security-note strong,
.setup-security-note span {
    display: block;
}

.setup-security-note strong {
    font-size: 13px;
}

.setup-security-note span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.icon-well {
    display: grid;
    width: 42px;
    min-width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--primary);
    background: var(--surface-green);
}

.icon-well svg {
    width: 21px;
    height: 21px;
}

.setup-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 42px);
    background: rgba(255, 255, 255, .93);
    box-shadow: var(--shadow);
}

.setup-card__header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.setup-card__header h2 {
    margin: 10px 0 6px;
    font-size: 29px;
    letter-spacing: -.03em;
}

.setup-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.step-indicator {
    display: inline-flex;
    border-radius: 99px;
    padding: 5px 9px;
    color: var(--primary-dark);
    background: var(--lime-soft);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.setup-card > .alert {
    margin-bottom: 25px;
}

.setup-form {
    display: grid;
    gap: 30px;
}

.setup-form fieldset {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.setup-form legend {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 720;
}

.setup-form legend span {
    display: inline-grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 9px;
    color: var(--primary);
    background: var(--surface-green);
    font-size: 10px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field--full {
    grid-column: 1 / -1;
}

.field--span-2 {
    grid-column: span 2;
}

.switch-list {
    display: grid;
    gap: 9px;
    margin-top: 22px;
}

.switch-row {
    display: flex;
    min-height: 56px;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 9px 12px;
    background: var(--surface-soft);
    cursor: pointer;
}

.switch-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch {
    position: relative;
    width: 39px;
    min-width: 39px;
    height: 23px;
    border-radius: 99px;
    background: #c9d3cc;
    transition: background .18s ease;
}

.switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(20, 40, 25, .18);
    content: "";
    transition: transform .18s ease;
}

.switch-row input:checked + .switch {
    background: var(--primary);
}

.switch-row input:checked + .switch::after {
    transform: translateX(16px);
}

.switch-row input:focus-visible + .switch {
    outline: 3px solid rgba(36, 123, 66, .25);
    outline-offset: 2px;
}

.switch-row strong,
.switch-row small {
    display: block;
}

.switch-row strong {
    color: var(--ink-soft);
    font-size: 12px;
}

.switch-row small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px;
}

.setup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.form-assurance {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.form-assurance svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

/* Dashboard shell */
.visually-hidden {
    position: absolute !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    border: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.dashboard-page {
    background:
        radial-gradient(circle at 75% 0, rgba(168, 212, 111, .08), transparent 28rem),
        var(--page);
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    overflow-y: auto;
    flex-direction: column;
    border-right: 1px solid var(--border);
    padding: 24px 16px 17px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 8px 0 32px rgba(28, 68, 41, .035);
}

.sidebar__brand {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 17px;
}

.sidebar__brand .brand-logo {
    width: 180px;
}

.sidebar-close {
    display: none;
}

.pop-identity {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 5px 2px 23px;
    border: 1px solid #d7e7d8;
    border-radius: 13px;
    padding: 11px;
    background:
        linear-gradient(135deg, rgba(232, 244, 216, .62), rgba(238, 248, 235, .88));
}

.pop-identity__icon {
    display: grid;
    width: 37px;
    min-width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-bright), var(--primary-dark));
    box-shadow: 0 5px 13px rgba(23, 107, 58, .17);
}

.pop-identity__icon svg {
    width: 19px;
    height: 19px;
}

.pop-identity span,
.pop-identity strong {
    display: block;
}

.pop-identity span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.pop-identity strong {
    margin-top: 1px;
    color: var(--primary-deep);
    font-size: 13px;
}

.pop-identity .pop-identity__dot {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: #42a865;
    box-shadow: 0 0 0 4px rgba(66, 168, 101, .12);
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.sidebar-nav__label {
    margin: 0 10px 7px;
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.nav-item {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    padding: 9px 10px;
    color: var(--muted);
    background: transparent;
    font-size: 12px;
    font-weight: 630;
    text-decoration: none;
    text-align: left;
    transition: color .18s ease, background .18s ease;
}

.nav-item::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: -16px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--primary);
    opacity: 0;
    content: "";
    transition: opacity .18s ease;
}

.nav-item:hover {
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.nav-item.is-active {
    color: var(--primary-dark);
    background: var(--surface-green);
}

.nav-item.is-active::before {
    opacity: 1;
}

.nav-item > svg {
    width: 19px;
    min-width: 19px;
    height: 19px;
}

.nav-count {
    display: inline-flex;
    min-width: 24px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 99px;
    padding-inline: 6px;
    color: var(--active);
    background: var(--active-soft);
    font-size: 9px;
    font-weight: 760;
}

.nav-count--danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.nav-count--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.sidebar-help {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 1px 10px;
    align-items: center;
    margin: auto 2px 18px;
    border: 1px dashed #cadecc;
    border-radius: 12px;
    padding: 11px;
    background: #fbfdfb;
}

.sidebar-help__icon {
    display: grid;
    width: 35px;
    height: 35px;
    grid-row: span 2;
    place-items: center;
    border-radius: 9px;
    color: var(--primary);
    background: var(--surface-green);
}

.sidebar-help__icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-help strong {
    align-self: end;
    font-size: 10px;
}

.sidebar-help span {
    overflow: hidden;
    align-self: start;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar__account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline: 2px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.user-avatar {
    display: grid;
    width: 36px;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #cde1ce;
    border-radius: 11px;
    color: var(--primary-dark);
    background: linear-gradient(145deg, #e7f4dd, #f4faef);
    font-size: 12px;
    font-weight: 760;
}

.user-meta {
    min-width: 0;
    flex: 1;
}

.user-meta strong,
.user-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    font-size: 11px;
}

.user-meta span {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
}

.sidebar__account .button {
    width: 35px;
    min-width: 35px;
    height: 35px;
    min-height: 35px;
}

.sidebar__account .button svg {
    width: 17px;
    height: 17px;
}

.app-main {
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    min-height: 80px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(220, 232, 222, .9);
    padding: 12px clamp(24px, 3.3vw, 48px);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
}

.mobile-menu {
    display: none;
}

.topbar__title {
    min-width: 0;
}

.breadcrumb {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 630;
    letter-spacing: .04em;
}

.breadcrumb i {
    padding-inline: 4px;
    color: #c2cbc4;
    font-style: normal;
}

.topbar h1 {
    overflow: hidden;
    margin: 0;
    color: var(--ink);
    font-size: clamp(15px, 1.45vw, 20px);
    letter-spacing: -.018em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar h1 span {
    color: var(--primary);
    font-weight: 620;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.router-chip {
    display: flex;
    min-width: 144px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 7px 11px;
    background: var(--surface-soft);
}

.router-chip__indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa59e;
    box-shadow: 0 0 0 4px rgba(154, 165, 158, .1);
}

.router-chip strong,
.router-chip span:not(.router-chip__indicator) {
    display: block;
}

.router-chip strong {
    color: var(--ink-soft);
    font-size: 10px;
    line-height: 1.2;
}

.router-chip span:not(.router-chip__indicator) {
    overflow: hidden;
    max-width: 105px;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.router-chip--online {
    border-color: #c5e2ce;
    background: var(--active-soft);
}

.router-chip--online .router-chip__indicator {
    background: var(--active);
    box-shadow: 0 0 0 4px rgba(20, 128, 74, .11);
}

.router-chip--online strong {
    color: var(--active);
}

.router-chip--offline {
    border-color: #efd1d3;
    background: var(--danger-soft);
}

.router-chip--offline .router-chip__indicator {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(191, 61, 66, .1);
}

.router-chip--offline strong {
    color: var(--danger);
}

.router-chip--loading .router-chip__indicator {
    animation: chipPulse 1.2s ease-in-out infinite;
}

.sync-meta {
    padding-left: 15px;
    border-left: 1px solid var(--border);
    line-height: 1.2;
}

.sync-meta span,
.sync-meta strong {
    display: block;
    white-space: nowrap;
}

.sync-meta span {
    color: var(--muted-light);
    font-size: 8px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sync-meta strong {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 10px;
}

.topbar__actions > .button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 11px;
}

.topbar__actions > .refresh-button {
    width: auto;
    min-width: 0;
    gap: 7px;
    padding-inline: 13px;
    font-size: 11px;
    font-weight: 700;
}

.refresh-button svg {
    width: 16px;
    height: 16px;
}

.dashboard-content {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: clamp(26px, 3vw, 42px) clamp(24px, 3.3vw, 48px) 48px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-heading h2 {
    margin: 10px 0 5px;
    font-size: clamp(25px, 2.5vw, 34px);
    letter-spacing: -.043em;
    line-height: 1.12;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.auto-refresh {
    display: flex;
    min-width: 155px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .8);
    cursor: pointer;
}

.auto-refresh > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.auto-refresh .switch {
    width: 35px;
    min-width: 35px;
    height: 21px;
}

.auto-refresh .switch::after {
    width: 15px;
    height: 15px;
}

.auto-refresh input:checked + .switch {
    background: var(--primary);
}

.auto-refresh input:checked + .switch::after {
    transform: translateX(14px);
}

.auto-refresh input:focus-visible + .switch {
    outline: 3px solid rgba(36, 123, 66, .25);
    outline-offset: 2px;
}

.auto-refresh strong,
.auto-refresh small {
    display: block;
}

.auto-refresh strong {
    font-size: 10px;
}

.auto-refresh small {
    color: var(--muted);
    font-size: 8px;
}

.connection-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border: 1px solid #efcfd2;
    border-radius: 13px;
    padding: 12px 14px;
    color: #843135;
    background: var(--danger-soft);
}

.connection-banner[hidden] {
    display: none;
}

.connection-banner__icon {
    display: grid;
    width: 38px;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    color: var(--danger);
    background: rgba(191, 61, 66, .09);
}

.connection-banner__icon svg {
    width: 20px;
    height: 20px;
}

.connection-banner > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.connection-banner strong,
.connection-banner span {
    display: block;
}

.connection-banner strong {
    font-size: 12px;
}

.connection-banner span {
    margin-top: 2px;
    color: #9e5559;
    font-size: 10px;
}

.connection-banner .button {
    min-height: 36px;
    border-color: #e5bfc2;
    color: #8c363b;
    background: rgba(255, 255, 255, .6);
    font-size: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 18px 18px 14px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.stat-card::after {
    position: absolute;
    top: -38px;
    right: -38px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: currentColor;
    opacity: .035;
    content: "";
}

.stat-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-card--active {
    border-top: 3px solid var(--active);
}

.stat-card--danger {
    border-top: 3px solid var(--danger);
}

.stat-card--warning {
    border-top: 3px solid #d28a19;
}

.stat-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card--active .stat-icon {
    color: var(--active);
    background: var(--active-soft);
}

.stat-card--danger .stat-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.stat-card--warning .stat-icon {
    color: var(--warning);
    background: var(--warning-soft);
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 99px;
    padding: 5px 8px;
    font-size: 8px;
    font-weight: 740;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.trend-chip i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.trend-chip--active {
    color: var(--active);
    background: var(--active-soft);
}

.trend-chip--danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.trend-chip--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.stat-card__body > span {
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 630;
}

.stat-card__body > strong {
    display: block;
    margin-block: 1px 2px;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 760;
    letter-spacing: -.055em;
    line-height: 1.1;
}

.stat-card__body small {
    color: var(--muted-light);
    font-size: 9px;
}

.stat-card__body small b {
    color: var(--ink-soft);
    font-weight: 690;
}

.stat-card__source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 15px -3px 0;
    padding: 11px 3px 0;
    border-top: 1px solid var(--border);
}

.stat-card__source code {
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 8px;
}

.stat-card__source > span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 630;
}

.stat-card__source svg {
    width: 13px;
    height: 13px;
}

.monitor-card {
    scroll-margin-top: 96px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.monitor-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px 16px;
}

.monitor-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-title-row h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -.025em;
}

.monitor-card__header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.data-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 99px;
    padding: 4px 7px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 8px;
    font-weight: 710;
}

.data-source-badge::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.data-source-badge--live {
    color: var(--active);
    background: var(--active-soft);
}

.data-source-badge--cached {
    color: var(--info);
    background: var(--info-soft);
}

.data-source-badge--stale {
    color: var(--warning);
    background: var(--warning-soft);
}

.result-summary {
    padding-left: 20px;
    border-left: 1px solid var(--border);
    text-align: right;
}

.result-summary span,
.result-summary strong {
    display: block;
    white-space: nowrap;
}

.result-summary span {
    color: var(--muted-light);
    font-size: 8px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.result-summary strong {
    margin-top: 3px;
    font-size: 11px;
}

.status-tabs {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding-inline: 18px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
    display: none;
}

.status-tab {
    position: relative;
    display: inline-flex;
    min-height: 47px;
    align-items: center;
    gap: 7px;
    border: 0;
    padding: 10px 11px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.status-tab::after {
    position: absolute;
    right: 9px;
    bottom: -1px;
    left: 9px;
    height: 2px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
    opacity: 0;
    content: "";
}

.status-tab:hover {
    color: var(--ink-soft);
}

.status-tab.is-active {
    color: var(--primary-dark);
}

.status-tab.is-active::after {
    opacity: 1;
}

.status-tab__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-tab__dot--active {
    background: var(--active);
}

.status-tab__dot--danger {
    background: var(--danger);
}

.status-tab__dot--warning {
    background: #cf8411;
}

.status-tab b {
    display: inline-flex;
    min-width: 22px;
    height: 19px;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    padding-inline: 5px;
    color: var(--muted);
    background: var(--page);
    font-size: 8px;
}

.status-tab.is-active b {
    color: var(--primary-dark);
    background: var(--surface-green);
}

.monitor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    background: #fbfdfb;
}

.search-field {
    display: flex;
    width: min(470px, 55%);
    min-height: 39px;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.search-field:focus-within {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 4px rgba(89, 169, 67, .1);
}

.search-field > svg {
    width: 17px;
    min-width: 17px;
    height: 17px;
    margin-left: 11px;
    color: var(--muted);
}

.search-field input {
    width: 100%;
    min-width: 0;
    height: 37px;
    border: 0;
    padding: 8px 9px;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 10px;
}

.search-field input::placeholder {
    color: #6d7b72;
}

.search-field kbd {
    margin-right: 8px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 2px 5px;
    color: var(--muted-light);
    background: var(--surface-soft);
    font-family: inherit;
    font-size: 8px;
    white-space: nowrap;
}

.toolbar-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-wrap {
    display: flex;
    min-height: 39px;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface);
}

.select-wrap > svg {
    width: 15px;
    min-width: 15px;
    height: 15px;
    margin-left: 9px;
    color: var(--muted);
}

.select-wrap select {
    min-height: 37px;
    border: 0;
    padding: 7px 27px 7px 7px;
    outline: 0;
    color: var(--ink-soft);
    background: transparent;
    font-size: 9px;
}

.select-wrap:focus-within {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(89, 169, 67, .1);
}

.customer-panel {
    position: relative;
    min-height: 250px;
    outline: none;
}

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

.customer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10px;
}

.customer-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 13px;
    color: var(--muted);
    background: #f8faf8;
    font-size: 8px;
    font-weight: 730;
    letter-spacing: .035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-table th:first-child,
.customer-table td:first-child {
    padding-left: 20px;
}

.customer-table th:last-child,
.customer-table td:last-child {
    padding-right: 20px;
}

.customer-table td {
    height: 58px;
    border-bottom: 1px solid #edf2ee;
    padding: 8px 13px;
    color: var(--ink-soft);
    vertical-align: middle;
}

.customer-table tbody tr {
    transition: background .16s ease;
}

.customer-table tbody tr:hover {
    background: #fbfdfb;
}

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

.status-cell {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.status-badge {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    gap: 6px;
    border-radius: 99px;
    padding: 4px 8px;
    font-size: 8px;
    font-weight: 730;
    white-space: nowrap;
}

.status-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge--active {
    color: var(--active);
    background: var(--active-soft);
}

.status-badge--danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-badge--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.secret-state {
    padding-left: 4px;
    color: var(--muted-light);
    font-size: 7px;
    white-space: nowrap;
}

.secret-state--disabled {
    color: #7d6670;
}

.secret-state--running {
    color: var(--warning);
}

.customer-identity {
    display: flex;
    min-width: 150px;
    max-width: 260px;
    align-items: center;
    gap: 9px;
}

.customer-avatar {
    display: grid;
    width: 31px;
    min-width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid #d4e4d6;
    border-radius: 9px;
    color: var(--primary-dark);
    background: #eef7ec;
    font-size: 8px;
    font-weight: 760;
}

.customer-identity__copy {
    min-width: 0;
}

.customer-identity strong,
.customer-identity small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-identity strong {
    color: var(--ink);
    font-size: 10px;
    font-weight: 690;
}

.customer-identity small {
    max-width: 205px;
    margin-top: 2px;
    color: var(--muted-light);
    font-size: 8px;
}

.mono-value {
    color: #37483c;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 9px;
    white-space: nowrap;
}

.muted-value {
    color: #65736a;
}

.profile-badge {
    display: inline-block;
    max-width: 145px;
    overflow: hidden;
    border: 1px solid #dae6dc;
    border-radius: 6px;
    padding: 3px 6px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 8px;
    font-weight: 630;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uptime-value {
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 620;
    white-space: nowrap;
}

.table-action-heading,
.table-action-cell {
    width: 44px;
    text-align: right !important;
}

.row-detail-button {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
}

.row-detail-button:hover {
    border-color: var(--border);
    color: var(--primary);
    background: var(--surface-green);
}

.row-detail-button svg {
    width: 15px;
    height: 15px;
}

.customer-cards {
    display: none;
}

.loading-state {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    color: var(--muted);
    background: var(--surface);
    font-size: 10px;
}

.loading-state[hidden] {
    display: none;
}

.skeleton-table {
    display: grid;
    width: min(520px, calc(100% - 48px));
    gap: 8px;
}

.skeleton-table i {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #edf2ee 20%, #f7f9f7 50%, #edf2ee 80%);
    background-size: 220% 100%;
    animation: skeleton 1.4s ease-in-out infinite;
}

.skeleton-table i:nth-child(2) {
    width: 83%;
}

.skeleton-table i:nth-child(3) {
    width: 91%;
}

.skeleton-table i:nth-child(4) {
    width: 77%;
}

.skeleton-table i:nth-child(5) {
    width: 86%;
}

.empty-state {
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 34px;
    text-align: center;
}

.empty-state[hidden] {
    display: none;
}

.empty-state__icon {
    display: grid;
    width: 51px;
    height: 51px;
    place-items: center;
    border-radius: 15px;
    color: var(--primary);
    background: var(--surface-green);
}

.empty-state__icon svg {
    width: 25px;
    height: 25px;
}

.empty-state h3 {
    margin: 13px 0 4px;
    font-size: 13px;
}

.empty-state p {
    max-width: 370px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.empty-state .button {
    min-height: 35px;
    margin-top: 14px;
    font-size: 9px;
}

.monitor-footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--border);
    padding: 9px 18px;
    color: var(--muted);
    background: #fbfdfb;
    font-size: 9px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination .button {
    width: 33px;
    min-width: 33px;
    height: 33px;
    min-height: 33px;
    border-radius: 8px;
}

.pagination .button svg {
    width: 14px;
    height: 14px;
}

.pagination .button:disabled {
    opacity: .45;
}

.pagination span {
    min-width: 89px;
    text-align: center;
}

.status-explainer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    border: 1px solid #d9e7d9;
    border-radius: 13px;
    padding: 13px 15px;
    background: rgba(247, 251, 246, .76);
}

.status-explainer__icon {
    display: grid;
    width: 32px;
    min-width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: var(--primary);
    background: var(--surface-green);
}

.status-explainer__icon svg {
    width: 17px;
    height: 17px;
}

.status-explainer strong {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
}

.status-explainer p {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.7;
}

.status-explainer code {
    padding: 1px 4px;
    font-size: 8px;
}

/* Detail drawer / modal */
.detail-dialog {
    width: min(660px, calc(100% - 28px));
    max-height: min(820px, calc(100vh - 24px));
    max-height: min(820px, calc(100dvh - 24px));
    overflow-y: auto;
    margin: auto;
    border: 1px solid var(--border);
    border-radius: 19px;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.detail-dialog::backdrop {
    background: rgba(12, 28, 18, .45);
    backdrop-filter: blur(3px);
}

.detail-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    padding: 20px 21px 16px;
}

.detail-dialog__header h2 {
    margin: 8px 0 0;
    font-size: 22px;
    letter-spacing: -.03em;
}

.detail-dialog__header .eyebrow {
    font-size: 9px;
}

.detail-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 21px 0;
}

.detail-alert {
    border-radius: 7px;
    padding: 4px 7px;
    font-size: 8px;
    font-weight: 650;
}

.detail-alert--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.detail-alert--muted {
    color: #705d64;
    background: #f4eff1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 16px 21px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--border);
}

.detail-field {
    min-width: 0;
    padding: 11px 12px;
    background: var(--surface-soft);
}

.detail-field dt {
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 8px;
    text-transform: uppercase;
}

.detail-field dd {
    overflow: hidden;
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traffic-monitor {
    margin: 0 21px 19px;
    overflow: hidden;
    border: 1px solid #d9e8dc;
    border-radius: 14px;
    padding: 15px;
    background:
        radial-gradient(circle at 100% 0, rgba(82, 166, 95, .1), transparent 38%),
        #f9fcf9;
}

.traffic-monitor__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.traffic-monitor__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.traffic-monitor__header h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -.025em;
}

.traffic-monitor__header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.traffic-monitor__start {
    min-height: 44px;
    flex: 0 0 auto;
    gap: 6px;
    padding-inline: 12px;
    font-size: 9px;
}

.traffic-monitor__start svg {
    width: 15px;
    height: 15px;
}

.traffic-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.traffic-metric {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, .9);
}

.traffic-metric__label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.traffic-metric__label > span {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
}

.traffic-metric--download .traffic-metric__label > span {
    color: var(--active);
    background: var(--active-soft);
}

.traffic-metric--upload .traffic-metric__label > span {
    color: #2c72bd;
    background: #eaf3fd;
}

.traffic-metric__label strong,
.traffic-metric__label small {
    display: block;
}

.traffic-metric__label strong {
    color: var(--ink-soft);
    font-size: 10px;
}

.traffic-metric__label small {
    margin-top: 1px;
    color: var(--muted-light);
    font-size: 8px;
}

.traffic-metric__value {
    display: block;
    overflow: hidden;
    margin-top: 10px;
    font-size: clamp(19px, 4vw, 25px);
    letter-spacing: -.045em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.traffic-metric--download .traffic-metric__value {
    color: var(--active);
}

.traffic-metric--upload .traffic-metric__value {
    color: #2c72bd;
}

.traffic-metric__peak {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 8px;
}

.traffic-metric__peak b {
    color: var(--ink-soft);
    font-weight: 700;
}

.traffic-chart {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 9px 10px 8px;
    background: rgba(255, 255, 255, .92);
}

.traffic-chart__legend {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 8px;
}

.traffic-chart__legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.traffic-chart__key {
    width: 15px;
    height: 2px;
    border-radius: 999px;
}

.traffic-chart__key--download {
    background: var(--active);
}

.traffic-chart__key--upload {
    background: repeating-linear-gradient(
        90deg,
        #2c72bd 0 4px,
        transparent 4px 6px
    );
}

.traffic-chart__plot {
    position: relative;
}

.traffic-chart svg {
    display: block;
    width: 100%;
    height: 126px;
    overflow: visible;
}

.traffic-chart__grid {
    fill: none;
    stroke: #e6eee8;
    stroke-width: 1;
}

.traffic-chart__line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.traffic-chart__line--download {
    stroke: var(--active);
}

.traffic-chart__line--upload {
    stroke: #2c72bd;
    stroke-dasharray: 5 4;
}

.traffic-monitor__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.traffic-monitor__status {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 8px;
}

.traffic-monitor__status i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #9aa59e;
}

.traffic-monitor__status[data-state="running"] i {
    background: var(--active);
    box-shadow: 0 0 0 4px rgba(20, 128, 74, .1);
    animation: chipPulse 1.2s ease-in-out infinite;
}

.traffic-monitor__status[data-state="complete"] i {
    background: var(--active);
}

.traffic-monitor__status[data-state="error"] i,
.traffic-monitor__status[data-state="stopped"] i {
    background: var(--danger);
}

.traffic-monitor__footer > strong {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 9px;
}

.traffic-monitor__progress {
    height: 3px;
    overflow: hidden;
    margin-top: 8px;
    border-radius: 999px;
    background: #e6eee8;
}

.traffic-monitor__progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--active), #7fc653);
    transition: width .2s linear;
}

.detail-comment {
    margin: 0 21px 19px;
}

.detail-comment > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.detail-comment p {
    min-height: 52px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 11px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 10px;
    line-height: 1.6;
}

.detail-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--border);
    padding: 13px 21px;
    color: var(--muted);
    background: #fbfdfb;
    font-size: 8px;
}

.detail-dialog__footer .button {
    min-height: 34px;
    padding: 7px 13px;
    font-size: 9px;
}

.toast-region {
    position: fixed;
    z-index: 100;
    right: 20px;
    bottom: 20px;
    display: grid;
    width: min(370px, calc(100% - 40px));
    gap: 9px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 13px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    font-size: 10px;
    animation: toastIn .22s ease both;
    backdrop-filter: blur(12px);
}

.toast.is-leaving {
    animation: toastOut .22s ease both;
}

.toast__icon {
    display: grid;
    width: 27px;
    min-width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 8px;
}

.toast__icon svg {
    width: 15px;
    height: 15px;
}

.toast--success .toast__icon {
    color: var(--active);
    background: var(--active-soft);
}

.toast--warning .toast__icon {
    color: var(--warning);
    background: var(--warning-soft);
}

.toast--error .toast__icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.sidebar-overlay {
    position: fixed;
    z-index: 55;
    inset: 0;
    background: rgba(15, 32, 21, .42);
    backdrop-filter: blur(2px);
}

.sidebar-overlay[hidden] {
    display: none;
}

/* Minimum readable type for dense network-operations UI. */
.dashboard-page .sidebar-nav__label,
.dashboard-page .nav-count,
.dashboard-page .pop-identity span,
.dashboard-page .sidebar-help span,
.dashboard-page .user-meta span,
.dashboard-page .sync-meta span,
.dashboard-page .auto-refresh small,
.dashboard-page .trend-chip,
.dashboard-page .data-source-badge,
.dashboard-page .result-summary span,
.dashboard-page .status-tab b,
.dashboard-page .search-field kbd,
.dashboard-page .customer-table th,
.dashboard-page .secret-state,
.dashboard-page .customer-identity small,
.dashboard-page .status-explainer code,
.dashboard-page .detail-alert,
.dashboard-page .detail-field dt,
.dashboard-page .detail-comment > span,
.dashboard-page .detail-dialog__footer,
.dashboard-page .customer-mobile-card__details dt {
    font-size: 10px;
}

.dashboard-page .breadcrumb,
.dashboard-page .sidebar-help strong,
.dashboard-page .router-chip strong,
.dashboard-page .router-chip span:not(.router-chip__indicator),
.dashboard-page .sync-meta strong,
.dashboard-page .connection-banner span,
.dashboard-page .connection-banner .button,
.dashboard-page .stat-card__body small,
.dashboard-page .stat-card__source code,
.dashboard-page .stat-card__source > span,
.dashboard-page .monitor-card__header p,
.dashboard-page .status-tab,
.dashboard-page .search-field input,
.dashboard-page .select-wrap select,
.dashboard-page .status-badge,
.dashboard-page .mono-value,
.dashboard-page .profile-badge,
.dashboard-page .uptime-value,
.dashboard-page .empty-state p,
.dashboard-page .empty-state .button,
.dashboard-page .monitor-footer,
.dashboard-page .status-explainer strong,
.dashboard-page .status-explainer p,
.dashboard-page .detail-dialog__header .eyebrow,
.dashboard-page .detail-field dd,
.dashboard-page .detail-comment p,
.dashboard-page .detail-dialog__footer .button,
.dashboard-page .toast,
.dashboard-page .customer-mobile-card__details dd,
.dashboard-page .customer-mobile-card__button {
    font-size: 11px;
}

.dashboard-page .nav-item,
.dashboard-page .page-heading p,
.dashboard-page .connection-banner strong,
.dashboard-page .stat-card__body > span,
.dashboard-page .customer-table,
.dashboard-page .customer-identity strong {
    font-size: 12px;
}

/* Internet uplink monitoring */
.internet-content {
    width: min(1450px, 100%);
}

.internet-heading {
    align-items: center;
}

.internet-heading code {
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--primary-dark);
    background: var(--surface-green);
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: .92em;
}

.internet-start-button {
    min-width: 180px;
    min-height: 46px;
    justify-content: center;
    gap: 8px;
}

.internet-start-button svg {
    width: 17px;
    height: 17px;
}

.internet-run-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 24px;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 18px 20px 14px;
    background:
        radial-gradient(circle at 100% 0, rgba(151, 192, 61, .12), transparent 34%),
        var(--surface);
    box-shadow: 0 8px 25px rgba(19, 61, 32, .05);
}

.internet-run-card__main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.internet-interface-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: var(--surface-green);
}

.internet-interface-icon svg {
    width: 24px;
    height: 24px;
}

.internet-run-card__main span {
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.internet-run-card__main h3 {
    margin: 3px 0 2px;
    font-size: 21px;
    letter-spacing: -.035em;
}

.internet-run-card__main p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.internet-run-card__timer {
    display: flex;
    align-items: center;
    gap: 18px;
}

#internet-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
}

#internet-status i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #9aa59e;
}

#internet-status[data-state="running"] i {
    background: var(--active);
    box-shadow: 0 0 0 4px rgba(20, 128, 74, .1);
    animation: chipPulse 1.2s ease-in-out infinite;
}

#internet-status[data-state="complete"] i {
    background: var(--active);
}

#internet-status[data-state="stopped"] i,
#internet-status[data-state="error"] i {
    background: var(--danger);
}

#internet-status b {
    font-weight: 650;
}

.internet-run-card__timer > strong {
    min-width: 64px;
    color: var(--ink);
    font-size: 13px;
    text-align: right;
}

.internet-progress {
    grid-column: 1 / -1;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6eee8;
}

.internet-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--active), #9ac23b);
    transition: width .2s linear;
}

.internet-rate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.internet-rate-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 3px solid var(--active);
    border-radius: 16px;
    padding: 17px 19px;
    background:
        radial-gradient(circle at 100% 0, rgba(44, 155, 91, .1), transparent 42%),
        var(--surface);
    box-shadow: 0 8px 25px rgba(19, 61, 32, .045);
}

.internet-rate-card--upload {
    border-top-color: #2c72bd;
    background:
        radial-gradient(circle at 100% 0, rgba(44, 114, 189, .1), transparent 42%),
        var(--surface);
}

.internet-rate-card__heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.internet-rate-card__heading > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    color: var(--active);
    background: var(--active-soft);
    font-size: 20px;
    font-weight: 800;
}

.internet-rate-card--upload .internet-rate-card__heading > span {
    color: #2c72bd;
    background: #eaf3fd;
}

.internet-rate-card__heading strong,
.internet-rate-card__heading small {
    display: block;
}

.internet-rate-card__heading strong {
    font-size: 13px;
}

.internet-rate-card__heading small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.internet-rate-card__value {
    display: block;
    overflow: hidden;
    margin-top: 17px;
    color: var(--active);
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -.055em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.internet-rate-card--upload .internet-rate-card__value {
    color: #2c72bd;
}

.internet-rate-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 10px;
}

.internet-rate-card__meta b {
    color: var(--ink-soft);
}

.internet-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.internet-chart-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 17px 18px 13px;
    background: var(--surface);
    box-shadow: 0 8px 25px rgba(19, 61, 32, .045);
}

.internet-chart-card header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.internet-chart-card header span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.internet-chart-card header h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -.025em;
}

.internet-chart-card header > strong {
    color: var(--active);
    font-size: 16px;
}

.internet-chart-card--upload header > strong {
    color: #2c72bd;
}

.internet-chart-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid #e4ece6;
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(245, 250, 246, .7), rgba(255, 255, 255, .96));
}

.internet-chart-points {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.internet-chart-point {
    position: absolute;
    width: 0;
    height: 0;
}

.internet-chart-point i {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--active);
    box-shadow: 0 1px 4px rgba(19, 61, 32, .22);
    transform: translate(-50%, -50%);
}

.internet-chart-point b {
    position: absolute;
    bottom: 7px;
    left: 0;
    width: max-content;
    max-width: 72px;
    border: 1px solid rgba(20, 128, 74, .16);
    border-radius: 5px;
    padding: 3px 5px;
    color: var(--active);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 7px rgba(19, 61, 32, .08);
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-50%);
}

.internet-chart-point.is-start b {
    transform: translateX(0);
}

.internet-chart-point.is-end b {
    transform: translateX(-100%);
}

.internet-chart-point.is-below b {
    top: 7px;
    bottom: auto;
}

.internet-chart-points--upload .internet-chart-point i {
    background: #2c72bd;
}

.internet-chart-points--upload .internet-chart-point b {
    border-color: rgba(44, 114, 189, .16);
    color: #2c72bd;
}

.internet-chart-wrap svg {
    display: block;
    width: 100%;
    height: 220px;
}

.internet-chart-grid-lines {
    fill: none;
    stroke: #e5ece7;
    stroke-width: 1;
}

.internet-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.6;
}

.internet-chart-line--download {
    stroke: var(--active);
}

.internet-chart-line--upload {
    stroke: #2c72bd;
}

.internet-chart-area {
    stroke: none;
}

.internet-chart-area--download {
    fill: rgba(20, 128, 74, .1);
}

.internet-chart-area--upload {
    fill: rgba(44, 114, 189, .1);
}

.internet-chart-card footer {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    color: var(--muted-light);
    font-size: 9px;
}

@keyframes chipPulse {
    50% {
        opacity: .4;
        transform: scale(.76);
    }
}

@keyframes skeleton {
    to {
        background-position: -220% 0;
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .auth-visual {
        display: none;
    }

    .auth-content {
        min-height: 100vh;
        padding: 36px 24px 24px;
    }

    .auth-mobile-brand {
        display: block;
    }

    .setup-shell {
        width: min(720px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 32px;
        padding-block: 32px;
    }

    .setup-intro {
        position: static;
        min-height: 0;
    }

    .setup-intro__content {
        padding: 34px 0 0;
    }

    .setup-intro__content h1 {
        max-width: 620px;
    }

    .setup-intro__content p {
        max-width: 620px;
    }

    .setup-security-note {
        display: none;
    }

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

    .stat-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 620px) {
    .auth-content {
        justify-content: flex-start;
        padding-top: 28px;
    }

    .auth-mobile-brand {
        margin-bottom: 45px;
    }

    .brand-logo {
        width: 190px;
    }

    .auth-card__heading {
        margin-bottom: 25px;
    }

    .auth-card__heading h1 {
        font-size: 29px;
    }

    .setup-shell {
        width: min(100% - 22px, 720px);
        padding-block: 22px;
    }

    .setup-intro__content {
        padding-top: 26px;
    }

    .setup-intro__content h1 {
        font-size: 37px;
    }

    .setup-card {
        border-radius: 16px;
        padding: 20px 16px;
    }

    .form-grid--2,
    .form-grid--3 {
        grid-template-columns: 1fr;
    }

    .field--span-2,
    .field--full {
        grid-column: auto;
    }

    .setup-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

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

    .form-assurance {
        justify-content: center;
    }
}

@media (max-width: 1120px) {
    :root {
        --sidebar-width: 220px;
    }

    .sidebar {
        padding-inline: 12px;
    }

    .sidebar__brand .brand-logo {
        width: 170px;
    }

    .dashboard-content,
    .topbar {
        padding-inline: 26px;
    }

    .sync-meta {
        display: none;
    }

    .search-field {
        width: 48%;
    }
}

@media (max-width: 820px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        width: min(290px, calc(100% - 48px));
        padding-inline: 16px;
        box-shadow: 20px 0 60px rgba(12, 35, 21, .2);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar__brand .brand-logo {
        width: 180px;
    }

    .sidebar-close {
        display: grid;
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu {
        display: grid;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .topbar {
        min-height: 72px;
        padding-inline: 18px;
    }

    .breadcrumb {
        display: none;
    }

    .topbar h1 {
        white-space: normal;
    }

    .topbar h1 span {
        display: block;
        margin-top: 2px;
        font-size: 11px;
    }

    .router-chip {
        min-width: 0;
        border: 0;
        padding: 6px;
        background: transparent;
    }

    .router-chip > div {
        display: none;
    }

    .topbar__actions {
        gap: 7px;
    }

    .dashboard-content {
        padding: 26px 18px 40px;
    }

    .monitor-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-field {
        width: 100%;
    }

    .toolbar-filters {
        justify-content: flex-end;
    }

    .customer-table {
        min-width: 920px;
    }
}

@media (max-width: 640px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .page-heading h2 {
        font-size: 27px;
    }

    .page-heading p {
        line-height: 1.6;
    }

    .auto-refresh {
        width: 100%;
        min-width: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card:last-child {
        grid-column: auto;
    }

    .stat-card {
        padding: 15px 16px 12px;
    }

    .stat-card__top {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .trend-chip {
        display: none;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-card__body {
        padding-right: 54px;
    }

    .stat-card__body > strong {
        font-size: 33px;
    }

    .stat-card__source {
        margin-top: 12px;
    }

    .connection-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .connection-banner > div:nth-child(2) {
        width: calc(100% - 52px);
        flex: none;
    }

    .connection-banner .button {
        width: 100%;
    }

    .monitor-card {
        margin-inline: -7px;
        border-radius: 15px;
    }

    .monitor-card__header {
        align-items: flex-start;
        padding: 17px 15px 14px;
    }

    .monitor-card__header p {
        max-width: 270px;
        line-height: 1.5;
    }

    .result-summary {
        display: none;
    }

    .status-tabs {
        padding-inline: 8px;
    }

    .status-tab {
        flex: 1;
        justify-content: center;
        padding-inline: 8px;
    }

    .monitor-toolbar {
        padding: 11px;
    }

    .search-field kbd {
        display: none;
    }

    .toolbar-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .select-wrap select {
        width: 100%;
    }

    .table-wrap {
        display: none;
    }

    .customer-cards {
        display: grid;
        gap: 10px;
        padding: 11px;
    }

    .customer-mobile-card {
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        background: var(--surface);
        box-shadow: 0 3px 11px rgba(22, 65, 36, .04);
    }

    .customer-mobile-card__top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding-bottom: 11px;
        border-bottom: 1px solid var(--border);
    }

    .customer-mobile-card__top .customer-identity {
        min-width: 0;
        flex: 1;
    }

    .customer-mobile-card__top .status-cell {
        align-items: flex-end;
    }

    .customer-mobile-card__details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 12px 0;
    }

    .customer-mobile-card__details div {
        min-width: 0;
    }

    .customer-mobile-card__details dt {
        color: var(--muted-light);
        font-size: 8px;
    }

    .customer-mobile-card__details dd {
        overflow: hidden;
        margin: 2px 0 0;
        color: var(--ink-soft);
        font-family: "Cascadia Mono", Consolas, monospace;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .customer-mobile-card__button {
        width: 100%;
        min-height: 35px;
        font-size: 9px;
    }

    .monitor-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
        text-align: center;
    }

    .pagination {
        justify-content: center;
    }

    .status-explainer {
        margin-inline: -3px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-status-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .traffic-monitor {
        margin-inline: 14px;
        padding: 13px;
    }

    .traffic-monitor__header {
        flex-wrap: wrap;
    }

    .traffic-monitor__eyebrow,
    .traffic-chart__legend,
    .traffic-metric__peak,
    .traffic-monitor__status {
        font-size: 10px;
    }

    .traffic-monitor__header p,
    .traffic-monitor__start,
    .traffic-monitor__footer > strong {
        font-size: 11px;
    }

    .traffic-metric__label strong {
        font-size: 11px;
    }

    .traffic-metric__label small {
        font-size: 10px;
    }

    .traffic-chart svg {
        height: 120px;
    }

    .traffic-monitor__footer {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .toast-region {
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }
}

@media (max-width: 360px) {
    .traffic-metrics {
        grid-template-columns: 1fr;
    }

    .traffic-monitor__start {
        width: 100%;
        justify-content: center;
    }

    .traffic-monitor__footer {
        flex-direction: column;
    }
}

@media (max-width: 1120px) {
    .internet-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .internet-heading {
        align-items: stretch;
    }

    .internet-start-button {
        width: 100%;
    }

    .internet-run-card {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px;
    }

    .internet-run-card__timer {
        justify-content: space-between;
    }

    .internet-progress {
        grid-column: auto;
    }

    .internet-rate-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .internet-rate-card__value {
        font-size: 34px;
    }

    .internet-chart-grid {
        gap: 12px;
    }

    .internet-chart-card {
        padding: 14px 13px 11px;
    }

    .internet-chart-wrap svg {
        height: 180px;
    }

    .internet-chart-card header > strong {
        font-size: 14px;
    }
}

@media (max-width: 390px) {
    .internet-run-card__timer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .internet-run-card__timer > strong {
        text-align: left;
    }

    .internet-rate-card__meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

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