:root {
    --bg: #eef3f7;
    --bg-alt: #f7fafc;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-dark: #0f1726;
    --surface-dark-alt: #182236;
    --text: #0f1726;
    --text-soft: #516178;
    --text-faint: #73839d;
    --line: rgba(15, 23, 38, 0.1);
    --line-strong: rgba(15, 23, 38, 0.16);
    --primary: #5cff7a;
    --primary-deep: #0ba84f;
    --secondary: #2563ff;
    --accent: #9b8cff;
    --warning: #ffb84d;
    --danger: #ff6a7a;
    --shadow-xl: 0 30px 80px rgba(24, 34, 54, 0.16);
    --shadow-lg: 0 18px 48px rgba(24, 34, 54, 0.12);
    --shadow-md: 0 10px 28px rgba(24, 34, 54, 0.08);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --content-width: 1260px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(92, 255, 122, 0.18), transparent 22%),
        radial-gradient(circle at 15% 20%, rgba(37, 99, 255, 0.16), transparent 24%),
        linear-gradient(180deg, #fbfcfd 0%, #f2f6fa 50%, #eaf0f5 100%);
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

#app {
    min-height: 100vh;
}

.shell {
    position: relative;
}

.container {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
}

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

.sidebar {
    position: sticky;
    top: 106px;
    align-self: start;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.74);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.sidebar__user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px 6px;
}

.sidebar__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar__user-info {
    min-width: 0;
}

.sidebar__user-name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-meta {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 1px;
}

.sidebar__balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(37, 99, 255, 0.06);
    border: 1px solid rgba(37, 99, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 4px;
}

.sidebar__balance-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.sidebar__balance-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--secondary);
}

.sidebar__logout {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.sidebar__section {
    display: grid;
    gap: 8px;
}

.sidebar__title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 10px 10px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    color: var(--text-soft);
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    background: rgba(15, 23, 38, 0.06);
    color: var(--text);
}

.sidebar__user {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
}

.sidebar__user-email {
    font-weight: 800;
    word-break: break-word;
}

.app-main {
    min-width: 0;
}

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

.dash-widget {
    min-height: 160px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 0 10px;
    backdrop-filter: blur(16px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(247, 250, 252, 0.8);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(19, 28, 45, 0.08);
}

.topbar__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.6);
}

.topbar__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--surface-dark);
    border-radius: 999px;
}

.topbar__toggle span + span {
    margin-top: 4px;
}

.topbar__lang {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--surface-dark), var(--surface-dark-alt));
    color: var(--primary);
    font: 800 1rem/1 "Sora", sans-serif;
    box-shadow: 0 14px 32px rgba(19, 28, 45, 0.2);
}

.brand__text {
    display: grid;
    gap: 2px;
}

.brand__name {
    font-family: "Sora", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand__hint {
    color: var(--text-faint);
    font-size: 0.8rem;
}

.topbar__nav,
.topbar__actions,
.hero__actions,
.hero__stats,
.story-grid,
.pricing-grid,
.stack-grid,
.signal-grid,
.dashboard-stats,
.dashboard-layout,
.dashboard-side,
.auth-grid,
.footer {
    display: flex;
}

.topbar__nav,
.topbar__actions {
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(15, 23, 38, 0.06);
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), #afffb7);
    color: #092211;
    box-shadow: 0 16px 34px rgba(92, 255, 122, 0.28);
}

.btn--secondary {
    background: linear-gradient(135deg, var(--surface-dark), var(--surface-dark-alt));
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 38, 0.22);
}

.btn--ghost {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
}

.btn--soft {
    background: rgba(37, 99, 255, 0.08);
    color: var(--secondary);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 38, 0.06);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
}

.tag::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary-deep);
    box-shadow: 0 0 0 7px rgba(92, 255, 122, 0.16);
}

.panel,
.story-card,
.pricing-card,
.stack-card,
.signal-card,
.dashboard-panel,
.dashboard-stat,
.auth-card,
.feature-card,
.quick-card,
.toast,
.activity-item,
.server-row {
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 22px;
    padding: 28px 0 16px;
}

.hero__copy,
.hero__visual {
    padding: 34px;
}

.hero__title,
.section-title,
.dashboard-title,
.auth-title,
.pricing-card__price,
.dashboard-stat__value,
.dashboard-card__title {
    font-family: "Sora", sans-serif;
}

.hero__title {
    margin: 18px 0 18px;
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.hero__title span,
.section-title span,
.dashboard-title span {
    color: var(--secondary);
}

.hero__lead,
.section-copy,
.muted {
    color: var(--text-soft);
}

.hero__lead,
.section-copy {
    line-height: 1.8;
}

.hero__actions {
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero__stats {
    gap: 14px;
    margin-top: 30px;
}

.stat-tile {
    flex: 1 1 0;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(15, 23, 38, 0.06);
}

.stat-tile strong {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 1.52rem;
}

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

.warpboard {
    overflow: hidden;
    position: relative;
    min-height: 460px;
    padding: 22px;
    border-radius: 30px;
    background: linear-gradient(160deg, #101827 0%, #172338 55%, #203450 100%);
    color: #eff6ff;
    box-shadow: var(--shadow-xl);
}

.warpboard::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.warpboard__top,
.warpboard__bottom,
.price-grid,
.dashboard-stats,
.dashboard-layout,
.dashboard-side,
.auth-grid,
.footer {
    display: grid;
}

.warpboard__top {
    position: relative;
    z-index: 1;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.console-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-card strong {
    display: block;
    font-size: 1.05rem;
}

.console-card small {
    display: block;
    margin-top: 8px;
    color: rgba(239, 246, 255, 0.68);
}

.warpboard__bottom {
    position: relative;
    z-index: 1;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    margin-top: 16px;
}

.feed {
    min-height: 178px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feed__row:first-child {
    padding-top: 0;
    border-top: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(15, 23, 38, 0.06);
    color: var(--text-soft);
}

.pill--running {
    background: rgba(92, 255, 122, 0.14);
    color: var(--primary-deep);
}

.pill--protected {
    background: rgba(37, 99, 255, 0.1);
    color: var(--secondary);
}

.pill--scaling {
    background: rgba(255, 184, 77, 0.14);
    color: #c37700;
}

.pill--warning {
    background: rgba(255, 106, 122, 0.14);
    color: var(--danger);
}

.story-grid {
    gap: 18px;
    padding: 8px 0 12px;
}

.story-card,
.feature-card,
.pricing-card,
.stack-card,
.signal-card,
.dashboard-panel,
.auth-card {
    padding: 24px;
}

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

.story-card__icon,
.feature-card__icon,
.auth-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 255, 0.12), rgba(92, 255, 122, 0.14));
    color: var(--secondary);
    font-weight: 800;
}

.section {
    padding: 26px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 3rem);
    letter-spacing: -0.05em;
}

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

.pricing-card--featured {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f6fff8, #ffffff);
    border-color: rgba(92, 255, 122, 0.3);
    transform: translateY(-8px);
}

.pricing-card__badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(92, 255, 122, 0.16);
    color: var(--primary-deep);
    font-size: 0.8rem;
    font-weight: 700;
}

.pricing-card__price {
    margin: 18px 0 10px;
    font-size: 2.55rem;
    line-height: 1;
}

.pricing-card__price span {
    font-size: 1rem;
    color: var(--text-faint);
}

.list {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-soft);
}

.list li::before {
    content: "";
    position: absolute;
    top: 0.52rem;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.stack-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.stack-card {
    display: grid;
    gap: 16px;
}

.signal-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
}

.signal-card {
    display: grid;
    gap: 14px;
}

.signal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.signal-value {
    font-family: "Sora", sans-serif;
    font-size: 1.9rem;
}

.faq {
    display: grid;
    gap: 12px;
}

.faq details {
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: var(--shadow-md);
}

.faq summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

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

.faq p {
    margin: 14px 0 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.dashboard {
    display: grid;
    gap: 18px;
    padding: 30px 0 32px;
}

.dashboard-hero {
    padding: 32px;
    border-radius: var(--radius-xl);
    background: linear-gradient(140deg, #0f1726, #18253b 55%, #213659 100%);
    color: #eef6ff;
    box-shadow: var(--shadow-xl);
}

.dashboard-title {
    margin: 16px 0 10px;
    font-size: clamp(2.3rem, 4vw, 4.5rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-stat {
    padding: 20px;
}

.dashboard-stat__value {
    font-size: 1.6rem;
    line-height: 1.1;
}

.dashboard-layout {
    grid-template-columns: 1.22fr 0.78fr;
    gap: 18px;
}

.dashboard-side {
    grid-template-columns: 1fr;
    gap: 18px;
}

.dashboard-panel {
    display: grid;
    gap: 16px;
}

.dashboard-card__title {
    font-size: 1.45rem;
}

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

.quick-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
}

.server-row,
.activity-item {
    padding: 16px 18px;
}

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

.server-row__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-faint);
    margin-top: 8px;
}

.progress {
    overflow: hidden;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 38, 0.08);
}

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

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
    gap: 20px;
    padding: 30px 0 32px;
}

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

.auth-card {
    position: sticky;
    top: 106px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.auth-copy {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.75;
}

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

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

.field label {
    font-size: 0.92rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-faint);
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(37, 99, 255, 0.28);
    box-shadow: 0 0 0 4px rgba(37, 99, 255, 0.08);
}

.field__error {
    min-height: 1.15rem;
    color: var(--danger);
    font-size: 0.84rem;
}

.inline-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-link {
    color: var(--secondary);
    font-weight: 700;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100% - 36px));
}

.toast {
    padding: 18px;
}

.toast--success {
    border-color: rgba(92, 255, 122, 0.42);
}

.toast--danger {
    border-color: rgba(255, 106, 122, 0.34);
}

.toast__title {
    font-weight: 800;
}

.toast__body {
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.6;
    word-break: break-word;
}

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

.footer--compact {
    grid-template-columns: 1fr;
}

.footer-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    box-shadow: var(--shadow-md);
}

.footer-compact__right {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    box-shadow: var(--shadow-md);
}

.reveal {
    animation: reveal 0.34s ease;
}

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

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

@media (max-width: 1120px) {
    .hero,
    .stack-grid,
    .signal-grid,
    .dashboard-layout,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .dash-widgets {
        grid-template-columns: 1fr;
    }

    .story-grid,
    .pricing-grid,
    .dashboard-stats,
    .footer,
    .auth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .topbar__toggle {
        display: inline-flex;
    }

    .topbar__inner {
        flex-wrap: wrap;
        border-radius: 26px;
    }

    .topbar__nav {
        display: none;
        width: 100%;
        padding: 10px;
        border-radius: 22px;
        border: 1px solid rgba(15, 23, 38, 0.08);
        background: rgba(255, 255, 255, 0.78);
    }

    .topbar__nav.is-open {
        display: grid;
        gap: 8px;
    }

    .topbar__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .topbar__inner,
    .topbar__nav,
    .topbar__actions,
    .hero__actions,
    .hero__stats,
    .story-grid,
    .pricing-grid,
    .dashboard-stats,
    .footer,
    .auth-grid,
    .quick-grid,
    .warpboard__top,
    .warpboard__bottom {
        grid-template-columns: 1fr;
    }

    .topbar__inner,
    .topbar__nav,
    .topbar__actions,
    .section-head,
    .server-row,
    .inline-links,
    .signal-row {
        flex-direction: column;
        align-items: stretch;
    }

    .server-row > div[style*="min-width"] {
        min-width: 0 !important;
    }

    .btn,
    .nav-link {
        width: 100%;
    }

    .hero__copy,
    .hero__visual,
    .story-card,
    .feature-card,
    .pricing-card,
    .stack-card,
    .signal-card,
    .dashboard-panel,
    .dashboard-hero,
    .auth-card {
        padding: 22px;
    }

    .hero__title,
    .dashboard-title {
        font-size: 2.8rem;
    }
}

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

/* Dashboard panels - solid background */
.dashboard-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}

/* Tickets styles */
.tickets-sidebar {
    flex: 0 0 360px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}

.tickets-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}

.tickets-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 12px;
}

.ticket-item {
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
    background: #f8fafc;
}

.ticket-item:hover {
    background: #eef6ff;
}

.ticket-item.is-active {
    background: #e0eeff;
    border: 1px solid #2563ff;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.ticket-footer .btn--small {
    padding: 6px 12px;
    font-size: 13px;
    min-height: auto;
}

.new-ticket-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.new-ticket-form h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.ticket-detail {
    padding: 0;
}

.ticket-detail.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
}

.chat-message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.chat-message.msg-staff {
    background: #1a2a3a;
    color: white;
    margin-right: 25%;
    margin-left: 0;
}

.chat-message.msg-user {
    background: white;
    margin-left: 25%;
    margin-right: 0;
    border: 1px solid rgba(0,0,0,0.06);
}

.msg-meta {
    font-size: 12px;
    margin-bottom: 4px;
    opacity: 0.7;
}

.msg-text {
    word-break: break-word;
}

.reply-section {
    margin-top: 16px;
}

.reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* Toast container - outside SPA */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 14px 18px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-container .toast--success {
    border-left: 4px solid #22c55e;
}

.toast-container .toast--danger {
    border-left: 4px solid #ef4444;
}

.toast-container .toast__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-container .toast__body {
    font-size: 13px;
    color: #6b7280;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 18, 32, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: modalFade 0.15s ease-out;
}

.modal-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPop 0.18s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 6px;
}

.modal-close:hover {
    color: #111;
}

.modal-body {
    padding: 18px 22px;
}

/* Form helpers (used in admin catalog modals) */
.form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    color: #111;
}

.form__label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.form__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 14px;
    color: #111;
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s;
    box-sizing: border-box;
}

.form__input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(37,99,255,.12);
}

.form__input:invalid {
    border-color: rgba(239,68,68,.5);
}

select.form__input { cursor: pointer; }

.form__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #111;
    padding: 8px 0;
}

.form__check input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   BILLING PAGE — modern redesign
═══════════════════════════════════════════════════════════════ */

.billing-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hero balance */
.billing-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    border-radius: 24px;
    padding: 28px 32px;
    box-shadow: 0 20px 50px rgba(37,99,255,.25);
}

.billing-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.billing-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.billing-hero__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.billing-hero__label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.billing-hero__refresh {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    transition: all .15s;
}

.billing-hero__refresh:hover {
    background: rgba(255,255,255,.25);
    transform: rotate(180deg);
}

.billing-hero__balance {
    margin: 18px 0 24px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.billing-hero__amount {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

.billing-hero__currency {
    font-size: 28px;
    font-weight: 600;
    opacity: .85;
}

.billing-hero__meta {
    display: flex;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.15);
}

.billing-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.billing-hero__stat-label {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.billing-hero__stat-value {
    font-size: 18px;
    font-weight: 700;
}

.billing-hero__divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.15);
}

/* Stats row */
.billing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.billing-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: all .15s;
}

.billing-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,.06);
    border-color: rgba(37,99,255,.3);
}

.billing-stat__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.billing-stat__icon--in {
    background: rgba(34,197,94,.12);
    color: #16a34a;
}

.billing-stat__icon--out {
    background: rgba(239,68,68,.12);
    color: #dc2626;
}

.billing-stat__icon--next {
    background: rgba(245,158,11,.12);
    color: #d97706;
}

.billing-stat__label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.billing-stat__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

/* Grid: topup + activity */
.billing-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    align-items: start;
}

.billing-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px 26px;
}

.billing-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.billing-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.billing-card__desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* Quick amounts */
.billing-amounts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.billing-amount {
    padding: 11px 8px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .12s;
}

.billing-amount:hover {
    border-color: var(--secondary);
    background: rgba(37,99,255,.06);
}

.billing-amount.is-active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* Custom amount input */
.billing-amount-input {
    margin-bottom: 22px;
}

.billing-amount-input__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.billing-amount-input__wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.billing-amount-input__field {
    width: 100%;
    padding: 16px 48px 16px 18px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    transition: border-color .12s, box-shadow .12s;
    font-family: inherit;
}

.billing-amount-input__field:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(37,99,255,.12);
}

.billing-amount-input__currency {
    position: absolute;
    right: 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--muted);
    pointer-events: none;
}

.billing-amount-input__hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

/* Payment methods */
.billing-methods {
    margin-bottom: 22px;
}

.billing-methods__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.billing-methods__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.billing-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: all .15s;
    color: var(--text);
    font-family: inherit;
}

.billing-method:hover {
    border-color: var(--secondary);
    background: rgba(37,99,255,.04);
}

.billing-method.is-active {
    border-color: var(--secondary);
    background: rgba(37,99,255,.08);
    box-shadow: 0 0 0 3px rgba(37,99,255,.08);
}

.billing-method__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(37,99,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    flex-shrink: 0;
}

.billing-method__body {
    flex: 1;
    min-width: 0;
}

.billing-method__name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.billing-method__desc {
    font-size: 11px;
    color: var(--muted);
}

.billing-method__check {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.6);
    transition: all .18s;
}

.billing-method.is-active .billing-method__check {
    opacity: 1;
    transform: scale(1);
}

/* Submit */
.billing-submit {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .15s;
    box-shadow: 0 8px 20px rgba(37,99,255,.25);
}

.billing-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37,99,255,.35);
}

.billing-submit:active {
    transform: translateY(0);
}

.billing-submit__arrow {
    transition: transform .15s;
}

.billing-submit:hover .billing-submit__arrow {
    transform: translateX(4px);
}

.billing-payment-ready {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.25);
    border-radius: 12px;
}

.billing-payment-ready__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

/* Activity sidebar */
.billing-activity {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px 22px;
    position: sticky;
    top: 20px;
}

.billing-activity__empty {
    text-align: center;
    padding: 40px 20px;
}

.billing-activity__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 480px;
    overflow-y: auto;
    margin: 0 -10px;
}

.billing-activity__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    transition: background .12s;
}

.billing-activity__item:hover {
    background: rgba(0,0,0,.02);
}

.billing-activity__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.billing-activity__icon.is-credit {
    background: rgba(34,197,94,.12);
    color: #16a34a;
}

.billing-activity__icon.is-debit {
    background: rgba(239,68,68,.1);
    color: #dc2626;
}

.billing-activity__info {
    flex: 1;
    min-width: 0;
}

.billing-activity__desc {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-activity__date {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.billing-activity__amount {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.billing-activity__amount.is-credit { color: #16a34a; }
.billing-activity__amount.is-debit  { color: #dc2626; }

/* Mobile */
@media (max-width: 960px) {
    .billing-hero { padding: 22px 20px; }
    .billing-hero__amount { font-size: 44px; }
    .billing-hero__currency { font-size: 22px; }
    .billing-hero__meta { flex-wrap: wrap; gap: 14px; }
    .billing-hero__divider { display: none; }
    .billing-stats { grid-template-columns: 1fr; }
    .billing-grid { grid-template-columns: 1fr; }
    .billing-amounts { grid-template-columns: repeat(3, 1fr); }
    .billing-methods__grid { grid-template-columns: 1fr; }
    .billing-activity { position: static; }
}

.modal-footer {
    padding: 8px 22px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Admin Panel ── */
.admin-wrap {
    width: 100%;
    padding: 24px 0 60px;
    min-width: 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-title {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 800;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.04);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 7px 16px;
    border-radius: 9px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-tab.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-tab:hover:not(.is-active) {
    color: var(--text);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
    font-size: 11px;
    font-weight: 700;
}

.admin-badge--alert {
    background: var(--danger);
    color: #fff;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: var(--surface-strong);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.15s;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
}

.admin-stat-card--alert {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid rgba(255,106,122,0.2);
}

.admin-stat-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.admin-stat-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    word-break: break-all;
}

.admin-stat-label {
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 500;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
    max-width: 100%;
    min-width: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.admin-table thead tr {
    background: rgba(0,0,0,0.025);
}

.admin-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: rgba(0,0,0,0.018);
}

.admin-row--open td:first-child {
    border-left: 3px solid var(--primary-deep);
}

.admin-action-btn {
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all 0.12s;
    white-space: nowrap;
}

.admin-action-btn:hover {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.admin-action-btn--money {
    color: var(--primary-deep);
    border-color: var(--primary-deep);
}

.admin-action-btn--money:hover {
    background: var(--primary-deep);
    color: #fff;
}

.admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.admin-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.admin-info-row:last-child {
    border-bottom: none;
}

.admin-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.field__input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}

.field__input:focus {
    border-color: var(--secondary);
}

.admin-msg {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
}

.admin-msg--user {
    background: #f4f6fa;
    align-self: flex-start;
}

.admin-msg--staff {
    background: linear-gradient(135deg, #eefff3, #f0fff4);
    border: 1px solid rgba(11,168,79,0.2);
}

.admin-msg__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}

.admin-msg__body {
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-row--selected {
    background: rgba(99, 102, 241, 0.08);
}
.admin-row--selected td {
    border-color: rgba(99, 102, 241, 0.15);
}

.admin-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--line);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: adminSpin 0.7s linear infinite;
    margin: 0 auto;
}

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

/* ── Admin Section blocks ── */
.admin-section {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.admin-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    flex-wrap: wrap;
}

.admin-section__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.admin-section .admin-table-wrap {
    border: none;
    border-radius: 0;
}

.admin-section .admin-pagination {
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    margin-top: 0;
}

.admin-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 340px;
}

.admin-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}

.admin-input:focus {
    border-color: var(--accent, #4f8ef7);
}

.admin-search-hint {
    padding: 6px 20px;
    font-size: 12px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.02);
}

.admin-filter-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filter-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--line-strong);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-soft);
    transition: all 0.12s;
    white-space: nowrap;
}

.admin-filter-btn.is-active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.admin-filter-btn:hover:not(.is-active) {
    border-color: var(--text);
    color: var(--text);
}

.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
    font-size: 14px;
}

.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.admin-td-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-td-subject {
    max-width: 220px;
}

/* ── Admin Ticket Detail Page ── */
.admin-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-soft);
    transition: all 0.15s;
    white-space: nowrap;
}

.admin-back-btn:hover {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.admin-ticket-meta {
    display: flex;
    gap: 0;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-ticket-meta-item {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    border-right: 1px solid var(--line);
}

.admin-ticket-meta-item:last-child {
    border-right: none;
}

.admin-ticket-meta-item .muted {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-thread-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-faint);
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 14px;
}

.admin-thread-msg {
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.admin-thread-msg--user {
    background: var(--surface-strong);
    margin-right: 60px;
}

.admin-thread-msg--staff {
    background: linear-gradient(135deg, #f0fff4, #eafff1);
    border-color: rgba(11, 168, 79, 0.2);
    margin-left: 60px;
}

.admin-thread-msg__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-thread-msg__author {
    font-weight: 700;
    font-size: 13px;
}

.admin-thread-msg__time {
    font-size: 12px;
    color: var(--text-faint);
}

.admin-thread-msg__body {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

.admin-reply-box {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 22px;
}

.admin-reply-box__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.admin-reply-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.15s;
    background: #fff;
    box-sizing: border-box;
}

.admin-reply-textarea:focus {
    border-color: var(--secondary);
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    from { transform: translateY(10px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   VDS / Services page
═══════════════════════════════════════════════ */

.vds-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-faint);
    margin: 28px 0 12px;
}

.vds-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

/* ── Plan cards grid ── */
.vds-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.vds-plan-card {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}

.vds-plan-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 20px rgba(37,99,255,.10);
    transform: translateY(-2px);
}

.vds-plan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.vds-plan-card__name {
    font-weight: 800;
    font-size: 16px;
}

.vds-plan-card__price {
    font-size: 20px;
    font-weight: 900;
    color: var(--secondary);
    white-space: nowrap;
}

.vds-plan-card__price span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-faint);
}

.vds-plan-card__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
}

.vds-plan-spec {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.vds-plan-spec__icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.vds-plan-spec__val {
    font-size: 13px;
    font-weight: 700;
}

.vds-plan-spec__key {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 1px;
}

.vds-plan-card__btn {
    width: 100%;
    margin-top: auto;
}

/* ── User servers list ── */
.vds-servers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.vds-server-card {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}

.vds-server-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 2px 12px rgba(37,99,255,.08);
}

.vds-server-card__left {
    min-width: 0;
}

.vds-server-card__name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.vds-server-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
    color: var(--text-soft);
}

.vds-server-card__os {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
}

.vds-server-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.vds-server-card__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
    white-space: nowrap;
}

/* ── Provision success banner ── */
.vds-provision-result {
    background: linear-gradient(135deg, rgba(37,99,255,.06), rgba(37,99,255,.02));
    border: 1px solid rgba(37,99,255,.18);
    border-radius: 16px;
    padding: 22px 24px;
    margin-top: 20px;
}

.vds-provision-result__title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 14px;
}

.vds-provision-result__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vds-provision-result__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(255,255,255,.7);
    border-radius: 8px;
}

.vds-provision-result__row span {
    color: var(--text-faint);
}

/* ── Order modal ── */
.vds-order-modal {
    max-width: 480px;
}

.vds-order-specs {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.vds-order-spec-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vds-order-spec-row span {
    font-size: 11px;
    color: var(--text-faint);
}

.vds-order-spec-row strong {
    font-size: 13px;
}

.vds-order-field {
    margin-bottom: 14px;
}

.vds-order-summary {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vds-order-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.vds-order-summary__row strong {
    font-weight: 700;
}

.vds-order-summary__warn {
    font-size: 12px;
    color: var(--danger, #e53e3e);
    margin-top: 4px;
}

.vds-order-summary__warn a {
    color: var(--secondary);
    text-decoration: underline;
}

.text-danger {
    color: var(--danger, #e53e3e) !important;
}

/* ── Server detail page ── */
.vds-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 700px) {
    .vds-detail-grid { grid-template-columns: 1fr; }
    .vds-plans-grid  { grid-template-columns: 1fr; }
    .vds-order-specs { grid-template-columns: 1fr 1fr; }
}

.vds-detail-card {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 20px;
}

.vds-detail-card__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-faint);
    margin-bottom: 14px;
}

.vds-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.vds-detail-row:last-child {
    border-bottom: none;
}

.vds-detail-row span {
    color: var(--text-faint);
}

.vds-detail-row strong {
    font-weight: 600;
}

.vds-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.vds-detail-danger {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    margin-top: 8px;
}

.mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .9em;
    letter-spacing: .01em;
}

.vds-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-strong);
    border: 1px dashed var(--line);
    border-radius: 16px;
    margin-top: 8px;
}

.vds-empty-state__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: .6;
}

.vds-empty-state__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ── Location tabs ── */
.vds-loc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.vds-loc-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.vds-loc-tab:hover {
    border-color: var(--secondary);
    background: rgba(37,99,255,.04);
}

.vds-loc-tab.is-active {
    border-color: var(--secondary);
    background: rgba(37,99,255,.08);
    color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(37,99,255,.1);
}

.vds-loc-tab__flag {
    font-size: 18px;
    line-height: 1;
}

.vds-loc-tab__name {
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   SERVER MANAGEMENT — list view
═══════════════════════════════════════════════════════════════ */

.svm-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svm-header {
    display: grid;
    grid-template-columns: 40px 20px 1fr 160px 220px;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.svm-row {
    display: grid;
    grid-template-columns: 40px 20px 1fr 160px 220px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.svm-row:hover {
    border-color: rgba(255,255,255,.12);
    box-shadow: 0 2px 16px rgba(0,0,0,.18);
}

.svm-row--selected {
    border-color: var(--secondary);
    background: rgba(37,99,255,.05);
}

/* Checkbox */
.svm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.svm-check input[type=checkbox] {
    display: none;
}

.svm-check__box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--line);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .12s, background .12s;
}

.svm-check.is-checked .svm-check__box {
    background: var(--secondary);
    border-color: var(--secondary);
}

.svm-check.is-checked .svm-check__box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.dot--green  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); }
.dot--red    { background: #ef4444; }
.dot--yellow { background: #f59e0b; animation: dot-pulse .9s ease-in-out infinite alternate; }

@keyframes dot-pulse {
    from { opacity: 1; }
    to   { opacity: .4; }
}

/* Row main */
.svm-row__main {
    min-width: 0;
}

.svm-row__name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.svm-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.svm-ip {
    font-size: 12px;
    background: rgba(255,255,255,.05);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--line);
}

.svm-tag {
    font-size: 11px;
    color: var(--muted);
    background: rgba(255,255,255,.04);
    padding: 2px 7px;
    border-radius: 4px;
}

/* Right col */
.svm-row__right {
    text-align: right;
}

.svm-row__price {
    font-weight: 700;
    font-size: 14px;
}

.svm-row__price span {
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
}

.svm-row__expiry {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

/* Actions col */
.svm-row__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.svm-pill {
    flex-shrink: 0;
    font-size: 11px;
    padding: 3px 8px;
}

.svm-quick {
    display: flex;
    gap: 4px;
}

.svm-btn {
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    line-height: 1;
}

.svm-btn:hover    { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.svm-btn--go      { color: #22c55e; border-color: rgba(34,197,94,.3); }
.svm-btn--go:hover { background: rgba(34,197,94,.08); }
.svm-btn--stop    { color: #ef4444; border-color: rgba(239,68,68,.3); }
.svm-btn--stop:hover { background: rgba(239,68,68,.08); }
.svm-btn--renew   { color: var(--secondary); border-color: rgba(37,99,255,.3); font-size: 11px; font-weight: 700; }
.svm-btn--renew:hover { background: rgba(37,99,255,.08); }
.svm-btn--open    { color: var(--secondary); font-weight: 700; }

/* Bulk action bar — compact design */
.svm-bulk-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(37,99,255,.12), rgba(37,99,255,.05));
    border: 1px solid rgba(37,99,255,.25);
    border-radius: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.svm-bulk-bar__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.svm-bulk-bar__count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.svm-bulk-bar__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--secondary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    padding: 0 8px;
}

.svm-bulk-bar__cost {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.svm-bulk-bar__period {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.svm-bulk-bar__label {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.svm-bulk-bar__periods {
    display: flex;
    gap: 6px;
}

.svm-bulk-period {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
}

.svm-bulk-period:hover:not(:disabled) {
    border-color: var(--secondary);
    background: rgba(37,99,255,.1);
}

.svm-bulk-period.is-active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.svm-bulk-period.is-disabled,
.svm-bulk-period:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.svm-bulk-bar__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.svm-bulk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
}

.svm-bulk-btn:hover:not(:disabled) {
    border-color: var(--secondary);
    background: rgba(37,99,255,.08);
}

.svm-bulk-btn--renew {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    padding: 8px 18px;
}

.svm-bulk-btn--renew:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.svm-bulk-btn--danger {
    color: #ef4444;
    border-color: rgba(239,68,68,.3);
}

.svm-bulk-btn--danger:hover {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.5);
}

.svm-bulk-btn--close {
    padding: 8px 10px;
    font-size: 16px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .svm-bulk-bar { flex-direction: column; align-items: stretch; gap: 14px; }
    .svm-bulk-bar__period { margin-left: 0; }
    .svm-bulk-bar__actions { justify-content: stretch; flex-wrap: wrap; }
    .svm-bulk-btn--renew { flex: 1; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════
   SERVER DETAIL view
═══════════════════════════════════════════════════════════════ */

.svm-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 20px;
}

.svm-back-btn {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: background .12s;
}

.svm-back-btn:hover { background: rgba(255,255,255,.12); }

.svm-detail-header__info { flex: 1; min-width: 0; }

.svm-detail-header__name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 5px;
}

.svm-detail-header__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.svm-detail-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tabs */
.svm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
}

.svm-tab {
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s;
    position: relative;
    bottom: -1px;
}

.svm-tab:hover { background: rgba(255,255,255,.05); color: var(--text); }

.svm-tab.is-active {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--line);
    border-bottom-color: var(--surface-strong);
}

/* Tab content grid */
.svm-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* Info cards */
.svm-info-card {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 24px;
}

.svm-info-card__title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 14px;
}

.svm-kv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    gap: 12px;
}

.svm-kv:last-of-type { border-bottom: none; }
.svm-kv span { color: var(--muted); }
.svm-kv strong { font-weight: 600; text-align: right; }

/* Power buttons — vertical list */
.svm-power-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.svm-power-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    transition: background .12s, border-color .12s, box-shadow .12s;
    width: 100%;
}

.svm-power-item:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.svm-power-item__icon {
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.svm-power-item__label {
    font-weight: 600;
}

.svm-power-item__status {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.svm-power-item--start  { border-color: rgba(34,197,94,.25); }
.svm-power-item--start:not(:disabled):hover  {
    background: rgba(34,197,94,.07);
    border-color: rgba(34,197,94,.5);
    box-shadow: 0 0 0 3px rgba(34,197,94,.08);
}

.svm-power-item--restart:not(:disabled):hover {
    background: rgba(37,99,255,.07);
    border-color: rgba(37,99,255,.4);
    box-shadow: 0 0 0 3px rgba(37,99,255,.08);
}

.svm-power-item--stop   { border-color: rgba(239,68,68,.25); }
.svm-power-item--stop:not(:disabled):hover   {
    background: rgba(239,68,68,.07);
    border-color: rgba(239,68,68,.5);
    box-shadow: 0 0 0 3px rgba(239,68,68,.08);
}

/* Renew card */
.svm-renew-card {
    grid-column: 1 / -1;
}

.svm-renew-card__desc {
    font-size: 13px;
    color: var(--muted);
    margin: -6px 0 14px;
    line-height: 1.5;
}

/* Renew period selector */
.svm-renew-periods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.svm-renew-period {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    position: relative;
    transition: border-color .12s, background .12s, box-shadow .12s;
}

.svm-renew-period:not(:disabled):hover {
    border-color: var(--secondary);
    background: rgba(37,99,255,.07);
    box-shadow: 0 0 0 3px rgba(37,99,255,.08);
}

.svm-renew-period:disabled,
.svm-renew-period--disabled {
    opacity: .35;
    cursor: not-allowed;
}

.svm-renew-period__months {
    font-size: 13px;
    font-weight: 700;
}

.svm-renew-period__price {
    font-size: 11px;
    color: var(--muted);
}

.svm-renew-period__saving {
    position: absolute;
    top: -8px;
    right: -6px;
    font-size: 9px;
    font-weight: 800;
    background: #22c55e;
    color: #fff;
    padding: 1px 5px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Renew confirm modal body */
.renew-confirm-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(37,99,255,.06);
    border: 1px solid rgba(37,99,255,.2);
    border-radius: 10px;
}

.renew-confirm-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--secondary);
}

.renew-confirm-info { flex: 1; min-width: 0; }

.renew-confirm-server {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.renew-confirm-detail { font-size: 13px; color: var(--muted); }

.renew-confirm-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Network tab */
.svm-ip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.svm-ip-row__addr { flex: 1; font-weight: 600; }

.svm-ip-row__badge {
    font-size: 11px;
    background: rgba(37,99,255,.12);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Danger zone */
.svm-danger-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(239,68,68,.05);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 10px;
}

.svm-danger-btn {
    background: rgba(239,68,68,.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239,68,68,.3) !important;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background .12s;
}

.svm-danger-btn:hover { background: rgba(239,68,68,.18) !important; }

/* Util */
.text-danger { color: #ef4444 !important; }
.text-warn   { color: #f59e0b !important; }
.vds-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin: 20px 0 10px;
}

/* ═══════════════════════════════════════════════════════════════
   FULL-WIDTH TAB LAYOUT (Сеть / Переустановка / Настройки)
═══════════════════════════════════════════════════════════════ */

.svm-full-tab {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.svm-full-tab__section {
    padding: 28px 32px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-strong);
}

.svm-full-tab__section:last-child { border-bottom: none; }

.svm-full-tab__section--alt {
    background: rgba(255,255,255,.02);
}

.svm-full-tab__section--danger {
    background: rgba(239,68,68,.03);
}

.svm-full-tab__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.svm-full-tab__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.svm-full-tab__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.svm-full-tab__desc {
    font-size: 13px;
    color: var(--muted);
}

.svm-full-tab__empty {
    text-align: center;
    padding: 32px;
    color: var(--muted);
    font-size: 15px;
}

.svm-full-tab__empty span { font-size: 32px; display: block; margin-bottom: 8px; }

.svm-full-tab__warn {
    margin-top: 10px;
    font-size: 13px;
    color: #f59e0b;
}

/* IP Table */
.svm-ip-table {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.svm-ip-table__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255,255,255,.02);
}

.svm-ip-table__addr {
    font-size: 15px;
    font-weight: 600;
}

.svm-ip-table__actions { display: flex; gap: 8px; }

/* Badges */
.svm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,.08);
    color: var(--muted);
}

.svm-badge--primary {
    background: rgba(37,99,255,.15);
    color: var(--secondary);
}

.svm-badge--green {
    background: rgba(34,197,94,.15);
    color: #22c55e;
}

/* Add IP block */
.svm-addip-block { display: flex; flex-direction: column; gap: 16px; }

.svm-addip-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.svm-addip-info__item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 16px;
}

.svm-addip-info__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.svm-addip-info__val {
    font-size: 14px;
    font-weight: 600;
}

.svm-addip-info__val--price {
    color: var(--secondary);
    font-size: 16px;
}

.svm-addip-btn { align-self: flex-start; }

/* OS Reinstall */
.svm-reinstall-layout { display: flex; flex-direction: column; gap: 20px; }

.svm-reinstall-os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.svm-os-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .12s, background .12s;
    position: relative;
}

.svm-os-card input[type=radio] { display: none; }

.svm-os-card:has(input:checked) {
    border-color: var(--secondary);
    background: rgba(37,99,255,.06);
}

.svm-os-card:hover { border-color: rgba(255,255,255,.2); }

.svm-os-card__icon { font-size: 28px; line-height: 1; }

.svm-os-card__name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.svm-os-card__cur {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    background: var(--secondary);
    color: #fff;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.svm-reinstall-warn {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    background: rgba(239,68,68,.07);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 10px;
}

.svm-reinstall-warn__icon { font-size: 20px; flex-shrink: 0; }
.svm-reinstall-warn__text { font-size: 13px; line-height: 1.5; }

.svm-reinstall-ack {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
}

.svm-reinstall-btn {
    align-self: flex-start;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: rgba(239,68,68,.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,.3);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s, box-shadow .12s;
}

.svm-reinstall-btn:hover {
    background: rgba(239,68,68,.2);
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* TG toggle */
.svm-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.svm-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.svm-toggle input { display: none; }

.svm-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: rgba(255,255,255,.1);
    border: 1px solid var(--line);
    transition: background .2s;
}

.svm-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform .2s, background .2s;
}

.svm-toggle input:checked ~ .svm-toggle__track {
    background: rgba(34,197,94,.3);
    border-color: rgba(34,197,94,.5);
}

.svm-toggle input:checked ~ .svm-toggle__track::after {
    background: #22c55e;
    transform: translateX(20px);
}

.svm-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

/* Notify events list */
.svm-notify-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.svm-notify-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(34,197,94,.05);
    border: 1px solid rgba(34,197,94,.15);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.svm-notify-event span:first-child { font-size: 16px; }
.svm-notify-event span:nth-child(2) { flex: 1; }

.svm-notify-event--muted {
    background: rgba(255,255,255,.02);
    border-color: var(--line);
    color: var(--muted);
}

/* Delete block */
.svm-delete-block {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.svm-delete-block__info {
    flex: 1;
    min-width: 200px;
    background: rgba(239,68,68,.04);
    border: 1px solid rgba(239,68,68,.15);
    border-radius: 10px;
    padding: 12px 20px;
}

.svm-delete-btn {
    padding: 14px 28px;
    border-radius: 10px;
    border: 1px solid rgba(239,68,68,.4);
    background: rgba(239,68,68,.1);
    color: #ef4444;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, box-shadow .12s;
}

.svm-delete-btn:hover {
    background: rgba(239,68,68,.2);
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

@media (max-width: 768px) {
    .svm-header  { display: none; }
    .svm-row     { grid-template-columns: 32px 12px 1fr; grid-template-rows: auto auto; }
    .svm-row__right  { display: none; }
    .svm-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
    .svm-power-grid { grid-template-columns: repeat(3, 1fr); }
    .svm-detail-header { flex-wrap: wrap; }
    .svm-tabs { overflow-x: auto; }
    .svm-full-tab__section { padding: 20px 16px; }
    .svm-delete-block { flex-direction: column; align-items: stretch; }
    .svm-delete-btn { text-align: center; }
    .svm-reinstall-os-grid { grid-template-columns: repeat(2, 1fr); }
}
