:root {
    --bg: #0a1020;
    --panel: #131c30;
    --panel-soft: #18243c;
    --line: rgba(107, 130, 171, 0.18);
    --text: #eef4ff;
    --muted: #7d91b8;
    --accent: #4b7cff;
    --accent-soft: rgba(75, 124, 255, 0.16);
    --warning: #ffb454;
    --danger: #ff6f91;
    --ok: #35d492;
    --violet: #9e6dff;
    --gold: #ffca5c;
    --shadow: 0 28px 70px rgba(2, 7, 18, 0.45);
    --radius: 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(53, 212, 146, 0.08), transparent 24%),
        radial-gradient(circle at 18% 6%, rgba(75, 124, 255, 0.12), transparent 28%),
        linear-gradient(180deg, #0a1020 0%, #09111b 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    display: grid;
    grid-template-columns: 236px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, rgba(17, 24, 42, 0.96), rgba(13, 20, 34, 0.98));
    border-right: 1px solid var(--line);
    padding: 16px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.brand {
    display: block;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(125, 145, 184, 0.12);
}

.brand-lockup {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.brand-logo-fallback {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--text);
}

.brand-logo-fallback span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #04111f;
    font-size: 1.7rem;
    font-weight: 950;
    letter-spacing: 0;
    box-shadow: 0 18px 45px rgba(34, 125, 255, 0.22);
}

.brand-logo-fallback strong {
    font-size: 1.45rem;
    line-height: 1;
}

.topbar h2 {
    margin: 0;
}

.brand p,
.topbar p,
.muted {
    color: var(--muted);
}

.brand p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
}

.sidebar-section {
    color: rgba(125, 145, 184, 0.72);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 2px;
}

.nav {
    display: grid;
    gap: 5px;
    position: relative;
}

.nav a,
.nav-logout button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: transparent;
    color: #ced9ef;
    transition: background 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.28s ease, border-color 0.28s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
    width: 100%;
    font: inherit;
    text-align: left;
}

.nav-logout {
    margin: 0;
}

.nav a::before,
.nav-logout button::before {
    content: "";
    position: absolute;
    inset: 6px auto 6px 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7ab8ff, #5a7cff);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.nav a::after,
.nav-logout button::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(8, 13, 24, 0.02) 70%, transparent);
    opacity: 0;
    transition: opacity 0.24s ease;
    pointer-events: none;
}

.nav-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(53, 91, 255, 0.95), rgba(72, 132, 255, 0.95));
    box-shadow: 0 14px 28px rgba(50, 91, 255, 0.18);
    border: 1px solid rgba(120, 164, 255, 0.18);
    opacity: 0;
    transform: translateY(0);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.nav.has-active .nav-indicator {
    opacity: 1;
}

.nav-icon {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    color: #a9bddf;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(125, 145, 184, 0.08);
    transition: transform 0.24s ease, color 0.24s ease, background 0.24s ease;
}

.nav-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav a span:last-child,
.nav-logout button span:last-child {
    position: relative;
    z-index: 1;
    transition: transform 0.24s ease, letter-spacing 0.24s ease;
}

.nav a:hover,
.nav-logout button:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
    color: #fff;
    border-color: rgba(125, 145, 184, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 12px 24px rgba(2, 8, 18, 0.22);
}

.nav a.active::before {
    opacity: 1;
    transform: translateX(0);
}

.nav a.active::after {
    opacity: 1;
}

.nav a:hover::after,
.nav-logout button:hover::after {
    opacity: 1;
}

.nav a.active {
    color: #fff;
    background: transparent;
    box-shadow: none;
    border-color: transparent;
}

.nav a.active .nav-icon {
    color: #eef4ff;
    background: rgba(255, 255, 255, 0.09);
    transform: translateX(1px) scale(1.06);
}

.nav a:hover .nav-icon,
.nav-logout button:hover .nav-icon {
    color: #d8e4ff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(1px) scale(1.03);
}

.nav a.active span:last-child,
.nav a:hover span:last-child,
.nav-logout button:hover span:last-child {
    transform: translateX(1px);
    letter-spacing: 0.01em;
}

.nav-footer {
    margin-top: auto;
}

.sidebar-meta {
    color: rgba(125, 145, 184, 0.7);
    font-size: 0.82rem;
    line-height: 1.5;
    border-top: 1px solid rgba(125, 145, 184, 0.1);
    padding-top: 18px;
}

.content {
    padding: 18px 28px 28px;
    background:
        radial-gradient(circle at top center, rgba(75, 124, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0));
}

.topbar {
    margin-bottom: 24px;
    min-height: 68px;
    padding: 0 6px 18px;
    border-bottom: 1px solid rgba(125, 145, 184, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
}

.topbar-title {
    display: grid;
    gap: 4px;
}

.eyebrow {
    color: rgba(125, 145, 184, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.notification-menu {
    position: relative;
}

.notification-menu summary {
    list-style: none;
}

.notification-menu summary::-webkit-details-marker {
    display: none;
}

.notification-button {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: rgba(18, 27, 44, 0.86);
    color: #dbeafe;
    cursor: pointer;
}

.notification-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-button.has-unread {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.10);
}

.notification-button span {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: min(390px, calc(100vw - 28px));
    padding: 12px;
    border: 1px solid rgba(125, 145, 184, 0.18);
    border-radius: 16px;
    background: #0e1826;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.notification-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.notification-dropdown-head span,
.notification-empty,
.notification-item span {
    color: var(--muted);
    font-size: 0.78rem;
}

.notification-list {
    display: grid;
    gap: 8px;
}

.notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    border: 1px solid rgba(125, 145, 184, 0.14);
    border-left: 3px solid rgba(145, 164, 206, 0.36);
    border-radius: 12px;
    padding: 10px;
    background: rgba(16, 29, 47, 0.92);
}

.notification-item.is-unread {
    background: rgba(18, 40, 63, 0.96);
}

.notification-item.warning { border-left-color: #f59e0b; }
.notification-item.critical { border-left-color: #fb7185; }
.notification-item.success { border-left-color: #35d492; }

.notification-item strong {
    display: block;
    font-size: 0.86rem;
}

.notification-item p {
    margin: 5px 0 6px;
    color: #cbd5e1;
    font-size: 0.8rem;
    line-height: 1.35;
}

.notification-item form {
    margin: 0;
}

.notification-actions {
    display: grid;
    gap: 7px;
    justify-items: end;
}

.notification-item button,
.notification-action-link {
    min-height: 28px;
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 0.72rem;
}

.notification-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(75, 124, 255, 0.32);
    background: rgba(75, 124, 255, 0.14);
    color: #dbeafe;
    font-weight: 800;
}

.notification-action-link:hover {
    border-color: rgba(56, 189, 248, 0.48);
    background: rgba(56, 189, 248, 0.18);
    color: #ffffff;
}

.status-badge,
.avatar-badge {
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: rgba(18, 27, 44, 0.86);
}

.online-dot {
    color: #a9ffd5;
}

.online-dot::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--ok);
    box-shadow: 0 0 0 4px rgba(53, 212, 146, 0.12);
}

.avatar-badge {
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3c6dff, #6e8bff);
    color: #fff;
    font-weight: 700;
}

.live-updating-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: rgba(14, 24, 36, 0.88);
    color: #cfe0ff;
    font-size: 0.74rem;
    white-space: nowrap;
}

.live-updating-badge strong {
    font-size: 0.74rem;
}

.live-updating-badge.is-live {
    border-color: rgba(76, 215, 167, 0.18);
}

.live-updating-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(53, 212, 146, 0.42);
    animation: live-pulse 1.9s infinite;
}

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

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

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

.card,
.auth-card {
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.94), rgba(15, 24, 39, 0.95));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.surface-banner {
    border: 1px solid rgba(75, 124, 255, 0.14);
    background:
        radial-gradient(circle at right top, rgba(75, 124, 255, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(16, 24, 41, 0.98), rgba(13, 19, 31, 0.98));
    border-radius: 24px;
    padding: 26px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.surface-banner h3 {
    margin: 8px 0 10px;
    font-size: 2rem;
}

.surface-banner-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.surface-banner-meta div {
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.12);
    white-space: nowrap;
}

.surface-banner-meta span,
.compact-strip span,
.metric-sub {
    color: var(--muted);
    font-size: 0.76rem;
}

.surface-banner-meta strong,
.compact-strip strong {
    display: inline;
    margin-top: 0;
    margin-left: 5px;
    font-size: 0.88rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.96), rgba(14, 22, 35, 0.98));
    border: 1px solid rgba(125, 145, 184, 0.12);
    border-radius: 20px;
    padding: 22px;
    min-height: 150px;
    box-shadow: var(--shadow);
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -8% -55% auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

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

.metric-icon {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tone-blue .metric-icon {
    background: rgba(75, 124, 255, 0.16);
    color: #8fb0ff;
}

.tone-green .metric-icon {
    background: rgba(53, 212, 146, 0.16);
    color: #7bf0bf;
}

.tone-violet .metric-icon {
    background: rgba(158, 109, 255, 0.16);
    color: #c3a3ff;
}

.tone-gold .metric-icon {
    background: rgba(255, 202, 92, 0.14);
    color: #ffd772;
}

.tone-cyan .metric-icon {
    background: rgba(85, 219, 255, 0.14);
    color: #72f2ff;
}

.tone-rose .metric-icon {
    background: rgba(255, 111, 145, 0.14);
    color: #ff9bb3;
}

.metric {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 14px;
}

.metric-card-traffic {
    display: flex;
    flex-direction: column;
}

.metric-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.metric-pair-item {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.12);
}

.metric-pair-item span {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.metric-pair-item strong {
    font-size: 1.12rem;
    letter-spacing: 0.01em;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(144, 169, 191, 0.12);
    text-align: left;
}

th {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.73rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.status.live {
    background: rgba(88, 227, 143, 0.16);
    color: var(--ok);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.status.offline {
    background: rgba(255, 111, 145, 0.15);
    color: var(--danger);
}

.status.degraded {
    background: rgba(255, 180, 84, 0.18);
    color: var(--warning);
}

.status.disabled {
    background: rgba(131, 148, 186, 0.18);
    color: #b7c3e1;
}

.status.blacklisted {
    background: rgba(255, 111, 145, 0.22);
    color: #ffc4d3;
}

.status.info {
    background: rgba(75, 124, 255, 0.14);
    color: #a9c2ff;
}

.status.warning {
    background: rgba(255, 180, 84, 0.16);
    color: var(--warning);
}

.status.critical {
    background: rgba(255, 111, 145, 0.15);
    color: var(--danger);
}

.operator-actions button:disabled,
.operator-actions select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: saturate(0.75);
}

.status.resolved {
    background: rgba(88, 227, 143, 0.16);
    color: var(--ok);
}

form {
    display: grid;
    gap: 14px;
}

input,
select,
button,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #0a1520;
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
}

.add-channel-form label {
    display: block;
    margin: 0;
}

button,
.button {
    background: linear-gradient(135deg, var(--accent), #45a3ff);
    color: #041016;
    font-weight: 700;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #142435;
    color: var(--text);
}

.button.danger,
button.danger {
    background: rgba(255, 111, 145, 0.18);
    color: #ffd5df;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 14px;
}

.flash.success {
    background: rgba(88, 227, 143, 0.16);
    color: var(--ok);
}

.flash.error {
    background: rgba(255, 111, 145, 0.16);
    color: #ffc1cf;
}

.toast-stack {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 1200;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: rgba(14, 22, 36, 0.96);
    box-shadow: 0 22px 44px rgba(2, 7, 18, 0.34);
    transform: translateY(-6px);
    opacity: 0;
    animation: toast-in 0.22s ease forwards;
}

.toast.is-leaving {
    animation: toast-out 0.18s ease forwards;
}

.toast strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.toast span {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

.toast.success {
    border-color: rgba(53, 212, 146, 0.18);
}

.toast.success strong {
    color: #8cf1c3;
}

.toast.error {
    border-color: rgba(255, 111, 145, 0.22);
}

.toast.error strong {
    color: #ffc1cf;
}

.toast.warning {
    border-color: rgba(255, 180, 84, 0.22);
}

.toast.warning strong {
    color: #ffd18c;
}

.toast.info strong {
    color: #a7c2ff;
}

.value-flash {
    animation: value-flash 0.56s ease;
}

.inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-row input {
    min-width: 260px;
}

.inline-actions form {
    display: block;
}

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

.channel-name-cell {
    display: grid;
    gap: 4px;
}

.channel-name-cell strong {
    font-size: 1rem;
}

.channel-name-cell span {
    color: var(--muted);
    font-size: 0.82rem;
    word-break: break-all;
}

.profile-pill {
    background: rgba(75, 124, 255, 0.14);
    color: #a7c2ff;
}

.channel-section {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.mode-help-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.mode-help-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(125, 145, 184, 0.1);
    color: #c8d6ef;
    font-size: 0.8rem;
    line-height: 1.2;
}

.mode-help-strip strong {
    color: #ffffff;
}

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

.channel-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    overflow: visible;
    padding-bottom: 0;
}

.channel-toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}

.channel-toolbar-row-metrics {
    justify-content: flex-start;
}

.channel-toolbar-row-controls {
    justify-content: space-between;
}

.channel-counts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    white-space: normal;
    min-width: 0;
}

.channel-filters {
    display: flex;
    flex: 1 1 380px;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
    min-width: 0;
}

.channel-search-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 520px;
    min-width: min(100%, 360px);
    flex-wrap: wrap;
}

.channel-search-input,
.channel-sort-select,
.channel-provider-filter-select {
    min-height: 44px;
}

.channel-search-input {
    flex: 1 1 300px;
    min-width: 240px;
}

.channel-sort-select {
    flex: 0 0 180px;
    background: #0e1726;
}

.channel-provider-filter-select {
    flex: 0 0 210px;
    background: #0e1726;
}

.channel-counts div {
    min-width: auto;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.channel-counts span {
    display: inline-block;
    margin-right: 0;
    color: var(--muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.channel-counts strong {
    display: inline-block;
    font-size: 0.92rem;
    line-height: 1;
}

.channel-counts .status-dot {
    margin-right: 6px;
    box-shadow: none;
}

.channel-filters .button.active {
    background: linear-gradient(135deg, rgba(53, 91, 255, 0.95), rgba(72, 132, 255, 0.95));
    color: #fff;
}

.channel-filters .button {
    width: auto;
    min-width: auto;
    padding: 10px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.channel-meta .status {
    white-space: nowrap;
}

.empty-state {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(125, 145, 184, 0.16);
    color: var(--muted);
}

.support-page .support-tab-buttons {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(8, 18, 31, 0.62);
    border: 1px solid rgba(125, 145, 184, 0.16);
}

.support-tab-buttons button {
    width: auto;
    min-width: 132px;
    padding: 9px 14px;
    border-radius: 11px;
    color: var(--muted);
    background: transparent;
    border: 0;
}

.support-tab-buttons button.active {
    color: white;
    background: linear-gradient(135deg, #4b6fff, #3aa6ff);
    box-shadow: 0 12px 22px rgba(59, 130, 246, 0.18);
}

.support-page .settings-tabs {
    justify-content: flex-end;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(300px, 0.52fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.support-form {
    display: grid;
    gap: 14px;
}

.support-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.support-form input,
.support-form textarea {
    text-transform: none;
    letter-spacing: 0;
}

.support-form input[type="file"] {
    padding: 10px;
}

.support-ticket-list {
    display: grid;
    gap: 9px;
}

.support-ticket-row {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(125, 145, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.support-ticket-row.active {
    border-color: rgba(75, 124, 255, 0.62);
    background: rgba(75, 124, 255, 0.13);
}

.support-ticket-row span,
.support-message-meta span,
.attachment-note {
    color: var(--muted);
    font-size: 0.82rem;
}

.support-thread {
    display: grid;
    gap: 12px;
    margin: 10px 0 16px;
}

.support-message {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(125, 145, 184, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.support-message.admin {
    border-color: rgba(75, 124, 255, 0.38);
    background: rgba(75, 124, 255, 0.11);
}

.support-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-message p {
    margin: 0;
    color: var(--text);
}

.support-attachment-stack {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.support-attachment-preview {
    display: block;
    width: min(320px, 100%);
    overflow: hidden;
    border: 1px solid rgba(125, 145, 184, 0.22);
    border-radius: 12px;
    background: rgba(4, 12, 22, 0.42);
}

.support-attachment-preview img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.support-help-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.support-help-grid {
    align-items: stretch;
}

.support-help-list > div {
    padding: 13px;
    border: 1px solid rgba(125, 145, 184, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.support-help-list p {
    margin: 6px 0 0;
    color: var(--muted);
}

.channel-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(75, 124, 255, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(18, 28, 46, 0.98), rgba(13, 20, 33, 0.96));
    border: 1px solid rgba(125, 145, 184, 0.1);
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
}

.channel-card::after {
    display: none;
}

.channel-top,
.channel-actions,
.channel-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.channel-top h4 {
    margin: 0;
    font-size: 1.05rem;
}

.channel-url {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-all;
}

.channel-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.channel-metrics div {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.08);
}

.channel-metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.channel-metrics strong {
    font-size: 0.98rem;
}

.channel-actions {
    padding-top: 2px;
}

.channel-runtime-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.channel-runtime-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(125, 145, 184, 0.08);
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1;
}

.channel-runtime-meta > span strong {
    color: var(--text);
    font-weight: 700;
}

.channel-error-hint {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    background: rgba(251, 191, 36, 0.08);
    color: #f8d889;
    font-size: 0.84rem;
    line-height: 1.45;
}

.channel-provider-pill {
    gap: 7px !important;
}

.channel-resolver-pill.direct,
.provider-resolver-hint.direct,
.site-module-resolver.direct {
    color: #6ee7b7;
}

.channel-resolver-pill.streamlink,
.provider-resolver-hint.streamlink,
.site-module-resolver.streamlink {
    color: #93c5fd;
}

.channel-resolver-pill.browser,
.provider-resolver-hint.browser,
.site-module-resolver.browser {
    color: #c4b5fd;
}

.channel-resolver-pill.unsupported,
.provider-resolver-hint.unsupported,
.site-module-resolver.unsupported {
    color: #fda4af;
}

.channel-provider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 15px;
    flex: 0 0 auto;
}

.channel-provider-icon img {
    display: block;
    width: 20px;
    height: 15px;
    border-radius: 1px;
    object-fit: cover;
}

.channel-provider-icon svg {
    width: 17px;
    height: 17px;
    color: #8fb0ff;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
}

.channel-event-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.08);
}

.channel-event-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.channel-event-copy strong {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}

.channel-event-copy span {
    color: var(--muted);
    font-size: 0.76rem;
}

.operator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.operator-actions-compact {
    margin-top: 8px;
    gap: 6px;
}

.operator-actions form {
    display: block;
}

.operator-actions .button,
.operator-actions button {
    width: auto;
    min-width: auto;
    padding-inline: 14px;
    white-space: nowrap;
}

.operator-actions-compact .button,
.operator-actions-compact button {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    min-height: 34px;
}

.operator-actions-compact a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #142435;
    color: var(--text);
    box-shadow: none;
}

.mode-inline-form {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.mode-inline-form select {
    min-width: 96px;
    width: auto;
    min-height: 34px;
    padding: 7px 30px 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: rgba(16, 26, 42, 0.94);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: none;
}

.channel-sparkline {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(10, 21, 32, 0.72);
    border: 1px solid rgba(125, 145, 184, 0.08);
}

.sparkline-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.82rem;
}

.sparkline-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(170, 187, 220, 0.86);
    font-size: 0.76rem;
}

.sparkline-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.spark-delta.up {
    color: #79f0c9;
}

.spark-delta.down {
    color: #ff9fb2;
}

.spark-delta.flat {
    color: #c4d0e7;
}

.is-hidden {
    display: none !important;
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(53, 212, 146, 0.42);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(53, 212, 146, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(53, 212, 146, 0);
    }
}

@keyframes value-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(75, 124, 255, 0);
        filter: brightness(1);
    }

    35% {
        box-shadow: 0 0 0 6px rgba(75, 124, 255, 0.08);
        filter: brightness(1.12);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(75, 124, 255, 0);
        filter: brightness(1);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
}

.channel-sparkline svg {
    height: 66px;
    width: 100%;
}

.channel-sparkline .spark-grid {
    stroke: rgba(125, 145, 184, 0.18);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.channel-sparkline polyline {
    fill: none;
    stroke: #64f0c7;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 12px rgba(100, 240, 199, 0.16));
}

.channel-sparkline .spark-point {
    fill: #64f0c7;
    stroke: rgba(9, 17, 27, 0.9);
    stroke-width: 1.4;
    filter: drop-shadow(0 0 10px rgba(100, 240, 199, 0.32));
}

.channel-copy {
    display: grid;
    gap: 10px;
    min-width: min(100%, 420px);
    flex: 1 1 420px;
}

.channel-copy label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, 100%);
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.auth-card form,
.auth-card input,
.auth-card button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.captcha-wrap {
    display: flex;
    justify-content: center;
    min-height: 78px;
    padding: 4px 0;
    overflow: hidden;
}

.captcha-wrap .h-captcha {
    max-width: 100%;
}

.local-captcha-wrap {
    display: grid;
    grid-template-columns: auto minmax(110px, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(107, 130, 171, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.local-captcha-wrap span {
    color: #d9e6ff;
    font-weight: 800;
}

.local-captcha-wrap input {
    margin: 0;
    min-width: 0;
}

.auth-branding {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-bottom: 22px;
    text-align: center;
}

.auth-logo {
    display: block;
    width: min(160px, 42vw);
    height: auto;
    object-fit: contain;
}

.auth-logo-fallback {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--text);
}

.auth-logo-fallback span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #04111f;
    font-size: 1.9rem;
    font-weight: 950;
    letter-spacing: 0;
    box-shadow: 0 20px 50px rgba(34, 125, 255, 0.25);
}

.auth-logo-fallback strong {
    font-size: 1.65rem;
    line-height: 1;
}

.auth-branding .muted {
    margin: 0;
    font-size: 0.95rem;
}

.chart {
    height: 250px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(75, 124, 255, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(53, 212, 146, 0.08), rgba(69, 163, 255, 0.02));
    border: 1px solid rgba(76, 215, 167, 0.14);
    padding: 14px;
}

.chart svg {
    width: 100%;
    height: 100%;
}

.chart-modern {
    position: relative;
    overflow: hidden;
    padding: 18px 16px 12px;
    background:
        linear-gradient(180deg, rgba(20, 36, 52, 0.98), rgba(17, 28, 44, 0.96)),
        radial-gradient(circle at top right, rgba(76, 215, 167, 0.08), transparent 32%);
}

.chart-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
        repeating-linear-gradient(
            90deg,
            rgba(125, 145, 184, 0.03) 0,
            rgba(125, 145, 184, 0.03) 1px,
            transparent 1px,
            transparent 10%
        );
    pointer-events: none;
}

.chart-overlay {
    position: absolute;
    inset: 16px 16px auto 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chart-chip,
.chart-caption {
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(7, 18, 29, 0.72);
    border: 1px solid rgba(125, 145, 184, 0.12);
    color: #cfe4ff;
    font-size: 0.76rem;
    backdrop-filter: blur(10px);
}

.chart-chip {
    color: #92ffd9;
    box-shadow: 0 10px 28px rgba(2, 7, 18, 0.28);
}

.chart-kpis {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
}

.chart-kpis span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(125, 145, 184, 0.1);
    color: var(--muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.chart-kpis strong {
    color: var(--text);
    margin-right: 4px;
}

.chart-grid line {
    stroke: rgba(125, 145, 184, 0.12);
    stroke-width: 0.35;
    stroke-dasharray: 1.6 2.8;
}

.chart-area {
    fill: url(#bitrate-area);
}

.chart-line-glow {
    fill: none;
    stroke: rgba(146, 208, 255, 0.1);
    stroke-width: 0.46;
    filter: url(#bitrate-glow);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-main {
    fill: none;
    stroke: url(#bitrate-line);
    stroke-width: 0.34;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-point-halo {
    fill: rgba(124, 235, 255, 0.08);
}

.chart-point {
    fill: #e8e7ff;
    stroke: rgba(142, 210, 255, 0.22);
    stroke-width: 0.5;
}

.small {
    font-size: 0.88rem;
    color: var(--muted);
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, monospace;
}

.compact-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.compact-strip div {
    padding: 4px 2px;
    white-space: nowrap;
}

.compact-strip strong {
    font-size: 0.88rem;
}

.health-deck {
    display: grid;
    gap: 18px;
}

.health-header,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.server-deploy-link {
    box-shadow: 0 12px 26px rgba(24, 55, 166, 0.2);
    white-space: nowrap;
}

.server-deploy-link:hover {
    box-shadow: 0 16px 30px rgba(24, 55, 166, 0.26);
}

.health-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

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

.gauge-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(125, 145, 184, 0.08);
    text-align: center;
}

.gauge-ring {
    --gauge-color: #35d492;
    width: 108px;
    height: 108px;
    margin: 0 auto 12px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, #121c2f 58%, transparent 59%),
        conic-gradient(var(--gauge-color) calc(var(--gauge) * 1%), rgba(70, 88, 121, 0.25) 0);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.gauge-ring span {
    font-size: 1.6rem;
    font-weight: 700;
}

.gauge-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
}

.health-strip {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    padding: 10px 14px;
}

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

.server-tile {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.1);
    display: grid;
    gap: 14px;
}

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

.server-head strong {
    font-size: 1.05rem;
}

.server-ip {
    color: var(--muted);
    font-size: 0.84rem;
}

.stat-bar {
    display: grid;
    gap: 8px;
}

.stat-bar label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.stat-bar-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.stat-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(76, 215, 167, 0.86), rgba(75, 124, 255, 0.92));
}

.stat-bar-fill.alt {
    background: linear-gradient(90deg, rgba(103, 145, 255, 0.92), rgba(89, 210, 255, 0.92));
}

.dashboard-server-grid {
    display: grid;
    gap: 14px;
}

.dashboard-server-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(107, 130, 171, 0.18);
    background:
        radial-gradient(circle at right top, rgba(255, 255, 255, 0.05), transparent 28%),
        linear-gradient(180deg, rgba(19, 30, 49, 0.98), rgba(14, 22, 37, 0.98));
    padding: 18px;
}

.dashboard-server-card::after {
    content: "";
    position: absolute;
    inset: auto -18% -35% auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-server-card.is-hot {
    border-color: rgba(255, 111, 145, 0.22);
}

.dashboard-server-card.is-warm {
    border-color: rgba(255, 180, 84, 0.22);
}

.dashboard-server-card.is-cool {
    border-color: rgba(76, 215, 167, 0.18);
}

.dashboard-server-head,
.dashboard-server-foot,
.dashboard-server-meter label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-server-head {
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.dashboard-server-head strong {
    display: block;
    font-size: 1.15rem;
}

.dashboard-server-head span,
.dashboard-server-meter span,
.dashboard-server-foot span {
    color: var(--muted);
    font-size: 0.86rem;
}

.dashboard-server-head > div:first-child span {
    display: block;
    margin-top: 4px;
}

.dashboard-server-meters {
    display: grid;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.dashboard-server-meter strong,
.dashboard-server-foot strong {
    color: var(--text);
}

.dashboard-server-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(107, 130, 171, 0.14);
    position: relative;
    z-index: 1;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    position: relative;
    padding: 18px 18px 18px 52px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.08);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 24px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #6ef2d1;
    box-shadow: 0 0 0 6px rgba(110, 242, 209, 0.1);
}

.timeline-item.critical::before {
    background: #ff6f91;
    box-shadow: 0 0 0 6px rgba(255, 111, 145, 0.1);
}

.timeline-item.warning::before {
    background: #ffca5c;
    box-shadow: 0 0 0 6px rgba(255, 202, 92, 0.1);
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.timeline-detail {
    color: #d6e4ff;
    line-height: 1.6;
}

.timeline-foot {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.endpoint-list {
    display: grid;
    gap: 14px;
}

.endpoint-list div {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 145, 184, 0.08);
}

.endpoint-list span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.endpoint-list code {
    color: #8fb0ff;
    word-break: break-all;
}

.compact-health-card {
    align-self: start;
}

.dashboard-server-grid {
    display: grid;
    gap: 6px;
}

.dashboard-server-grid.compact {
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.dashboard-server-card {
    padding: 6px 8px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(125, 145, 184, 0.08);
    position: relative;
    overflow: hidden;
}

.dashboard-server-grid.compact .dashboard-server-card {
    padding: 6px 8px;
    border-radius: 10px;
}

.dashboard-server-card::after {
    display: none;
}

.dashboard-server-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.dashboard-server-head strong {
    display: block;
    font-size: 0.84rem;
    line-height: 1.1;
}

.dashboard-server-head span {
    color: var(--muted);
    font-size: 0.66rem;
}

.dashboard-server-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.dashboard-server-inline.compact {
    margin-top: 4px;
    gap: 4px;
}

.dashboard-server-inline span {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(125, 145, 184, 0.08);
    color: #cfe0ff;
    font-size: 0.62rem;
    line-height: 1;
}

.dashboard-server-inline.compact span {
    padding: 3px 6px;
    font-size: 0.62rem;
}

.dashboard-server-inline strong {
    color: #ffffff;
}

.dashboard-server-inline .server-country-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-color: transparent;
    background: transparent;
}

.server-country-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 24px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #dbe8ff;
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
}

.server-country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    line-height: 1;
    font-style: normal;
    color: var(--muted);
}

.server-country-flag img {
    display: block;
    width: 24px;
    height: 18px;
    border-radius: 1px;
    object-fit: cover;
    box-shadow: none;
}

.vpn-country-picker {
    position: relative;
}

.vpn-country-button,
.vpn-country-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.vpn-country-button {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(3, 15, 25, 0.82);
    color: var(--text);
}

.vpn-country-button::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
}

.vpn-country-menu {
    position: absolute;
    z-index: 35;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 270px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(103, 147, 255, 0.28);
    border-radius: 12px;
    background: #06131f;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    scrollbar-width: none;
}

.vpn-country-menu::-webkit-scrollbar {
    display: none;
}

.vpn-country-option {
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
}

.vpn-country-option:hover,
.vpn-country-option.active {
    background: rgba(75, 124, 255, 0.22);
}

.vpn-country-flag {
    flex: 0 0 auto;
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.vpn-country-globe {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    font-size: 17px;
    line-height: 1;
}

.vpn-profile-title,
.vpn-profile-country {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-server-bars {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.dashboard-server-bars.compact {
    gap: 6px;
    margin-top: 8px;
}

.dashboard-server-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-server-bar.compact .dashboard-server-bar-label {
    margin-bottom: 4px;
    font-size: 0.68rem;
}

.dashboard-server-bar-label strong,
.dashboard-server-foot strong {
    color: var(--text);
}

.dashboard-server-foot {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(107, 130, 171, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.74rem;
}

.dashboard-server-foot.compact {
    margin-top: 6px;
    padding-top: 6px;
    font-size: 0.7rem;
}

.dashboard-server-card.is-hot {
    border-color: rgba(255, 111, 145, 0.28);
}

.dashboard-server-card.is-warm {
    border-color: rgba(255, 202, 92, 0.18);
}

.dashboard-server-card.is-cool {
    border-color: rgba(90, 224, 177, 0.16);
}

.logs-note {
    color: var(--muted);
}

.field-label {
    display: inline-block;
    margin-bottom: 8px;
    color: rgba(125, 145, 184, 0.9);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-error {
    margin-top: 8px;
    color: #ff8aa7;
    font-size: 0.82rem;
    font-weight: 600;
}

.settings-intro {
    margin-top: 0;
    margin-bottom: 16px;
}

.settings-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-modules .button {
    width: auto;
    min-width: auto;
    padding-inline: 16px;
}

.settings-module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: auto;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(125, 145, 184, 0.14);
    background: #142435;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.settings-module-button:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(125, 145, 184, 0.2);
    transform: translateY(-1px);
}

.settings-module-button.active {
    background: linear-gradient(135deg, rgba(53, 91, 255, 0.95), rgba(72, 132, 255, 0.95));
    border-color: rgba(120, 164, 255, 0.18);
    color: #fff;
}

.settings-preview,
.settings-grid {
    display: grid;
    gap: 12px;
}

.settings-preview {
    margin-top: 4px;
}

.settings-preview div,
.settings-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(107, 130, 171, 0.16);
}

.settings-preview span,
.settings-note h4 {
    display: block;
    margin-bottom: 8px;
    color: rgba(125, 145, 184, 0.82);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.settings-preview code,
.settings-note code {
    color: #8fb0ff;
    word-break: break-all;
}

.settings-note a {
    color: #8fb0ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(143, 176, 255, 0.42);
}

.settings-note a:hover {
    color: #c9d7ff;
    border-bottom-color: rgba(201, 215, 255, 0.72);
}

.settings-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.settings-steps li {
    padding-left: 4px;
}

.settings-actions,
.settings-reset-form {
    margin-top: 4px;
}

.settings-form-separate {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(107, 130, 171, 0.16);
}

.settings-reset-form {
    display: block;
}

.settings-reset-form button {
    width: auto;
}

.settings-note.is-soft {
    margin-top: 16px;
}

.settings-note h4,
.settings-note p {
    margin-top: 0;
}

.settings-note p:last-child {
    margin-bottom: 0;
}

.readiness-list {
    display: grid;
    gap: 10px;
}

.readiness-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(107, 130, 171, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.readiness-item > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.readiness-item strong {
    display: block;
    margin-bottom: 4px;
}

.readiness-item p {
    margin: 0;
    color: var(--muted);
}

.readiness-ok > span {
    color: #7ef2bf;
    background: rgba(38, 191, 127, 0.12);
}

.readiness-warn > span {
    color: #ffc56d;
    background: rgba(255, 184, 77, 0.13);
}

.readiness-fail > span {
    color: #ff87a5;
    background: rgba(255, 91, 129, 0.14);
}

.security-mode-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(107, 130, 171, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.security-mode-card input {
    width: auto;
    margin: 0;
}

.security-mode-card label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 900;
}

.security-mode-card p {
    margin: 0;
}

.security-key-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.resolver-stack-list {
    gap: 10px;
}

.resolver-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(107, 130, 171, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.resolver-card.is-required {
    border-color: rgba(77, 209, 169, 0.2);
    background: rgba(77, 209, 169, 0.055);
}

.resolver-card label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 900;
}

.resolver-card input {
    width: auto;
    margin: 0;
}

.resolver-card p {
    margin: 0;
}

.sites-list {
    display: grid;
    gap: 10px;
}

.site-picker {
    position: relative;
}

.site-country-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.site-country-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(107, 130, 171, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

.site-country-button:hover,
.site-country-button.active {
    border-color: rgba(113, 154, 255, 0.4);
    background: rgba(113, 154, 255, 0.1);
    transform: none;
}

.site-country-button strong {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.15;
    overflow-wrap: break-word;
    white-space: normal;
}

.site-country-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.site-country-count {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.2;
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    padding-left: 32px;
}

.site-picker-panel {
    display: none;
    margin-top: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(107, 130, 171, 0.16);
    background: rgba(10, 18, 31, 0.98);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
}

.site-picker.is-open .site-picker-panel {
    display: grid;
    gap: 12px;
}

.site-picker-country-mode .site-picker-panel {
    display: grid;
    gap: 12px;
}

.site-country-panel[hidden] {
    display: none;
}

.site-picker-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.site-picker-search {
    margin: 0;
}

.site-picker-search input {
    margin-bottom: 0;
}

.site-picker-action {
    margin: 0;
}

.site-picker-action button {
    width: auto;
    min-width: 112px;
}

.site-resolver-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.site-resolver-policy-form,
.site-resolver-test-form {
    display: grid;
    align-items: end;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(107, 130, 171, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.site-resolver-policy-form {
    grid-template-columns: minmax(210px, 0.42fr) auto minmax(240px, 1fr);
}

.site-resolver-test-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.site-resolver-policy-form label,
.site-resolver-test-form label {
    margin: 0;
    min-width: 0;
}

.site-resolver-policy-form select,
.site-resolver-test-form input {
    margin-bottom: 0;
}

.site-resolver-policy-form button,
.site-resolver-test-form button {
    width: auto;
    min-width: 116px;
}

.site-resolver-selected-hint {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    align-self: center;
}

.site-picker-selected {
    color: var(--muted);
    font-size: 0.82rem;
}

.site-picker-panel .sites-list {
    max-height: 460px;
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-picker-panel .sites-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.site-picker-empty[hidden],
.site-module-row[hidden] {
    display: none;
}

.site-module-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(107, 130, 171, 0.14);
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
    color: var(--text);
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

.site-module-row.is-installed {
    border-color: rgba(87, 217, 163, 0.2);
    background: rgba(87, 217, 163, 0.05);
}

.site-module-row.is-unsupported {
    border-color: rgba(255, 115, 143, 0.18);
    background: rgba(255, 115, 143, 0.035);
}

.site-module-row:hover,
.site-module-row.is-selected {
    border-color: rgba(113, 154, 255, 0.34);
    background: rgba(113, 154, 255, 0.08);
    transform: none;
}

.site-module-main {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.site-module-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.site-module-main strong {
    font-size: 0.98rem;
}

.site-origin-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    flex: 0 0 auto;
}

.site-origin-flag img {
    display: block;
    width: 24px;
    height: 18px;
    border-radius: 1px;
    object-fit: cover;
}

.site-origin-flag svg {
    width: 22px;
    height: 22px;
    color: #8fb0ff;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.site-module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-module-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(125, 145, 184, 0.1);
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1;
}

.site-module-meta .site-module-support.unsupported {
    border-color: rgba(255, 115, 143, 0.18);
    background: rgba(255, 115, 143, 0.08);
    color: #ffb8c7;
}

.site-module-meta .site-module-support.experimental {
    border-color: rgba(255, 184, 87, 0.18);
    background: rgba(255, 184, 87, 0.08);
    color: #ffd08f;
}

.site-module-meta .site-module-resolver.direct {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(52, 211, 153, 0.08);
    color: #6ee7b7;
}

.site-module-meta .site-module-resolver.streamlink {
    border-color: rgba(96, 165, 250, 0.18);
    background: rgba(96, 165, 250, 0.08);
    color: #93c5fd;
}

.site-module-meta .site-module-resolver.browser {
    border-color: rgba(167, 139, 250, 0.2);
    background: rgba(167, 139, 250, 0.08);
    color: #c4b5fd;
}

.site-module-meta .site-module-resolver.unsupported {
    border-color: rgba(255, 115, 143, 0.18);
    background: rgba(255, 115, 143, 0.08);
    color: #ffb8c7;
}

.site-module-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

.site-module-state {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.auth-upload-form {
    margin-top: 8px;
}

.auth-provider-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.85fr) minmax(150px, 0.8fr) minmax(110px, 0.55fr) minmax(210px, 1.15fr);
    align-items: end;
    gap: 12px;
}

.auth-provider-row label {
    margin: 0;
    min-width: 0;
}

.auth-provider-row input,
.auth-provider-row select {
    margin-bottom: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-provider-row input[type="file"] {
    overflow: hidden;
}

.auth-provider-action button {
    width: 100%;
    min-width: 0;
}

.auth-provider-action {
    grid-column: 1 / -1;
    min-width: 0;
}

.auth-profile-list {
    display: grid;
    gap: 10px;
}

.auth-profile-filter {
    margin: 0 0 12px;
    width: 100%;
}

.auth-provider-group {
    border-radius: 14px;
    border: 1px solid rgba(107, 130, 171, 0.14);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.auth-provider-group.has-profiles {
    border-color: rgba(87, 217, 163, 0.18);
    background: rgba(87, 217, 163, 0.045);
}

.auth-provider-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
}

.auth-provider-summary::-webkit-details-marker {
    display: none;
}

.auth-provider-summary::after {
    content: '';
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 160ms ease;
    flex: 0 0 auto;
}

.auth-provider-group[open] .auth-provider-summary::after {
    transform: rotate(225deg);
}

.auth-provider-profiles {
    display: grid;
    gap: 8px;
    padding: 0 10px 10px;
}

.auth-profile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(107, 130, 171, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.auth-provider-profiles .auth-profile-row {
    border-radius: 12px;
    background: rgba(6, 18, 32, 0.32);
}

.auth-profile-row.is-configured {
    border-color: rgba(87, 217, 163, 0.2);
    background: rgba(87, 217, 163, 0.05);
}

.auth-profile-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.auth-profile-main strong,
.auth-profile-main span,
.auth-profile-main small {
    display: block;
}

.auth-profile-main span,
.auth-profile-main small {
    color: var(--muted);
    font-size: 0.74rem;
}

.auth-profile-main .auth-test-ok {
    color: #57d9a3;
}

.auth-profile-main .auth-test-fail {
    color: #ff9a9a;
}

.auth-profile-row form {
    margin: 0;
}

.auth-profile-row button {
    width: auto;
    min-width: 86px;
}

.auth-profile-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
    min-width: min(100%, 520px);
}

.auth-profile-test {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    width: 100%;
}

.auth-profile-limit {
    display: grid;
    grid-template-columns: minmax(110px, 0.6fr) auto;
    gap: 8px;
    width: 100%;
}

.auth-profile-test input {
    margin: 0;
    min-width: 0;
}

.auth-profile-limit input {
    margin: 0;
    min-width: 0;
}

.settings-checklist {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
    display: grid;
    gap: 10px;
}

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

    .sidebar {
        position: static;
        height: auto;
        gap: 14px;
    }

    .grid-4,
    .grid-2,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .channel-grid,
    .channel-metrics,
    .server-grid {
        grid-template-columns: 1fr;
    }

    .surface-banner {
        flex-direction: column;
    }

    .surface-banner-meta,
    .compact-strip {
        grid-template-columns: 1fr 1fr;
        min-width: 0;
    }

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

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-kpis {
        width: 100%;
    }

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

    .live-updating-badge {
        width: fit-content;
    }

    .channel-search-sort {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }

    .channel-toolbar-row-controls {
        align-items: stretch;
    }

    .channel-filters {
        justify-content: flex-start;
        flex-basis: 100%;
    }

    .channel-search-input,
    .channel-sort-select,
    .channel-provider-filter-select {
        flex: 1 1 100%;
        min-width: 0;
    }

    .dashboard-server-foot,
    .dashboard-server-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-provider-row,
    .auth-profile-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .auth-profile-actions {
        justify-items: stretch;
        min-width: 0;
    }

}

@media (max-width: 720px) {
    .content {
        padding: 16px 14px 24px;
    }

    .sidebar {
        transform: translateX(-105%);
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(82vw, 320px);
        height: 100vh;
        padding: 16px 14px;
        transition: transform 0.24s ease;
    }

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

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 11px 14px;
        border-radius: 12px;
        background: rgba(75, 124, 255, 0.14);
        color: #cfe0ff;
        border: 1px solid rgba(75, 124, 255, 0.18);
    }

    .brand h1 {
        font-size: 1.6rem;
    }

    .topbar-actions {
        width: 100%;
    }

    .surface-banner {
        padding: 20px;
    }

    .surface-banner h3 {
        font-size: 1.45rem;
    }

    .surface-banner-meta,
    .compact-strip {
        grid-template-columns: 1fr;
    }

    .metric-pair {
        grid-template-columns: 1fr;
    }

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

    .chart-overlay,
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .channel-top,
    .channel-actions,
    .channel-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .card,
    .metric-card,
    .auth-card {
        padding: 18px;
    }

    .channel-toolbar,
    .channel-toolbar-row,
    .channel-counts {
        align-items: stretch;
    }

    .channel-counts,
    .channel-filters {
        flex-wrap: wrap;
        min-width: 0;
        white-space: normal;
    }

    .channel-toolbar-row-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-help-strip,
    .channel-runtime-meta,
    .operator-actions {
        flex-wrap: wrap;
    }

    .channel-copy {
        min-width: 0;
    }

    .copy-row {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-row input {
        min-width: 0;
    }

    .channel-event-row {
        flex-direction: column;
    }

    .auth-profile-test,
    .auth-profile-limit,
    .security-key-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}
