:root {
    --bg: #06111f;
    --bg-deep: #0a1425;
    --panel: rgba(9, 18, 33, 0.82);
    --panel-strong: rgba(12, 24, 43, 0.94);
    --panel-soft: rgba(23, 37, 63, 0.72);
    --panel-highlight: rgba(92, 178, 255, 0.08);
    --line: rgba(151, 185, 236, 0.16);
    --line-strong: rgba(151, 185, 236, 0.28);
    --text: #eef5ff;
    --muted: #98accd;
    --accent: #64f4d0;
    --accent-2: #67b0ff;
    --accent-3: #ffbc74;
    --success: #54df91;
    --warning: #ffc46d;
    --danger: #ff7e8e;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Aptos, "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at 16% 14%, rgba(100, 244, 208, 0.14), transparent 22%),
        radial-gradient(circle at 84% 10%, rgba(103, 176, 255, 0.18), transparent 23%),
        radial-gradient(circle at 72% 82%, rgba(255, 188, 116, 0.12), transparent 22%),
        linear-gradient(180deg, #040b15 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

body.auth-page {
    background:
        radial-gradient(circle at 16% 16%, rgba(103, 176, 255, 0.16), transparent 24%),
        radial-gradient(circle at 84% 16%, rgba(100, 244, 208, 0.16), transparent 24%),
        linear-gradient(180deg, #040c16 0%, #0b1324 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
}

body::after {
    background:
        radial-gradient(circle at center, rgba(103, 176, 255, 0.08), transparent 38%);
}

.shell {
    width: min(1680px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 54px;
}

.auth-layout {
    min-height: calc(100vh - 36px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(540px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(9, 18, 33, 0.96), rgba(16, 28, 49, 0.92));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.auth-card::before,
.surface::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 28%, transparent 64%, rgba(103, 176, 255, 0.06));
    pointer-events: none;
}

.auth-form {
    margin-top: 24px;
}

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

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 20px;
    margin-bottom: 18px;
}

.public-brand {
    color: var(--text);
    text-decoration: none;
    font-family: Bahnschrift, "Segoe UI Variable Display", "Arial Narrow", sans-serif;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: 0.22s ease;
}

.public-nav a:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(103, 176, 255, 0.08);
}

.marketing {
    display: grid;
    gap: 24px;
}

.marketing-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    min-height: 420px;
    padding: 34px;
    background:
        radial-gradient(circle at 85% 12%, rgba(103, 176, 255, 0.18), transparent 24%),
        radial-gradient(circle at 18% 82%, rgba(100, 244, 208, 0.12), transparent 20%),
        linear-gradient(160deg, rgba(8, 16, 30, 0.98), rgba(15, 28, 49, 0.96));
}

.marketing-copy {
    display: grid;
    align-content: center;
    gap: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.marketing-card-stack {
    display: grid;
    gap: 14px;
    align-content: center;
}

.marketing-kpi {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(103, 176, 255, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(10, 20, 37, 0.96), rgba(17, 29, 50, 0.92));
    box-shadow: var(--shadow);
}

.marketing-kpi span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.marketing-kpi strong {
    display: block;
    margin: 8px 0;
    font-size: 28px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.pricing-card {
    min-height: 250px;
}

.pricing-price {
    margin: 6px 0 16px;
    font-family: Bahnschrift, "Segoe UI Variable Display", "Arial Narrow", sans-serif;
    font-size: 36px;
    color: var(--text);
}

.marketing-story,
.marketing-proof {
    display: grid;
}

.story-card,
.proof-card {
    padding: 30px;
}

.story-grid,
.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.story-step,
.proof-item {
    padding: 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(103, 176, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(10, 20, 37, 0.9), rgba(17, 29, 50, 0.84));
}

.story-step span {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(100, 244, 208, 0.22);
    background: rgba(100, 244, 208, 0.1);
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
}

.story-step strong,
.proof-item strong {
    display: block;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.story-step p,
.proof-item p {
    margin: 0;
    line-height: 1.55;
}

.policy-list,
.policy-pairs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.sidebar,
.workspace {
    display: grid;
    gap: 18px;
}

.sidebar {
    align-self: start;
}

.surface,
.brand-card,
.form-panel,
.nav-panel,
.hero,
.panel,
.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    animation: riseIn 0.38s ease both;
}

.brand-card,
.form-panel,
.panel,
.hero,
.stat-card {
    padding: 22px;
}

.brand-card h1 {
    font-size: clamp(34px, 5vw, 52px);
    line-height: 0.96;
    max-width: 8ch;
}

.hero h2 {
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.02;
    max-width: 12ch;
}

.surface-tile {
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.surface-tile:hover,
.server-card:hover,
.site-card:hover,
.user-card:hover,
.audit-row:hover,
.incident-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 26px 78px rgba(0, 0, 0, 0.38);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3,
.nav-tab,
.stat-card strong,
.health-score,
.copy-button,
.primary-button {
    font-family: Bahnschrift, "Segoe UI Variable Display", "Arial Narrow", sans-serif;
    letter-spacing: 0.01em;
}

h1,
h2,
h3 {
    margin: 0;
}

p,
label,
th,
td,
.feedback,
.metric-meta,
.incident-detail,
.small-text,
.helper-text,
.audit-meta {
    color: var(--muted);
}

.brand-copy,
.hero-copy {
    margin: 10px 0 0;
    max-width: 64ch;
    line-height: 1.6;
}

.brand-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(103, 176, 255, 0.2);
    pointer-events: none;
    animation: orbitFloat 9s ease-in-out infinite;
}

.brand-orbit--one {
    width: 210px;
    height: 210px;
    right: -56px;
    top: -56px;
}

.brand-orbit--two {
    width: 140px;
    height: 140px;
    right: 86px;
    top: 28px;
    border-color: rgba(100, 244, 208, 0.22);
    animation-duration: 7s;
}

.meta-chips,
.meta-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chips {
    margin-top: 18px;
}

.meta-chip {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(100, 244, 208, 0.22);
    background: rgba(100, 244, 208, 0.09);
    color: #dffcf5;
    font-size: 12px;
}

.meta-chip--soft {
    border-color: rgba(103, 176, 255, 0.16);
    background: rgba(103, 176, 255, 0.08);
    color: #d6e8ff;
}

.nav-panel {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.nav-tab {
    width: 100%;
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: 0.22s ease;
}

.nav-tab:hover,
.nav-tab.is-active {
    color: var(--text);
    border-color: rgba(103, 176, 255, 0.26);
    background:
        linear-gradient(135deg, rgba(100, 244, 208, 0.12), rgba(103, 176, 255, 0.16));
}

.nav-tab[hidden] {
    display: none;
}

.stack-form,
.user-edit-form {
    display: grid;
    gap: 12px;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.panel-heading p {
    margin: 8px 0 0;
    line-height: 1.5;
    max-width: 74ch;
}

.site-footer {
    border-top: 1px solid rgba(151, 185, 236, 0.12);
    background: rgba(4, 10, 18, 0.84);
    backdrop-filter: blur(12px);
}

.site-footer__inner {
    width: min(1680px, calc(100% - 28px));
    margin: 0 auto;
    padding: 16px 0 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer__inner strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.site-footer__inner p,
.site-footer__contacts span,
.site-footer__contacts a {
    color: var(--muted);
    margin: 0;
}

.site-footer__contacts {
    display: grid;
    gap: 6px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(151, 185, 236, 0.18);
    border-radius: 16px;
    background: rgba(8, 14, 27, 0.84);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(151, 185, 236, 0.28);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(103, 176, 255, 0.58);
    box-shadow: 0 0 0 4px rgba(103, 176, 255, 0.12);
    background: rgba(8, 14, 27, 0.94);
}

textarea {
    resize: vertical;
}

.primary-button,
.copy-button {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #05101d;
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(103, 176, 255, 0.22);
}

.copy-button {
    padding: 10px 12px;
    background: rgba(103, 176, 255, 0.12);
    color: #dbeafe;
}

.danger-button {
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 126, 142, 0.26);
    border-radius: 16px;
    background: rgba(255, 126, 142, 0.1);
    color: #ffd8de;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.danger-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 126, 142, 0.42);
    box-shadow: 0 16px 32px rgba(82, 8, 20, 0.24);
}

.danger-button.is-armed {
    background: linear-gradient(135deg, rgba(255, 126, 142, 0.24), rgba(255, 91, 118, 0.18));
    border-color: rgba(255, 126, 142, 0.6);
    color: #fff2f4;
    animation: armedPulse 1.1s ease-in-out infinite;
}

.danger-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.copy-button--wide {
    width: 100%;
}

.form-actions,
.card-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.danger-note {
    color: #ffb9c1;
    font-size: 12px;
    line-height: 1.45;
}

.feedback {
    min-height: 0;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease, margin-top 0.24s ease;
}

.feedback.is-visible {
    margin-top: 10px;
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
}

.feedback.error {
    color: var(--danger);
}

.feedback.success {
    color: var(--success);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    min-height: 190px;
    background:
        radial-gradient(circle at top right, rgba(103, 176, 255, 0.16), transparent 32%),
        radial-gradient(circle at 18% 72%, rgba(100, 244, 208, 0.08), transparent 20%),
        linear-gradient(160deg, rgba(7, 14, 26, 0.96), rgba(16, 29, 50, 0.95));
}

.hero-copyzone {
    display: grid;
    gap: 10px;
}

.hero-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.hero-ribbon__item {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #dbe9ff;
    font-size: 12px;
    border: 1px solid rgba(151, 185, 236, 0.12);
}

.hero-side {
    display: grid;
    gap: 12px;
    min-width: 250px;
}

.hero-kpi {
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(151, 185, 236, 0.14);
}

.hero-kpi__label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-kpi strong {
    display: block;
    font-size: 22px;
    color: var(--text);
}

.hero-kpi__meta {
    margin-top: 6px;
    color: #dbe8ff;
    font-size: 14px;
}

.logout-form {
    margin-top: 10px;
}

.logout-button {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px 20px;
}

.stat-card::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    opacity: 0.92;
}

.stat-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 34px;
    color: var(--text);
}

.tab-section {
    display: none;
    gap: 18px;
}

.tab-section.is-active {
    display: grid;
    animation: riseIn 0.32s ease;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 18px;
}

.ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.ticket-header-chips,
.ticket-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-group {
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(151, 185, 236, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.ticket-group__head {
    justify-content: space-between;
    margin-bottom: 14px;
}

.ticket-priority {
    border: 1px solid rgba(151, 185, 236, 0.18);
}

.ticket-priority--critical {
    color: var(--danger);
    border-color: rgba(255, 126, 142, 0.28);
    background: rgba(255, 126, 142, 0.1);
}

.ticket-priority--high {
    color: var(--warning);
    border-color: rgba(255, 196, 109, 0.28);
    background: rgba(255, 196, 109, 0.1);
}

.ticket-priority--normal,
.ticket-priority--low {
    color: #d8e9ff;
    border-color: rgba(103, 176, 255, 0.22);
    background: rgba(103, 176, 255, 0.08);
}

.ticket-messages {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(151, 185, 236, 0.08);
}

.panel--wide {
    min-height: 220px;
}

.incident-list,
.server-card-grid,
.site-card-grid,
.user-card-grid,
.audit-log-list {
    display: grid;
    gap: 14px;
}

.server-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.site-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.user-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.server-card-grid.compact,
.site-card-grid.compact {
    grid-template-columns: 1fr;
}

.incident-card,
.server-card,
.site-card,
.user-card,
.telegram-card__inner,
.audit-row {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(11, 20, 36, 0.96), rgba(17, 29, 50, 0.9));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.server-card::after,
.site-card::after,
.user-card::after,
.telegram-card__inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.05) 44%, transparent 72%);
    opacity: 0;
    transform: translateX(-18%);
    transition: opacity 0.26s ease, transform 0.26s ease;
    pointer-events: none;
}

.server-card:hover::after,
.site-card:hover::after,
.user-card:hover::after,
.telegram-card__inner:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.server-card,
.site-card,
.user-card,
.telegram-card__inner,
.audit-row {
    background:
        radial-gradient(circle at top right, rgba(103, 176, 255, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.96), rgba(17, 29, 50, 0.9));
}

.incident-card {
    display: grid;
    gap: 8px;
}

.incident-card.critical {
    border-color: rgba(255, 126, 142, 0.34);
    background: linear-gradient(180deg, rgba(60, 18, 31, 0.96), rgba(29, 11, 20, 0.92));
}

.incident-card.warning {
    border-color: rgba(255, 196, 109, 0.3);
}

.incident-card--healthy {
    border-color: rgba(84, 223, 145, 0.24);
}

.incident-title,
.card-title-row h3 {
    font-size: 20px;
}

.incident-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-pill.online,
.status-pill.up,
.incident-badge.success {
    background: rgba(84, 223, 145, 0.12);
    color: var(--success);
    border: 1px solid rgba(84, 223, 145, 0.26);
}

.status-pill.offline,
.status-pill.down,
.incident-badge.critical {
    background: rgba(255, 126, 142, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 126, 142, 0.28);
}

.status-pill.never_seen,
.status-pill.unknown,
.status-pill.stale,
.incident-badge.warning {
    background: rgba(255, 196, 109, 0.12);
    color: var(--warning);
    border: 1px solid rgba(255, 196, 109, 0.28);
}

.card-title-row,
.card-topline,
.inline-row,
.audit-row__top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.card-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.card-description {
    margin: 10px 0 0;
    color: #d5e5ff;
    font-size: 14px;
    line-height: 1.5;
}

.server-score {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.health-score {
    font-size: 30px;
    line-height: 1;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.metric-card {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(151, 185, 236, 0.08);
}

.metric-card strong {
    display: block;
    margin: 6px 0 8px;
    font-size: 24px;
    color: var(--text);
}

.meter {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.meter.warning > span {
    background: linear-gradient(90deg, #ffca72, #ffa066);
}

.meter.danger > span {
    background: linear-gradient(90deg, #ff7e8e, #ff5568);
}

.history-strip {
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
    height: 48px;
    margin-top: 12px;
}

.history-strip span {
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, rgba(100, 244, 208, 0.96), rgba(103, 176, 255, 0.76));
}

.server-alerts,
.site-meta,
.command-box {
    margin-top: 14px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 196, 109, 0.12);
    color: var(--warning);
    font-size: 12px;
    border: 1px solid rgba(255, 196, 109, 0.12);
}

.chip--quiet {
    background: rgba(103, 176, 255, 0.08);
    color: #d8e9ff;
    border-color: rgba(103, 176, 255, 0.12);
}

.command-box {
    padding: 14px;
    border-radius: 18px;
    background: rgba(103, 176, 255, 0.08);
    border: 1px solid rgba(103, 176, 255, 0.16);
}

.command-box code {
    display: block;
    margin-top: 8px;
    color: #e3f0ff;
    font-family: Consolas, "Cascadia Code", monospace;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.site-meta {
    display: grid;
    gap: 8px;
}

.site-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.site-line strong {
    color: var(--text);
    text-align: right;
}

.helper-text {
    margin-top: 14px;
    line-height: 1.5;
}

.tariff-preview {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(103, 176, 255, 0.18);
    background:
        radial-gradient(circle at top right, rgba(100, 244, 208, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.9), rgba(17, 29, 50, 0.86));
}

.tariff-preview__head,
.tariff-preview__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.tariff-preview__head {
    margin-bottom: 12px;
}

.tariff-preview__head strong,
.tariff-preview__row strong {
    color: var(--text);
}

.tariff-preview__grid {
    display: grid;
    gap: 8px;
}

.tariff-preview__row {
    color: var(--muted);
    font-size: 14px;
}

#platform-summary,
#balance-adjust-form,
#platform-user-form,
#platform-user-grid {
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(151, 185, 236, 0.12);
    background:
        radial-gradient(circle at top right, rgba(103, 176, 255, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.88), rgba(17, 29, 50, 0.82));
}

#balance-adjust-form,
#platform-user-grid {
    margin-top: 16px;
}

.helper-text a,
.site-footer a {
    color: #d8e9ff;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(151, 185, 236, 0.08);
    background: rgba(8, 14, 27, 0.32);
}

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

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(151, 185, 236, 0.08);
    vertical-align: top;
    font-size: 14px;
}

tbody tr:hover {
    background: rgba(103, 176, 255, 0.05);
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.toggle-line {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.toggle-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.audit-row {
    display: grid;
    gap: 10px;
}

.audit-title {
    font-size: 16px;
    color: var(--text);
}

.audit-detail {
    line-height: 1.55;
    color: #dce9ff;
    word-break: break-word;
}

.empty-state {
    padding: 20px 0;
    color: var(--muted);
    line-height: 1.55;
}

.app-dialog {
    width: min(1100px, calc(100% - 24px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(9, 18, 33, 0.98), rgba(12, 24, 43, 0.98));
    color: var(--text);
    box-shadow: var(--shadow);
}

.app-dialog::backdrop {
    background: rgba(3, 8, 16, 0.72);
    backdrop-filter: blur(5px);
}

.app-dialog--wide {
    width: min(1240px, calc(100% - 24px));
}

.app-dialog__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    padding: 22px 22px 0;
}

.app-dialog > .audit-log-list,
.app-dialog > #platform-yookassa-onboarding {
    padding: 22px;
}

.company-admin-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(88, 164, 255, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(11, 20, 36, 0.98), rgba(16, 28, 48, 0.94));
    overflow: hidden;
}

.company-admin-card[open] {
    border-color: rgba(88, 164, 255, 0.28);
    box-shadow: 0 22px 48px rgba(3, 10, 22, 0.28);
}

.company-admin-card__summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    gap: 14px;
    padding: 20px 22px;
}

.company-admin-card__summary::-webkit-details-marker {
    display: none;
}

.company-admin-card__summary-main {
    display: grid;
    gap: 4px;
}

.company-admin-card__body {
    display: grid;
    gap: 16px;
    padding: 0 22px 22px;
}

.company-admin-card__grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.company-admin-card__section {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.company-admin-inline-form {
    padding: 14px;
    border: 1px dashed rgba(151, 185, 236, 0.18);
    border-radius: 20px;
    background: rgba(4, 12, 24, 0.22);
}

.danger-zone {
    border-color: rgba(255, 126, 142, 0.28);
    background:
        radial-gradient(circle at top right, rgba(255, 126, 142, 0.12), transparent 38%),
        rgba(45, 14, 24, 0.18);
}

[hidden] {
    display: none !important;
}

@keyframes orbitFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 10px, 0);
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes armedPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 126, 142, 0.12);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 126, 142, 0.04);
    }
}

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

    .marketing-hero {
        grid-template-columns: 1fr;
    }

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

    .brand-card {
        grid-column: 1 / -1;
    }

    .nav-panel {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-tab {
        width: auto;
        padding: 0 16px;
    }
}

@media (max-width: 960px) {
    .shell {
        width: min(100% - 16px, 1680px);
        padding-top: 10px;
    }

    .sidebar,
    .overview-grid,
    .metric-grid,
    .hero,
    .marketing-hero {
        grid-template-columns: 1fr;
    }

    .server-card-grid,
    .site-card-grid,
    .stats-grid,
    .user-card-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        display: grid;
    }

    .hero-actions,
    .site-footer__inner {
        flex-direction: column;
    }

    .hero-side {
        min-width: 0;
    }

    .card-topline,
    .card-title-row,
    .audit-row__top {
        flex-direction: column;
    }

    .site-line {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

.finance-kpis {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1rem;
}

.finance-kpi-card,
.finance-funnel-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    padding: 1rem 1.1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at top right, rgba(88, 164, 255, 0.16), transparent 45%);
    backdrop-filter: blur(14px);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.finance-kpi-card:hover,
.finance-funnel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 164, 255, 0.3);
    box-shadow: 0 18px 40px rgba(7, 16, 32, 0.18);
}

.finance-kpi-card span,
.finance-funnel-card span {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.68;
}

.finance-kpi-card strong,
.finance-funnel-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.finance-kpi-card p,
.finance-funnel-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.finance-inline-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.finance-funnel-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.payload-details {
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
    background: rgba(10, 18, 30, 0.28);
}

.payload-details summary {
    cursor: pointer;
    font-weight: 600;
}

.payload-details pre {
    margin: 0.8rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}
