/* ════════════════════════════════════════════════════
   COLOUR PALETTE VARIABLES  — 3 themes + dark mode
   ════════════════════════════════════════════════════ */

/* ── VIOLET (default) — deep professional purple ─── */
:root {
  --cp:        #5b21b6;
  --cp-dk:     #4c1d95;
  --cp-lt:     #ede9fe;
  --cp-bg:     #f6f4ff;
  --cp-hv:     #efebff;
  --cp-bd:     #c4b5fd;
  --cp-b2:     #ddd6fe;
  --cp-b3:     #ede9fe;
  --cp-md:     #8b5cf6;
  --cp-rgb:    91, 33, 182;
  --cp-md-rgb: 139, 92, 246;
  --cp-bg-rgb: 246, 244, 255;
  --cp-mu:     #6d5494;
  --cp-grad:   linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
  --cp-glow:   rgba(91, 33, 182, 0.32);
  --cp-glow2:  rgba(139, 92, 246, 0.18);
}

/* dark mode — violet */
html[data-theme="dark"] {
  --dp:          #c4b5fd;
  --dp-lk:       #a78bfa;
  --dp-unr-bg:   rgba(20, 6, 60, 0.97);
  --dp-unr-bd:   #5b21b6;
  --dp-act-bg:   #140640;
  --dp-cpy-bg:   #0d0428;
  --dp-cpy-tx:   #ede9fe;
  --dp-badge-bg: rgba(91, 33, 182, 0.6);
  --dp-badge-tx: #ede9fe;
  --dp-hero:     rgba(91, 33, 182, 0.22);
  --dp-nav:      rgba(196, 181, 253, 0.55);
  --dp-tile:     rgba(91, 33, 182, 0.13);
  --dp-tile-ic:  rgba(139, 92, 246, 0.12);
  --dp-tile-ib:  rgba(139, 92, 246, 0.18);
  --dp-tile-ra:  rgba(91, 33, 182, 0.18);
  --dp-mu:       #a08ec4;
}

/* ── GREEN PALETTE — deep forest / teal ──────────── */
html[data-palette="green"] {
  --cp:        #065f46;
  --cp-dk:     #064e3b;
  --cp-lt:     #d1fae5;
  --cp-bg:     #f0fdf9;
  --cp-hv:     #ecfdf5;
  --cp-bd:     #6ee7b7;
  --cp-b2:     #a7f3d0;
  --cp-b3:     #d1fae5;
  --cp-md:     #059669;
  --cp-rgb:    6, 95, 70;
  --cp-md-rgb: 5, 150, 105;
  --cp-bg-rgb: 240, 253, 249;
  --cp-mu:     #3d6e5a;
  --cp-grad:   linear-gradient(135deg, #064e3b 0%, #0891b2 100%);
  --cp-glow:   rgba(6, 95, 70, 0.32);
  --cp-glow2:  rgba(5, 150, 105, 0.18);
}

html[data-theme="dark"][data-palette="green"] {
  --dp:          #6ee7b7;
  --dp-lk:       #34d399;
  --dp-unr-bg:   rgba(3, 22, 16, 0.97);
  --dp-unr-bd:   #065f46;
  --dp-act-bg:   #021810;
  --dp-cpy-bg:   #011008;
  --dp-cpy-tx:   #d1fae5;
  --dp-badge-bg: rgba(6, 78, 59, 0.65);
  --dp-badge-tx: #d1fae5;
  --dp-hero:     rgba(6, 95, 70, 0.22);
  --dp-nav:      rgba(110, 231, 183, 0.55);
  --dp-tile:     rgba(6, 95, 70, 0.13);
  --dp-tile-ic:  rgba(5, 150, 105, 0.12);
  --dp-tile-ib:  rgba(5, 150, 105, 0.18);
  --dp-tile-ra:  rgba(6, 95, 70, 0.18);
  --dp-mu:       #4da882;
}

/* ── BLUE PALETTE — deep navy / cobalt ───────────── */
html[data-palette="blue"] {
  --cp:        #1e40af;
  --cp-dk:     #1e3a8a;
  --cp-lt:     #dbeafe;
  --cp-bg:     #eff6ff;
  --cp-hv:     #eaf3ff;
  --cp-bd:     #93c5fd;
  --cp-b2:     #bfdbfe;
  --cp-b3:     #dbeafe;
  --cp-md:     #3b82f6;
  --cp-rgb:    30, 64, 175;
  --cp-md-rgb: 59, 130, 246;
  --cp-bg-rgb: 239, 246, 255;
  --cp-mu:     #3d5a94;
  --cp-grad:   linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  --cp-glow:   rgba(30, 64, 175, 0.32);
  --cp-glow2:  rgba(59, 130, 246, 0.18);
}

html[data-theme="dark"][data-palette="blue"] {
  --dp:          #93c5fd;
  --dp-lk:       #60a5fa;
  --dp-unr-bg:   rgba(4, 12, 45, 0.97);
  --dp-unr-bd:   #1e3a8a;
  --dp-act-bg:   #03092e;
  --dp-cpy-bg:   #02061e;
  --dp-cpy-tx:   #dbeafe;
  --dp-badge-bg: rgba(30, 58, 138, 0.65);
  --dp-badge-tx: #dbeafe;
  --dp-hero:     rgba(30, 64, 175, 0.22);
  --dp-nav:      rgba(147, 197, 253, 0.55);
  --dp-tile:     rgba(30, 64, 175, 0.13);
  --dp-tile-ic:  rgba(59, 130, 246, 0.12);
  --dp-tile-ib:  rgba(59, 130, 246, 0.18);
  --dp-tile-ra:  rgba(30, 64, 175, 0.18);
  --dp-mu:       #4d72c4;
}

/* ─────────────────────────────────────────────────── */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #1a1a2e;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

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

.header {
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: transform 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 22px;
    color: var(--cp);
}

.nav {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
}

.nav .theme-toggle {
    margin-left: 6px;
}

.header .nav {
    justify-content: flex-end;
}

.header .nav:has(.theme-toggle) {
    gap: 12px 16px;
}

.header .nav .theme-toggle {
    margin-left: 8px;
}


.nav-home {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.nav-home svg {
    display: block;
}

.nav a {
    color: #1f2933;
    text-decoration: none;
    font-weight: 600;
}

.nav a:hover {
    color: var(--cp);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 23px;
    padding: 0 4px;
    border: 1px solid var(--cp-b2);
    border-radius: 999px;
    background: var(--cp-bg);
    color: var(--cp);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
        margin-left: 10px;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    background: var(--cp-hv);
    border-color: var(--cp-bd);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    display: none;
    color: var(--cp);
    flex-shrink: 0;
}

.theme-toggle-icon--sun {
    display: inline-flex;
    flex: 0 0 auto;
}

.hero {
    padding: 100px 0 0;
    background:
        radial-gradient(ellipse at 80% 50%, rgba(var(--cp-md-rgb), 0.1) 0%, transparent 55%),
        radial-gradient(ellipse at top left, rgba(var(--cp-rgb), 0.14) 0%, transparent 45%),
        linear-gradient(to bottom, var(--cp-bg) 0%, #ffffff 100%);
}

.badge {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--cp-grad, var(--cp));
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 12px var(--cp-glow, rgba(0,0,0,0.2));
}

.hero h1 {
    max-width: 760px;
    font-size: 48px;
    line-height: 1.1;
    margin: 0 0 20px;
}

.hero p {
    max-width: 680px;
    font-size: 19px;
    line-height: 1.6;
    color: #374151;
}

.buttons {
    display: flex;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.btn.primary {
    background: var(--cp-grad, var(--cp));
    color: #ffffff;
    box-shadow: 0 3px 10px var(--cp-glow, rgba(0,0,0,0.2));
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn.primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.18) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: -100% 0;
    transition: background-position 0.55s ease;
    pointer-events: none;
}

.btn.primary:hover::after {
    background-position: 200% 0;
}

.btn.primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 6px 18px var(--cp-glow, rgba(0,0,0,0.25));
}

.btn.secondary {
    background: #ffffff;
    color: var(--cp);
    border: 1.5px solid var(--cp-bd);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn.secondary:hover {
    border-color: var(--cp);
    box-shadow: 0 0 0 3px var(--cp-glow, transparent);
    transform: translateY(-1px);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 60px 0;
}

.card {
    background: #ffffff;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(var(--cp-rgb), 0.1), 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid rgba(var(--cp-rgb), 0.12);
    transition: box-shadow 0.25s ease, transform 0.22s ease, border-color 0.25s ease;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(var(--cp-rgb), 0.18), 0 0 0 2px rgba(var(--cp-rgb), 0.14);
    transform: translateY(-3px);
    border-color: rgba(var(--cp-rgb), 0.22);
}

.card h2 {
    margin-top: 0;
    color: var(--cp);
}

.card p {
    color: #52616b;
    line-height: 1.5;
}

.footer {
    padding: 28px 0;
    background: #1f2933;
    color: #ffffff;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-dev-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    overflow: hidden;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.3s ease;
}

.footer-dev-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.07) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: -100% 0;
    transition: background-position 0.6s ease;
    pointer-events: none;
}

.footer-dev-badge:hover::before {
    background-position: 200% 0;
}

.footer-dev-badge:hover {
    border-color: rgba(var(--cp-md-rgb), 0.5);
    box-shadow: 0 0 14px rgba(var(--cp-md-rgb), 0.25), 0 0 30px rgba(59, 158, 255, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
}

.footer-dev-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64dc8c;
    box-shadow: 0 0 6px #64dc8c;
    flex-shrink: 0;
    -webkit-animation: dev-dot-pulse 2.2s ease-in-out infinite;
    animation: dev-dot-pulse 2.2s ease-in-out infinite;
}

@-webkit-keyframes dev-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px #64dc8c; }
    50% { opacity: 0.55; box-shadow: 0 0 10px #64dc8c, 0 0 20px rgba(100, 220, 140, 0.5); }
}

@keyframes dev-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px #64dc8c; }
    50% { opacity: 0.55; box-shadow: 0 0 10px #64dc8c, 0 0 20px rgba(100, 220, 140, 0.5); }
}

.footer-dev-by {
    color: rgba(255, 255, 255, 0.38);
    font-weight: 400;
    font-size: 12px;
}

.footer-dev-name {
    background: linear-gradient(90deg, #64dc8c, #3b9eff, #a855f7, #64dc8c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: 0.01em;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation: dev-name-hue 3s linear infinite;
    animation: dev-name-hue 3s linear infinite;
}

@-webkit-keyframes dev-name-hue {
    0% { -webkit-filter: hue-rotate(0deg); filter: hue-rotate(0deg); }
    100% { -webkit-filter: hue-rotate(360deg); filter: hue-rotate(360deg); }
}

@keyframes dev-name-hue {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .footer-dev-name { -webkit-animation: none; animation: none; }
    .footer-dev-dot { -webkit-animation: none; animation: none; }
}

.footer-copy {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.9);
}

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

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
    flex-shrink: 0;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.social-facebook:hover { background: #1877F2; }
.social-viber:hover { background: #7360f2; }
.social-telegram:hover { background: #0088cc; }

/* Hamburger button — hidden on desktop */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 7px 8px;
    background: var(--cp-bg);
    border: 1px solid var(--cp-b2);
    border-radius: 8px;
    cursor: pointer;
    color: var(--cp);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.nav-burger:hover {
    background: var(--cp-hv);
}

.nav-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-burger.is-active span:nth-child(2) {
    opacity: 0;
}

.nav-burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    /* PUBLIC header: brand (row 1 left) + header-controls (row 1 right) + nav (row 2) */
    .site-header .header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 0 0;
        min-height: 0;
        gap: 0 8px;
    }

    .site-header .brand {
        flex: 1;
        min-width: 0;
    }

    /* Truncate long brand title on narrow screens */
    .site-header .brand-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Row 1 right: controls (toggle + tiny palette) */
    .site-header .header-inner > .header-controls {
        flex-shrink: 0;
        order: 1;
        margin-bottom: 8px;
        gap: 6px;
    }

    /* Row 2: full-width scrollable nav */
    .site-header .nav-scroll-wrapper {
        flex: 0 0 100%;
        order: 2;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .site-header .nav-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .site-header .public-nav {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        gap: 0;
        padding: 5px 0 8px;
        position: static;
        box-shadow: none;
        background: transparent;
    }

    .site-header .public-nav a {
        font-size: 13px;
        padding: 4px 16px 4px 0;
        white-space: nowrap;
        flex-shrink: 0;
        border-bottom: none;
    }

    /* CABINET header: same 2-row pattern */
    .header .header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 0 0;
        min-height: 0;
        gap: 0 8px;
    }

    .header .logo {
        flex: 1;
    }

    .header .header-inner > .header-controls {
        flex-shrink: 0;
        order: 1;
        margin-bottom: 8px;
        gap: 6px;
    }

    .header .nav-scroll-wrapper {
        flex: 0 0 100%;
        order: 2;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .header .nav-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .header .cabinet-nav {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        gap: 0;
        padding: 5px 0 8px;
        border-top: 1px solid rgba(229, 231, 235, 0.8);
        position: static;
        box-shadow: none;
        background: transparent;
    }

    .header .cabinet-nav a {
        font-size: 13px;
        padding: 4px 16px 4px 0;
        white-space: nowrap;
        flex-shrink: 0;
        border-bottom: none;
    }

    /* Tiny palette dots inside header-controls on mobile */
    .header-controls .palette-btn {
        width: 10px;
        height: 10px;
    }

    .header-controls .palette-switcher {
        gap: 4px;
    }

    .hero {
        padding: 70px 0;
    }

    .hero h1 {
        font-size: 34px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}
.login-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at top right, rgba(var(--cp-rgb), 0.1), transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(var(--cp-md-rgb), 0.07), transparent 50%),
        #ffffff;
    padding: 40px 16px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 36px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.login-box h1 {
    margin-top: 0;
    color: var(--cp);
}

.login-box p {
    color: #52616b;
}

.login-box label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: 700;
}

.login-box input,
.login-box select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5df;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
}

.meter-account-switcher {
    margin-bottom: 18px;
}

.checkbox-field {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 6px;
    cursor: pointer;
}

.checkbox-field input {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.checkbox-field span {
    display: block;
    line-height: 1.45;
}

.login-box button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--cp);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.error-box {
    padding: 12px 14px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 10px;
    margin: 18px 0;
}

.cabinet-page {
    padding: 60px 0;
    background: #f4f3fa;
    min-height: calc(100vh - 72px);
}

.cabinet-page h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.profile-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(var(--cp-md-rgb), 0.2);
}

.profile-card h2 {
    margin-top: 0;
    color: var(--cp);
}

.profile-card p {
    color: #52616b;
    line-height: 1.6;
}

.collapsible-card > button.card-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
    padding: 2px 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

.collapsible-card > button.card-toggle h2 {
    margin: 0;
    line-height: 1.2;
    font-size: 19px;
    font-weight: 800;
}

.collapsible-card > button.card-toggle:focus-visible {
    outline: 2px solid rgba(var(--cp-rgb), 0.25);
    outline-offset: 8px;
    border-radius: 12px;
}

.card-content[hidden] {
    display: none;
}

button.collapse-all-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--cp-mu);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.01em;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    opacity: 0.86;
    transition:
        color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.section-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 10px;
}

button.collapse-all-toggle::before {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin-right: 8px;
    margin-top: -1px;
}

button.collapse-all-toggle:hover {
    color: var(--cp);
    opacity: 1;
}

button.collapse-all-toggle:focus-visible {
    outline: 2px solid rgba(var(--cp-rgb), 0.22);
    outline-offset: 4px;
    border-radius: 8px;
}

.card-toggle-icon {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-right: 2px solid var(--cp);
    border-bottom: 2px solid var(--cp);
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
    margin-top: -2px;
    opacity: 0.78;
}

.collapsible-card.is-open > button.card-toggle {
    margin-bottom: 18px;
}

.collapsible-card.is-open > button.card-toggle .card-toggle-icon {
    transform: rotate(45deg);
    margin-top: 1px;
    opacity: 1;
}

.collapsible-card:not(.is-open) {
    padding-bottom: 24px;
}

.collapsible-card > button.card-toggle:hover h2 {
    color: var(--cp-dk);
}

.collapsible-card > button.card-toggle:hover .card-toggle-icon {
    opacity: 1;
}

.receipt-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.receipt-preview {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--cp-b2);
    background: linear-gradient(
        180deg,
        rgba(var(--cp-bg-rgb), 0.95),
        rgba(255, 255, 255, 0.98)
    );
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
    min-height: 0;
}

.receipt-preview img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.receipt-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #faf8ff;
    border: 1px solid var(--cp-b3);
}

.receipt-meta p {
    margin: 0;
}

.receipt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    flex: 0 0 auto;
}

.receipt-panel.receipt-missing .receipt-preview {
    display: none;
}

.receipt-panel.receipt-missing .receipt-fallback {
    display: block !important;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 12px 14px;
}

.account-select-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--cp);
    color: #ffffff !important;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(var(--cp-rgb), 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.account-select-link:hover {
    background: var(--cp-dk);
    box-shadow: 0 10px 20px rgba(20, 83, 45, 0.22);
    transform: translateY(-1px);
}

.icon-only-link {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.icon-only-link svg,
.icon-only-link svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trash-glyph {
    display: block;
    font-size: 18px;
    line-height: 1;
}

.account-actions a.danger-link.icon-only-link {
    color: #b91c1c;
}

.account-actions a.danger-link.icon-only-link:hover {
    color: #991b1b;
    background: #ffe4e6;
    border-color: #fda4af;
    text-decoration: none;
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 20px);
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
    }

    .cabinet-page h1 {
        font-size: 28px;
    }

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

    .receipt-panel {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .receipt-preview {
        padding: 6px;
        border-radius: 14px;
    }

    .receipt-meta {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        gap: 12px;
    }

    .receipt-link {
        width: 100%;
    }

    .section-toolbar {
        justify-content: flex-start;
        margin-top: 4px;
    }

    button.collapse-all-toggle {
        justify-content: flex-start;
    }

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

    .collapsible-card > button.card-toggle h2 {
        font-size: 16px;
    }

    .cabinet-page {
        padding: 20px 0 32px;
    }

    .cabinet-top {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 18px;
    }

    .cabinet-top > div:first-child {
        max-width: none;
    }

    .cabinet-actions .btn {
        width: 100%;
    }

    .accounts-list {
        margin-top: 16px;
    }

    .data-grid div {
        padding: 14px;
    }
}

.cabinet-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px 40px;
    margin-bottom: 28px;
}

.cabinet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, max-content));
    justify-content: end;
    gap: 12px;
}

.cabinet-top > div:first-child {
    max-width: 560px;
}

.cabinet-actions .btn {
    text-align: center;
}

.cabinet-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.cabinet-nav {
    gap: 18px;
}

.cabinet-nav a {
    position: relative;
    font-size: 15px;
    font-weight: 700;
}

.cabinet-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: rgba(var(--cp-rgb), 0.28);
    transform: scaleX(0);
    transform-origin: 50% 50%;
    transition: transform 0.2s ease;
}

.cabinet-nav a:hover::after {
    transform: scaleX(1);
}

.cabinet-header-tools .theme-toggle {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--cp-hv);
}

.accounts-list {
    margin-top: 24px;
}

.accounts-table {
    width: 100%;
}

.accounts-row {
    display: grid;
    grid-template-columns: 180px 1fr 140px 180px;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.accounts-head {
    font-weight: 700;
    color: var(--cp);
}

.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.status.active {
    background: var(--cp-lt);
    color: var(--cp);
}

.account-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.account-actions a {
    color: var(--cp);
    font-weight: 700;
    text-decoration: none;
}

.account-actions a:hover {
    text-decoration: underline;
}

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

    .cabinet-actions {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .accounts-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .accounts-head {
        display: none;
    }
}
.notice-alert {
    padding: 16px 20px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    margin-bottom: 24px;
    font-weight: 700;
}

.snapshot-warning {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8e8;
    border: 1px solid #f7d9a6;
    color: #9a3412;
    line-height: 1.5;
    font-weight: 600;
}

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

.data-grid div {
    background: #f8fafc;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.data-tile {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(var(--cp-rgb), 0.08), transparent 34%),
        linear-gradient(180deg, #fbfdff, #f8fafc);
}

.data-tile::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--cp);
    background: rgba(var(--cp-rgb), 0.09);
    box-shadow: inset 0 0 0 1px rgba(var(--cp-rgb), 0.08);
}

.tile-status::before {
    content: "✓";
}

.tile-meter::before {
    content: "#";
}

.tile-model::before {
    content: "M";
}

.tile-serial::before {
    content: "S";
}

.tile-unit::before {
    content: "U";
}

.tile-reading::before {
    content: "kW";
    font-size: 13px;
}

.tile-heat-debt::before,
.tile-abon-debt::before,
.tile-total-debt::before {
    content: "₴";
}

.tile-reading-accent {
    border-color: rgba(var(--cp-rgb), 0.22) !important;
    background:
        radial-gradient(circle at top right, rgba(var(--cp-rgb), 0.12), transparent 38%),
        linear-gradient(180deg, #faf8ff, var(--cp-bg)) !important;
}

.tile-debt-accent {
    border-color: rgba(180, 83, 9, 0.22) !important;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 38%),
        linear-gradient(180deg, #fffdfa, #fff8ef) !important;
}

.data-grid span {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
    padding-right: 48px;
}

.data-grid strong {
    color: #1f2933;
    font-size: 18px;
    line-height: 1.3;
}

.notifications-list {
    display: grid;
    gap: 16px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.notification-item.unread {
    background: var(--cp-hv);
    border-color: var(--cp-bd);
}

.notification-item h3 {
    margin: 0 0 8px;
    color: var(--cp);
}

.notification-item p {
    margin: 0 0 8px;
    color: #52616b;
}

.notification-account {
    font-weight: 700;
    color: #1f2933 !important;
}

.notification-item a {
    white-space: nowrap;
    color: var(--cp);
    font-weight: 700;
    text-decoration: none;
}

.notification-item a:hover {
    text-decoration: underline;
}

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

    .notification-item {
        flex-direction: column;
    }
}

.account-actions a.danger-link {
    color: #b91c1c;
}

.account-actions a.danger-link:hover {
    color: #7f1d1d;
}

/* ── Announcement banners ───────────────────────────────────────── */

.ann {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ann-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.ann-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1;
}

.ann-text {
    flex: 1;
}

.ann-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
}

.ann-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

.ann--info    { background: #eff6ff; color: #1e40af; border-bottom-color: rgba(30,  64, 175, 0.12); }
.ann--warning { background: #fffbeb; color: #92400e; border-bottom-color: rgba(146, 64,  14, 0.12); }
.ann--danger  { background: #fef2f2; color: #991b1b; border-bottom-color: rgba(153, 27,  27, 0.12); }

html[data-theme="dark"] .ann--info    { background: #0d1d3a; color: #93c5fd; border-bottom-color: rgba(147, 197, 253, 0.1); }
html[data-theme="dark"] .ann--warning { background: #211a04; color: #fcd34d; border-bottom-color: rgba(252, 211,  77, 0.1); }
html[data-theme="dark"] .ann--danger  { background: #1f0a0a; color: #fca5a5; border-bottom-color: rgba(252, 165, 165, 0.1); }

html[data-theme="dark"] .ann-close:hover { background: rgba(255, 255, 255, 0.08); }

/* ── Test mode banner ───────────────────────────────────────────── */

.test-mode-bar {
    background: #fef3c7;
    color: #78350f;
    border-bottom: 1px solid rgba(120, 53, 15, 0.15);
    transition: background 0.2s;
}

.test-mode-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    transition: padding 0.2s;
}

.test-mode-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.test-mode-link {
    flex-shrink: 0;
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
}

.test-mode-link:hover {
    opacity: 0.8;
}

.test-mode-toggle {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s, transform 0.2s;
}

.test-mode-toggle:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
}

html[data-theme="dark"] .test-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.test-mode-bar.is-collapsed .test-mode-text {
    display: none;
}

.test-mode-bar.is-collapsed .test-mode-inner {
    padding: 2px 0;
}

.test-mode-bar.is-collapsed .test-mode-toggle svg {
    transform: rotate(180deg);
}

html[data-theme="dark"] .test-mode-bar {
    background: var(--cp-grad, var(--cp));
    color: #fde68a;
    border-bottom-color: rgba(253, 230, 138, 0.12);
}

/* ────────────────────────────────────────────────────────────────── */

.site-header {
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid transparent;
    background-clip: padding-box;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 0 rgba(var(--cp-rgb), 0.15), 0 4px 20px rgba(var(--cp-rgb), 0.06);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.brand-title {
    font-weight: 800;
    font-size: 22px;
    background: var(--cp-grad, var(--cp));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.brand-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 3px;
}

.brand-link {
    color: inherit;
    text-decoration: none;
}

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

.cabinet-hero {
    padding: 80px 0 0;
    background:
        radial-gradient(ellipse at 75% 30%, rgba(var(--cp-md-rgb), 0.09) 0%, transparent 55%),
        radial-gradient(ellipse at top left, rgba(var(--cp-rgb), 0.13) 0%, transparent 45%),
        linear-gradient(to bottom, var(--cp-bg) 0%, #ffffff 100%);
}

.cabinet-hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 420px;
    gap: 48px;
    align-items: center;
}

.hero-info h1 {
    font-size: 46px;
    line-height: 1.12;
    margin: 0 0 20px;
    color: #1f2933;
}

.hero-info p {
    font-size: 19px;
    line-height: 1.6;
    color: #52616b;
    max-width: 720px;
}

.info-note {
    margin-top: 24px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 16px 18px;
    border-radius: 14px;
    font-weight: 600;
}

.auth-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.auth-card h2 {
    margin-top: 0;
    color: var(--cp);
}

.auth-card p {
    color: #52616b;
    line-height: 1.5;
}

.auth-card label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5df;
    border-radius: 10px;
    font-size: 16px;
}

.auth-card button {
    width: 100%;
    margin-top: 22px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--cp);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-bottom {
    margin-top: 18px;
    color: #52616b;
}

.auth-bottom a {
    color: var(--cp);
    font-weight: 700;
    text-decoration: none;
}

.btn.full {
    width: 100%;
    text-align: center;
}

.quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 56px 0 24px;
}

.info-card,
.details-card,
.important-info {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.info-card h2,
.details-card h2,
.important-info h2 {
    margin-top: 0;
    color: var(--cp);
}

.info-card p,
.details-card p,
.important-info p {
    color: #52616b;
    line-height: 1.55;
}

.info-card a {
    color: var(--cp);
    font-weight: 700;
    text-decoration: none;
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--cp-b2);
    background: var(--cp-bg);
    color: var(--cp) !important;
    font-weight: 600;
    text-decoration: none !important;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.utility-link svg {
    flex-shrink: 0;
    margin-right: 6px;
}

.utility-link:hover {
    background: var(--cp-hv);
    border-color: var(--cp-bd);
    box-shadow: 0 8px 18px rgba(var(--cp-rgb), 0.12);
    transform: translateY(-1px);
}

.info-card h2,
.details-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.info-row > svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

.contacts-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
    align-items: start;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contacts-map-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
    position: sticky;
    top: 80px;
}

.contacts-map-wrapper iframe {
    width: 100%;
    height: 520px;
    display: block;
    border: 0;
}

.details-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0 64px;
}

.copy-line {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px dashed var(--cp);
    background: var(--cp-hv);
    color: var(--cp-dk);
    font-weight: 700;
    cursor: pointer;
    line-height: 1.5;
}

.copy-line:hover {
    background: #f3e8ff;
}

.details-card-accent,
.info-panel-accent {
    background: linear-gradient(135deg, var(--cp-bg), #ffffff);
    border: 1px solid var(--cp-b2);
}

.quick-pay-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 10px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--cp-grad, var(--cp));
    color: #ffffff !important;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 4px 14px var(--cp-glow, rgba(0,0,0,0.2));
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quick-pay-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.18) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: -100% 0;
    transition: background-position 0.55s ease;
    pointer-events: none;
}

.quick-pay-link:hover::after {
    background-position: 200% 0;
}

/* ── Active nav link ──────────────────────────────────────────────── */
.nav a.nav-active {
    background: var(--cp-grad, var(--cp));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    position: relative;
}
.nav a.nav-active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0; right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--cp-grad, var(--cp));
}

/* ── Back to top ──────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--cp-grad, var(--cp));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s, box-shadow 0.25s;
    z-index: 900;
    box-shadow: 0 4px 18px var(--cp-glow, rgba(0,0,0,0.3));
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    box-shadow: 0 6px 28px var(--cp-glow, rgba(0,0,0,0.4)), 0 0 20px var(--cp-glow2, transparent);
    transform: translateY(-2px);
}

/* ── Pagination ───────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 28px 0 48px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--cp-b2);
    background: var(--cp-bg);
    color: var(--cp);
    transition: background 0.15s, border-color 0.15s;
}

.pagination a:hover {
    background: var(--cp-hv);
    border-color: var(--cp-bd);
}

.pagination span.current {
    background: var(--cp);
    color: #fff;
    border-color: var(--cp);
}

.pagination span.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 0;
}

.faq-item {
    border: 1px solid var(--cp-b2);
    border-radius: 12px;
    overflow: hidden;
    background: var(--cp-bg);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color 0.15s;
}

.faq-question:hover {
    color: var(--cp);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 15px;
    line-height: 1.75;
    border-top: 0 solid var(--cp-b2);
}

.faq-item.open .faq-answer {
    padding: 14px 20px 18px;
    max-height: 800px;
    border-top: 1px solid var(--cp-b2);
}

.faq-chevron {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.3s;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--cp);
}

/* ── Contact / Connection forms ───────────────────────────────────── */
.form-page-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    padding-bottom: 64px;
    align-items: start;
}

.form-card {
    background: var(--cp-bg);
    border: 1px solid var(--cp-b2);
    border-radius: 16px;
    padding: 28px 28px 32px;
}

.form-side-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}

.form-required {
    color: #ef4444;
}

.form-input,
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--cp-b2);
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    color: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--cp);
    box-shadow: 0 0 0 3px rgba(var(--cp-rgb), 0.12);
}

.form-group--error .form-input,
.form-group--error input,
.form-group--error textarea {
    border-color: #ef4444;
}

.form-error {
    font-size: 13px;
    color: #ef4444;
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    text-align: center;
    color: var(--cp);
}

.form-success svg {
    opacity: 0.8;
}

.form-success p {
    font-size: 16px;
    font-weight: 600;
}

/* ── About page ───────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    padding-bottom: 64px;
    align-items: start;
}

.about-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
}

.about-list li svg {
    flex-shrink: 0;
    color: var(--cp);
    margin-top: 3px;
}

.about-list.numbered {
    list-style: decimal;
    padding-left: 20px;
}

.about-list.numbered li {
    display: list-item;
}

/* ── Contacts map full-width ──────────────────────────────────────── */
.contacts-map-section {
    padding-bottom: 32px;
}

/* ── Mobile responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .about-grid,
    .form-page-grid {
        grid-template-columns: 1fr;
    }

    .about-side,
    .form-side-info {
        position: static;
    }
}

.quick-pay-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 6px 18px var(--cp-glow, rgba(0,0,0,0.25));
}

.important-info {
    margin-bottom: 24px;
}

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

.important-grid > div {
    background: #f8fafc;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
}

.info-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.important-grid h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1f2933;
}

.important-grid p {
    margin: 0 0 10px;
    line-height: 1.45;
}

.important-grid p:last-of-type {
    margin-bottom: 0;
}

.important-grid a {
    color: var(--cp);
    font-weight: 700;
    text-decoration: none;
}

.important-grid a:hover {
    text-decoration: underline;
}

.important-grid .copy-line {
    margin-top: 6px;
}

@media (max-width: 900px) {
    .cabinet-hero-grid,
    .quick-info,
    .contacts-main,
    .details-section,
    .important-grid {
        grid-template-columns: 1fr;
    }

    .contacts-map-wrapper {
        position: static;
    }

    .contacts-map-wrapper iframe {
        height: 320px;
    }

    .hero-info h1 {
        font-size: 34px;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .footer-inner {
        flex-direction: column;       
    }
}

.public-nav {
    flex: 1;
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

.header .cabinet-nav {
    flex: 1;
}


.public-hero {
    padding-bottom: 72px;
}

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

.hero-actions .btn {
    min-width: 170px;
    text-align: center;
}

.hero-side-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(var(--cp-md-rgb), 0.35);
}

.hero-side-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--cp);
}

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

.utility-link.wide {
    width: 100%;
    justify-content: flex-start;
}

.news-home-section,
.page-section {
    padding: 12px 0 64px;
}

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

.section-head h2,
.page-hero h1,
.article-shell h1 {
    margin: 8px 0 0;
    font-size: clamp(22px, 3.5vw + 8px, 40px);
    line-height: 1.15;
}

.badge-small {
    margin-bottom: 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card,
.doc-card,
.vacancy-card,
.empty-public-card,
.article-shell {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(var(--cp-md-rgb), 0.2);
}

.news-card {
    overflow: hidden;
}

.news-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    background: #f0ecff;
}

.news-card-image img,
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-body,
.doc-card,
.vacancy-card,
.empty-public-card {
    padding: 22px;
}

.news-date {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.news-card h3,
.doc-card h3,
.vacancy-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.25;
}

.news-card h3 a,
.vacancy-card h3 a {
    color: #1f2933;
    text-decoration: none;
}

.news-card p,
.doc-card p,
.vacancy-card p,
.page-hero p,
.article-lead,
.article-content {
    color: #374151;
    line-height: 1.65;
}

.richtext-content > *:first-child {
    margin-top: 0;
}

.richtext-content > *:last-child {
    margin-bottom: 0;
}

.richtext-content ul,
.richtext-content ol {
    margin: 0 0 16px 22px;
    padding: 0;
}

.richtext-content blockquote {
    margin: 16px 0;
    padding: 10px 0 10px 16px;
    border-left: 3px solid rgba(var(--cp-rgb), 0.28);
    color: #52616b;
    font-style: italic;
}

.richtext-content.compact p,
.richtext-content.compact ul,
.richtext-content.compact ol,
.richtext-content.compact blockquote {
    margin-bottom: 12px;
}

.news-link,
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cp);
    font-weight: 800;
    text-decoration: none;
}

.page-hero {
    padding: 56px 0 24px;
}

.page-copy {
    margin-top: 18px;
}

.doc-grid,
.vacancy-list {
    display: grid;
    gap: 18px;
}

.vacancy-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.vacancy-salary {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--cp-hv);
    color: var(--cp);
    font-weight: 800;
}

.vacancy-salary.large {
    display: inline-flex;
    margin: 14px 0 10px;
}

.article-shell {
    padding: 34px;
    margin: 56px auto 64px;
}

.article-image {
    margin: 24px 0;
    overflow: hidden;
    border-radius: 20px;
}

/* ── News videos ── */
.news-videos {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0 8px;
}
.news-video {
    margin: 0;
}
.news-video__embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}
.news-video__embed iframe,
.news-video__embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.news-video__embed--raw {
    position: static;
    padding-top: 0;
    background: none;
    border-radius: 14px;
    overflow: hidden;
}
.news-video__embed--raw iframe {
    position: static;
    width: 100%;
    min-height: 400px;
    height: auto;
    border: none;
    border-radius: 14px;
}
.news-video__caption {
    margin-top: 8px;
    font-size: .85rem;
    color: #6b7280;
    text-align: center;
}

/* ── News gallery ── */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 32px 0 8px;
}
.news-gallery__item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: var(--surface2, #f0f0f0);
    aspect-ratio: 4/3;
    text-decoration: none;
}
.news-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.news-gallery__item:hover img {
    transform: scale(1.04);
}
.news-gallery__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 6px 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .78rem;
    line-height: 1.3;
}

.article-content p {
    margin: 0 0 16px;
}

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

    .section-head,
    .vacancy-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-head h2,
    .page-hero h1,
    .article-shell h1 {
        font-size: clamp(20px, 5.5vw, 32px);
    }

    .article-shell {
        padding: 22px;
    }
}

@media (max-width: 768px) {
    .brand-title {
        font-size: 17px;
        line-height: 1.2;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .cabinet-hero {
        padding: 56px 0;
    }

    .hero-info h1 {
        font-size: 30px;
        line-height: 1.12;
        margin-bottom: 16px;
    }

    .hero-info p {
        font-size: 17px;
        line-height: 1.55;
    }

    .hero-actions {
        gap: 10px;
    }

    .hero-actions .btn {
        min-width: 0;
        padding: 13px 18px;
    }
}

html[data-theme="dark"] body {
    background: #0a0a14;
    color: #e5edf5;
}

html[data-theme="dark"] .header,
html[data-theme="dark"] .site-header {
    background: rgba(10, 10, 20, 0.88);
    border-bottom: 1px solid rgba(var(--cp-rgb), 0.2);
    box-shadow: 0 1px 0 rgba(var(--cp-rgb), 0.2), 0 4px 30px rgba(var(--cp-rgb), 0.08);
}

html[data-theme="dark"] .site-header .public-nav,
html[data-theme="dark"] .header .cabinet-nav {
    border-top-color: rgba(34, 50, 67, 0.8);
}

html[data-theme="dark"] .footer {
    background: #0b1118;
}

html[data-theme="dark"] .nav a,
html[data-theme="dark"] .logo,
html[data-theme="dark"] .brand-link,
html[data-theme="dark"] .hero-info h1,
html[data-theme="dark"] .card-toggle h2,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .news-card h3 a,
html[data-theme="dark"] .vacancy-card h3 a,
html[data-theme="dark"] .article-shell h1,
html[data-theme="dark"] .page-hero h1,
html[data-theme="dark"] .cabinet-page h1,
html[data-theme="dark"] .login-box h1,
html[data-theme="dark"] .auth-card h2,
html[data-theme="dark"] .info-card h2,
html[data-theme="dark"] .details-card h2,
html[data-theme="dark"] .important-info h2,
html[data-theme="dark"] .important-grid h3,
html[data-theme="dark"] .notification-item h3,
html[data-theme="dark"] .card h2 {
    color: #f5fbff;
}

html[data-theme="dark"] .brand-subtitle,
html[data-theme="dark"] .hero-info p,
html[data-theme="dark"] .page-hero p,
html[data-theme="dark"] .news-card p,
html[data-theme="dark"] .doc-card p,
html[data-theme="dark"] .vacancy-card p,
html[data-theme="dark"] .article-lead,
html[data-theme="dark"] .article-content,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .info-card p,
html[data-theme="dark"] .details-card p,
html[data-theme="dark"] .important-info p,
html[data-theme="dark"] .login-box p,
html[data-theme="dark"] .news-date,
html[data-theme="dark"] .page-copy,
html[data-theme="dark"] .auth-bottom,
html[data-theme="dark"] label,
html[data-theme="dark"] .profile-card p,
html[data-theme="dark"] .notification-item p,
html[data-theme="dark"] .notification-item small,
html[data-theme="dark"] .accounts-row div,
html[data-theme="dark"] .data-grid span,
html[data-theme="dark"] .important-grid div,
html[data-theme="dark"] .receipt-panel p {
    color: #9fb0bf;
}

html[data-theme="dark"] .profile-card strong,
html[data-theme="dark"] .accounts-row strong,
html[data-theme="dark"] .data-grid strong,
html[data-theme="dark"] .notification-account,
html[data-theme="dark"] .important-grid strong,
html[data-theme="dark"] .receipt-panel strong,
html[data-theme="dark"] .copy-line,
html[data-theme="dark"] .quick-pay-link {
    color: #f5fbff !important;
}

html[data-theme="dark"] .cabinet-hero,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .public-hero,
html[data-theme="dark"] .cabinet-page,
html[data-theme="dark"] .login-page {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(var(--cp-md-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(var(--cp-rgb), 0.12) 0%, transparent 45%),
        radial-gradient(circle at top left, var(--dp-hero), transparent 38%),
        linear-gradient(150deg, #0a0a14 0%, #0e0a1c 60%, #0a1018 100%);
}

html[data-theme="dark"] .badge {
    background: var(--cp-grad, var(--dp-badge-bg));
    color: #fff;
    box-shadow: 0 0 16px var(--cp-glow, rgba(0,0,0,0)), 0 0 40px var(--cp-glow2, rgba(0,0,0,0));
}

html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .login-box,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .details-card,
html[data-theme="dark"] .important-info,
html[data-theme="dark"] .hero-side-card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .doc-card,
html[data-theme="dark"] .vacancy-card,
html[data-theme="dark"] .empty-public-card,
html[data-theme="dark"] .article-shell,
html[data-theme="dark"] .important-grid > div,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .meter-card,
html[data-theme="dark"] .receipt-card,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .accounts-table,
html[data-theme="dark"] .copy-line {
    background: rgba(18, 14, 36, 0.9);
    border-color: rgba(var(--cp-rgb), 0.14);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--cp-rgb), 0.08);
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .news-card:hover,
html[data-theme="dark"] .doc-card:hover,
html[data-theme="dark"] .vacancy-card:hover {
    border-color: rgba(var(--cp-rgb), 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px var(--cp-glow2, rgba(0,0,0,0)), 0 0 0 1px rgba(var(--cp-rgb), 0.2);
}

html[data-theme="dark"] .copy-line {
    color: var(--dp-cpy-tx);
    background: var(--dp-cpy-bg);
}

html[data-theme="dark"] .cabinet-nav a {
    color: #d6e3ee;
}

html[data-theme="dark"] .cabinet-nav a::after {
    background: var(--dp-nav);
}

html[data-theme="dark"] .notification-item {
    background: #182531;
}

html[data-theme="dark"] .notification-item.unread {
    background: linear-gradient(135deg, var(--dp-unr-bg), rgba(24, 37, 49, 1));
    border-color: var(--dp-unr-bd);
}

html[data-theme="dark"] .important-grid > div,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .details-card,
html[data-theme="dark"] .info-card {
    color: #d7e3ed;
}

html[data-theme="dark"] .data-grid div,
html[data-theme="dark"] .data-tile {
    background:
        radial-gradient(circle at top right, var(--dp-tile), transparent 34%),
        linear-gradient(180deg, #192532, #16212c) !important;
    border-color: #2a3d50 !important;
}

html[data-theme="dark"] .data-tile::before {
    color: var(--dp);
    background: var(--dp-tile-ic);
    box-shadow: inset 0 0 0 1px var(--dp-tile-ib);
}

html[data-theme="dark"] .tile-reading-accent {
    background:
        radial-gradient(circle at top right, var(--dp-tile-ra), transparent 38%),
        linear-gradient(180deg, var(--dp-cpy-bg), #16212c) !important;
}

html[data-theme="dark"] .tile-debt-accent {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 38%),
        linear-gradient(180deg, #2a2318, #16212c) !important;
    border-color: rgba(245, 158, 11, 0.24) !important;
}

html[data-theme="dark"] .receipt-meta {
    background: #16212c;
    border-color: #2a3d50;
}

html[data-theme="dark"] .receipt-meta p {
    color: #c7d5df;
}

html[data-theme="dark"] .receipt-link {
    background: #1f3142;
    border-color: #35506a;
    color: #f3f9ff !important;
}

html[data-theme="dark"] .receipt-link:hover {
    background: #274058;
    border-color: #496a89;
}

html[data-theme="dark"] .account-actions a.danger-link.icon-only-link {
    color: #ff8f8f !important;
    background: #2a171c;
    border-color: #6b2d36;
}

html[data-theme="dark"] .account-actions a.danger-link.icon-only-link:hover {
    color: #ffb4b4 !important;
    background: #351d24;
    border-color: #94424f;
}

html[data-theme="dark"] .accounts-row,
html[data-theme="dark"] .accounts-head,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .card-content,
html[data-theme="dark"] .receipt-frame,
html[data-theme="dark"] .news-card-image {
    border-color: #263849;
}

html[data-theme="dark"] .accounts-head div,
html[data-theme="dark"] .section-toolbar,
html[data-theme="dark"] button.collapse-all-toggle,
html[data-theme="dark"] .card-toggle-icon {
    color: var(--dp-mu);
    border-color: var(--dp-mu);
}

html[data-theme="dark"] .collapsible-card > button.card-toggle:hover h2,
html[data-theme="dark"] .collapsible-card > button.card-toggle:hover .card-toggle-icon,
html[data-theme="dark"] button.collapse-all-toggle:hover {
    color: var(--dp);
    border-color: var(--dp);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #0f1720;
    color: #edf5fb;
    border: 1px solid #32475b;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #7f94a7;
}

html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .utility-link,
html[data-theme="dark"] .theme-toggle {
    background: #182531;
    color: var(--dp-cpy-tx) !important;
    border-color: #2f4658;
}

html[data-theme="dark"] .btn.secondary:hover,
html[data-theme="dark"] .utility-link:hover,
html[data-theme="dark"] .theme-toggle:hover {
    background: #223243;
    border-color: #436079;
}

html[data-theme="dark"] .theme-toggle-icon--sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle-icon--moon {
    display: inline-flex;
    flex: 0 0 auto;
    color: #fbbf24;
}

html[data-theme="dark"] .status {
    background: #283647;
    color: #dbe7f3;
}

html[data-theme="dark"] .status.active {
    background: var(--dp-act-bg);
    color: var(--dp);
}

html[data-theme="dark"] .danger-link,
html[data-theme="dark"] .news-link,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .info-card a,
html[data-theme="dark"] .important-grid a,
html[data-theme="dark"] .auth-bottom a,
html[data-theme="dark"] .login-box a,
html[data-theme="dark"] .notification-item a,
html[data-theme="dark"] .account-actions a {
    color: var(--dp-lk) !important;
}

html[data-theme="dark"] .footer-copy {
    color: rgba(236, 244, 250, 0.72);
}

html[data-theme="dark"] .footer-dev-by {
    color: rgba(255, 255, 255, 0.28);
}

html[data-theme="dark"] .form-card,
html[data-theme="dark"] .faq-item {
    background: #182531;
    border-color: #223243;
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea,
html[data-theme="dark"] .contact-form select {
    background: #0f1a24;
    border-color: #223243;
    color: #e2eaf4;
}

html[data-theme="dark"] .faq-question:hover {
    color: var(--dp);
}

html[data-theme="dark"] .faq-item.open .faq-chevron {
    color: var(--dp);
}

html[data-theme="dark"] .social-icon {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .social-icon:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ── Palette switcher ─────────────────────────────── */
/* Desktop: toggle + palette grouped in .header-controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.palette-switcher {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.palette-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pal-color);
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.palette-btn[data-palette="violet"] { --pal-color: #6d28d9; }
.palette-btn[data-palette="blue"]   { --pal-color: #2563eb; }
.palette-btn[data-palette="green"]  { --pal-color: #1d6f42; }

.palette-btn.active-palette {
    border-color: transparent;
    box-shadow: 0 0 0 1.5px #fff, 0 0 0 3.5px var(--pal-color);
    transform: scale(1.2);
}

.palette-btn:hover:not(.active-palette) {
    transform: scale(1.15);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.18);
}


/* -- Connection Process Steps ----------------------------------- */
.conn-process { margin: 8px 0 0; }
.conn-process-title { font-size: 18px; margin: 0 0 4px; }
.conn-process-sub { color: #64748b; font-size: 13.5px; margin: 0 0 28px; }

.conn-steps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    position: relative;
}
.conn-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 6px;
    position: relative;
}
.conn-step + .conn-step::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 0;
    width: 50%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
    transform: translateX(-50%);
}
.conn-step::after {
    content: '';
    position: absolute;
    top: 21px;
    right: 0;
    width: 50%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
    transform: translateX(50%);
}
.conn-step:first-child::before,
.conn-step:last-child::after { display: none; }
.conn-step--us + .conn-step--us::before,
.conn-step--us::after { background: var(--cp-b2); }
.conn-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    font-weight: 800;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}
.conn-step--us .conn-step-num { background: var(--cp); border-color: var(--cp); color: #fff; }
.conn-step-title { font-size: 12.5px; font-weight: 700; color: #1e293b; margin-bottom: 4px; line-height: 1.35; }
.conn-step--customer .conn-step-title { color: #64748b; }
.conn-step-sub { font-size: 11px; color: #94a3b8; line-height: 1.4; margin-bottom: 8px; flex: 1; }
.conn-step-actor {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; padding: 2px 8px; border-radius: 4px;
    display: inline-block; white-space: nowrap;
}
.conn-step--us .conn-step-actor { background: var(--cp-lt); color: var(--cp-dk); }
.conn-step--customer .conn-step-actor { background: #f1f5f9; color: #64748b; }

.conn-steps-legend {
    display: flex; gap: 20px; justify-content: center;
    margin-top: 20px; flex-wrap: wrap;
}
.conn-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #64748b; }
.conn-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.conn-legend-dot--us { background: var(--cp); }
.conn-legend-dot--customer { background: #cbd5e1; }

.conn-notice {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--cp-bg); border: 1px solid var(--cp-b2);
    border-radius: 10px; padding: 14px 16px;
    font-size: 13.5px; color: #374151; margin-top: 28px; line-height: 1.55;
}
.conn-notice svg { flex-shrink: 0; margin-top: 2px; color: var(--cp); }

/* -- Form type selector cards ----------------------------------- */
.form-type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.form-type-card {
    border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px;
    cursor: pointer; transition: border-color .15s, background .15s;
    display: flex; align-items: flex-start; gap: 12px;
    background: #fff; text-align: left; font: inherit;
}
.form-type-card:hover { border-color: var(--cp-bd); background: var(--cp-hv); }
.form-type-card.selected { border-color: var(--cp); background: var(--cp-bg); }
.form-type-card-icon {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px;
    background: var(--cp-lt); display: flex; align-items: center;
    justify-content: center; color: var(--cp);
}
.form-type-card.selected .form-type-card-icon { background: var(--cp); color: #fff; }
.form-type-card-label { font-weight: 700; font-size: 13.5px; color: #1e293b; display: block; margin-bottom: 3px; }
.form-type-card-desc { font-size: 11.5px; color: #64748b; display: block; }

.form-card-title { font-size: 18px; margin: 0 0 4px; }
.form-card-sub { font-size: 13px; color: #64748b; margin: 0 0 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* -- Documents checklist --------------------------------------- */
.docs-checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.docs-checklist li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #374151; line-height: 1.5; }
.docs-checklist li svg { flex-shrink: 0; margin-top: 2px; color: var(--cp); }

/* -- Dark mode ------------------------------------------------- */
html[data-theme=dark] .conn-step-num { background: #1e293b; border-color: #334155; color: #475569; }
html[data-theme=dark] .conn-step--us .conn-step-num { background: var(--cp); border-color: var(--cp); color: #fff; }
html[data-theme=dark] .conn-step + .conn-step::before,
html[data-theme=dark] .conn-step::after { background: #1e293b; }
html[data-theme=dark] .conn-step--us + .conn-step--us::before,
html[data-theme=dark] .conn-step--us::after { background: rgba(var(--cp-rgb),.25); }
html[data-theme=dark] .conn-step-title { color: #e2e8f0; }
html[data-theme=dark] .conn-step--customer .conn-step-title { color: #475569; }
html[data-theme=dark] .conn-step--us .conn-step-actor { background: rgba(var(--cp-rgb),.18); color: var(--cp-md); }
html[data-theme=dark] .conn-step--customer .conn-step-actor { background: #1e293b; color: #475569; }
html[data-theme=dark] .conn-legend-dot--customer { background: #334155; }
html[data-theme=dark] .conn-notice { background: rgba(var(--cp-rgb),.08); border-color: rgba(var(--cp-rgb),.2); color: #94a3b8; }
html[data-theme=dark] .form-type-card { background: #1e293b; border-color: #334155; }
html[data-theme=dark] .form-type-card:hover { border-color: var(--cp-bd); background: rgba(var(--cp-rgb),.1); }
html[data-theme=dark] .form-type-card.selected { border-color: var(--cp); background: rgba(var(--cp-rgb),.12); }
html[data-theme=dark] .form-type-card-label { color: #e2e8f0; }
html[data-theme=dark] .form-type-card-icon { background: rgba(var(--cp-rgb),.18); }
html[data-theme=dark] .form-type-card.selected .form-type-card-icon { background: var(--cp); }
html[data-theme=dark] .docs-checklist li { color: #94a3b8; }

/* -- Responsive ------------------------------------------------ */
@media (max-width: 900px) {
    .conn-steps { grid-template-columns: repeat(3, 1fr); gap: 20px 0; }
    .conn-step::after, .conn-step + .conn-step::before { display: none; }
    .form-type-selector { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .conn-steps { grid-template-columns: repeat(2, 1fr); }
}


/* -- Connection Status Tracker --------------------------------- */
.cstatus-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.cstatus-main,
.cstatus-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cstatus-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cstatus-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
}

.cstatus-connector {
    width: 2px;
    height: 20px;
    background: #e2e8f0;
    margin-left: 21px;
    flex-shrink: 0;
}

.cstatus-connector--done { background: #22c55e; }

.cstatus-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.cstatus-step--done .cstatus-step-circle {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.cstatus-step--active .cstatus-step-circle {
    background: var(--cp);
    border-color: var(--cp);
    color: #fff;
}

.cstatus-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--cp);
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { opacity: .6; transform: scale(1); }
    100% { opacity: 0;  transform: scale(1.5); }
}

.cstatus-step-body { flex: 1; padding-top: 10px; }

.cstatus-step-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    margin-bottom: 2px;
}

.cstatus-step--active .cstatus-step-num { color: var(--cp); }
.cstatus-step--done .cstatus-step-num { color: #22c55e; }

.cstatus-step-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.cstatus-step--pending .cstatus-step-name { color: #94a3b8; font-weight: 600; }

.cstatus-step-note {
    font-size: 13px;
    color: #374151;
    margin-top: 6px;
    background: var(--cp-bg);
    border-left: 3px solid var(--cp);
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}

.cstatus-step-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.cstatus-done-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
    margin-top: 16px;
}

/* Tracking URL box */
.tracking-url-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    word-break: break-all;
}

.tracking-url-text { flex: 1; color: var(--cp); font-weight: 600; }

.copy-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 2px;
    display: flex;
    transition: color .15s;
}

.copy-btn:hover { color: var(--cp); }

/* Success box */
.tracking-info-box {
    background: var(--cp-bg);
    border: 1px solid var(--cp-b2);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 0;
    text-align: left;
}

.tracking-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
}

.tracking-info-label svg { flex-shrink: 0; color: var(--cp); }

.tracking-url-link {
    font-size: 12.5px;
    color: var(--cp);
    word-break: break-all;
    font-weight: 600;
}

/* Dark mode */
html[data-theme=dark] .cstatus-step-circle { background: #1e293b; border-color: #334155; color: #475569; }
html[data-theme=dark] .cstatus-step--done .cstatus-step-circle { background: #16a34a; border-color: #16a34a; color: #fff; }
html[data-theme=dark] .cstatus-step--active .cstatus-step-circle { background: var(--cp); border-color: var(--cp); color: #fff; }
html[data-theme=dark] .cstatus-connector { background: #1e293b; }
html[data-theme=dark] .cstatus-connector--done { background: #16a34a; }
html[data-theme=dark] .cstatus-step-name { color: #e2e8f0; }
html[data-theme=dark] .cstatus-step--pending .cstatus-step-name { color: #475569; }
html[data-theme=dark] .cstatus-step-note { background: rgba(var(--cp-rgb),.1); color: #94a3b8; }
html[data-theme=dark] .cstatus-done-banner { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); color: #4ade80; }
html[data-theme=dark] .tracking-url-box { background: #0f172a; border-color: #1e293b; }
html[data-theme=dark] .tracking-info-box { background: rgba(var(--cp-rgb),.08); border-color: rgba(var(--cp-rgb),.2); }
html[data-theme=dark] .tracking-info-label { color: #94a3b8; }

/* Responsive */
@media (max-width: 900px) {
    .cstatus-grid { grid-template-columns: 1fr; }
}

/* ─── Staff / Team (about page) ───────────────────────── */

/* Shared avatar */
.person-avatar {
    width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
    background: rgba(var(--cp-rgb), .12); color: var(--cp);
    display: flex; align-items: center; justify-content: center;
}
.person-avatar--sm { width: 40px; height: 40px; }

/* Management — 3 centered cards */
.mgmt-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px;
}
.mgmt-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 20px 12px 16px; border: 1px solid var(--border); border-radius: 12px; gap: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.mgmt-card:hover { border-color: rgba(var(--cp-rgb), .4); box-shadow: 0 4px 16px rgba(var(--cp-rgb), .08); }
.mgmt-card-name { font-weight: 600; font-size: 13px; color: var(--text); line-height: 1.4; }
.mgmt-card-pos { font-size: 12px; color: var(--cp); font-weight: 500; }

/* Team — 2-col horizontal cards */
.team-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px;
}
.team-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    transition: border-color .15s;
}
.team-card:hover { border-color: rgba(var(--cp-rgb), .35); }
.team-card-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.3; }
.team-card-pos { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

@media (max-width: 900px) {
    .mgmt-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .mgmt-cards { grid-template-columns: 1fr; }
    .team-cards { grid-template-columns: 1fr; }
}

/* Dark mode */
html[data-theme=dark] .mgmt-card { border-color: #1e293b; }
html[data-theme=dark] .mgmt-card:hover { border-color: rgba(var(--cp-rgb), .4); }
html[data-theme=dark] .team-card { border-color: #1e293b; }
html[data-theme=dark] .team-card:hover { border-color: rgba(var(--cp-rgb), .35); }
html[data-theme=dark] .person-avatar { background: rgba(var(--cp-rgb), .18); }

/* ─── Blank download links (connection page) ──────────── */

.blank-download-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(var(--cp-rgb), .06);
    border: 1px solid rgba(var(--cp-rgb), .18);
    border-radius: 8px;
    color: var(--cp);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.blank-download-link:hover {
    background: rgba(var(--cp-rgb), .12);
    border-color: rgba(var(--cp-rgb), .35);
    text-decoration: none;
}
.blank-download-link svg { flex-shrink: 0; opacity: .8; }
.blank-ext { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; opacity: .7; }

html[data-theme=dark] .blank-download-link {
    background: rgba(var(--cp-rgb), .08);
    border-color: rgba(var(--cp-rgb), .22);
}

/* ─── Blank download links (connection page) ───────────── */

.blank-download-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cp);
    text-decoration: none;
    background: rgba(var(--cp-rgb), .04);
    transition: background .15s, border-color .15s;
}
.blank-download-link:hover {
    background: rgba(var(--cp-rgb), .1);
    border-color: var(--cp);
}
.blank-ext {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .04em;
}

html[data-theme=dark] .blank-download-link {
    background: rgba(var(--cp-rgb), .07);
    border-color: #1e293b;
}
html[data-theme=dark] .blank-download-link:hover { border-color: var(--cp); }

/* ─── Staff edit FAB ───────────────────────────────────── */

.staff-edit-fab {
    position: fixed;
    bottom: 72px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 12px;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
    opacity: .82;
    transition: opacity .15s, transform .15s, box-shadow .15s;
}
.staff-edit-fab:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,.45);
    color: #f8fafc;
    text-decoration: none;
}
.staff-edit-fab svg { flex-shrink: 0; }

html[data-theme=dark] .staff-edit-fab {
    background: #334155;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
}
