/* =========================================================
   TELESCHEDULE
   Design: Modern SaaS / Warm Editorial
   Palette: Deep Teal, Terracotta, Warm Cream
   ========================================================= */

/* 1. DESIGN TOKENS */

:root {
    color-scheme: light;

    --cream: #F6F1E8;
    --cream-light: #FCF9F3;
    --cream-dark: #EAE1D3;

    --teal: #173F3B;
    --teal-dark: #102F2C;
    --teal-medium: #285B54;
    --teal-soft: #E1ECE6;

    --terracotta: #B9674F;
    --terracotta-dark: #96513E;
    --terracotta-soft: #F2E0D7;

    --ink: #252E2B;
    --muted: #777C73;
    --muted-light: #96988E;

    --border: #E5DDD0;
    --white: #FFFFFF;

    --success: #39765B;
    --success-soft: #E1EEE5;

    --warning: #9A6B32;
    --warning-soft: #F4E9D7;

    --danger: #A34F43;
    --danger-soft: #F5E3DF;

    --sidebar-width: 252px;

    --radius-sm: 9px;
    --radius-md: 15px;
    --radius-lg: 22px;

    --shadow-card:
        0 2px 4px rgba(34, 46, 39, 0.025),
        0 12px 35px rgba(34, 46, 39, 0.035);

    --transition:
        180ms ease;
}


/* 2. RESET */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--cream);
    color: var(--ink);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 14px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

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

button {
    cursor: pointer;
}

::selection {
    color: var(--cream-light);
    background: var(--teal-medium);
}


/* 3. SIDEBAR */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;

    display: flex;
    flex-direction: column;

    width: var(--sidebar-width);
    min-height: 100vh;
    padding: 30px 20px 22px;

    background: var(--teal-dark);
    color: var(--cream-light);

    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 8px 38px;
}

.brand-icon {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    border-radius: 13px;

    background: var(--terracotta);
    color: var(--white);

    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 700;

    box-shadow: 0 5px 16px rgba(185, 103, 79, 0.18);
}

.brand h1 {
    margin: 0;

    color: var(--cream-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.7px;
    line-height: 1.25;
}

.brand p {
    margin: 4px 0 0;

    color: #A5B8AE;

    font-size: 11px;
    letter-spacing: 0.4px;
}

.navigation {
    display: grid;
    gap: 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 46px;
    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    color: #B5C3BA;

    font-size: 13px;
    font-weight: 500;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.nav-item span {
    display: grid;
    place-items: center;

    width: 21px;

    font-size: 18px;
    line-height: 1;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.055);
    color: var(--white);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.065);

    color: var(--cream-light);
}

.nav-item.active span {
    color: #E0A18C;
}

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

    margin-top: auto;
    padding: 17px 12px 0;

    border-top: 1px solid rgba(255, 255, 255, 0.10);

    color: #A5B8AE;
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #8FC5A3;
    box-shadow: 0 0 0 4px rgba(143, 197, 163, 0.10);
}


/* 4. MAIN LAYOUT */

.main-content {
    width: calc(100% - var(--sidebar-width));
    max-width: 1700px;
    min-height: 100vh;

    margin-left: var(--sidebar-width);
    padding: 35px 44px 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 27px;

    border-bottom: 1px solid var(--border);
}

.eyebrow {
    margin: 0 0 7px;

    color: var(--terracotta-dark);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.7px;
    line-height: 1.4;
}

.topbar h2 {
    margin: 0;

    color: var(--teal-dark);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 500;
    letter-spacing: -0.8px;
    line-height: 1.25;
}

.profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar {
    display: grid;
    place-items: center;

    width: 39px;
    height: 39px;

    border: 1px solid #D7C5B5;
    border-radius: 50%;

    background: var(--terracotta-soft);
    color: var(--terracotta-dark);

    font-family: Georgia, serif;
    font-size: 17px;
}

.profile strong {
    display: block;

    color: var(--teal-dark);

    font-size: 12px;
    font-weight: 600;
}

.profile p {
    margin: 2px 0 0;

    color: var(--muted);
    font-size: 11px;
}


/* 5. WELCOME SECTION */
/* OrbitFlow — Welcome Banner */

.welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    margin-top: 30px;
    padding: 40px 36px;
    min-height: 196px;
    box-sizing: border-box;

    overflow: hidden;
    border: 1px solid #D9E1D9;
    border-radius: var(--radius-lg);

    background:
        radial-gradient(
            circle at 92% 12%,
            rgba(255, 255, 255, 0.13),
            transparent 32%
        ),
        var(--teal);

    color: var(--cream-light);
    box-shadow: var(--shadow-card);
}

.welcome .eyebrow {
    margin-bottom: 12px;
    color: #E0A18C;
}

.welcome h2 {
    margin: 0;

    color: var(--cream-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 2.8vw, 38px);
    font-weight: 500;
    letter-spacing: -1.1px;
    line-height: 1.2;
}

.welcome-description {
    max-width: 510px;
    margin: 14px 0 0;

    color: #C5D5CB;
    font-size: 13px;
    line-height: 1.8;
}

/* Welcome banner button */
.welcome .primary-button {
    flex-shrink: 0;
    align-self: center;
    padding: 14px 22px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Responsive layout */
@media (max-width: 700px) {
    .welcome {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
        padding: 28px 24px;
    }

    .welcome .primary-button {
        align-self: flex-start;
    }
}

/* 6. BUTTONS */

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 43px;
    padding: 0 18px;

    border: 1px solid var(--terracotta);
    border-radius: 10px;

    background: var(--terracotta);
    color: var(--white);

    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.primary-button:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);

    box-shadow: 0 5px 15px rgba(185, 103, 79, 0.15);

    transform: translateY(-1px);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button:focus-visible,
.nav-item:focus-visible,
.text-link:focus-visible {
    outline: 3px solid #D7A18E;
    outline-offset: 3px;
}

.text-link {
    color: var(--teal-medium);

    font-size: 12px;
    font-weight: 600;

    transition: color var(--transition);
}

.text-link:hover {
    color: var(--terracotta-dark);
}


/* 7. STATISTIC CARDS */

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

    margin-top: 23px;
}

.stat-card {
    min-width: 0;
    padding: 21px 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--cream-light);

    box-shadow: var(--shadow-card);

    transition:
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.stat-card:hover {
    border-color: #C9D5CB;

    box-shadow: 0 8px 22px rgba(34, 46, 39, 0.055);

    transform: translateY(-2px);
}

.stat-card > p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
    font-weight: 500;
}

.stat-card h3 {
    margin: 13px 0 8px;

    color: var(--teal-dark);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-note {
    color: var(--muted-light);

    font-size: 10px;
    line-height: 1.6;
}


/* 8. PANELS */

.panel {
    margin-top: 24px;
    padding: 27px 28px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--cream-light);

    box-shadow: var(--shadow-card);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 23px;
}

.section-heading .eyebrow {
    margin-bottom: 5px;
}

.section-heading h2 {
    margin: 0;

    color: var(--teal-dark);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.45px;
}


/* 9. CAMPAIGN TABLE */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 560px;

    border-collapse: collapse;

    text-align: left;
}

thead {
    background: #F3EEE5;
}

th {
    padding: 12px 14px;

    color: #777C73;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

td {
    padding: 16px 14px;

    border-bottom: 1px solid #EEE7DC;

    color: var(--ink);

    font-size: 12px;
    vertical-align: middle;
}

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

tbody tr:not(:has(.empty-state)):hover {
    background: #F9F5ED;
}

.empty-state {
    padding: 34px 20px;

    color: var(--muted);

    text-align: center;
    line-height: 1.9;
}


/* 10. CAMPAIGN FORM */

#campaign-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;

    min-width: 0;
}

.form-group label {
    color: var(--teal-dark);

    font-size: 12px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 12px 13px;

    border: 1px solid #DED7CA;
    border-radius: 10px;

    background: #FFFDFA;
    color: var(--ink);

    font-size: 12px;

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.form-group textarea {
    min-height: 120px;

    resize: vertical;

    line-height: 1.8;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #A3A095;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: #B8C6B9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--teal-medium);

    background: var(--white);

    box-shadow: 0 0 0 3px rgba(40, 91, 84, 0.10);
}

.field-note {
    margin: 0;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.7;
}

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


/* 11. NOTICE */

.notice {
    padding: 17px 18px;

    border: 1px solid #E4C5B7;
    border-left: 3px solid var(--terracotta);
    border-radius: 10px;

    background: #FAEEE7;
}

.notice strong {
    display: block;

    color: var(--terracotta-dark);

    font-size: 12px;
    font-weight: 700;
}

.notice p {
    margin: 5px 0 0;

    color: #765D52;

    font-size: 11px;
    line-height: 1.8;
}

.form-feedback {
    min-height: 20px;
    margin: 0;

    color: var(--teal-medium);

    font-size: 12px;
}


/* 12. FOOTER */

.footer {
    padding: 28px 0 6px;

    color: var(--muted);

    font-size: 10px;
    text-align: center;
}


/* 13. TABLET */

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

    .main-content {
        padding-right: 26px;
        padding-left: 26px;
    }

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

    .welcome {
        padding: 29px;
    }
}


/* 14. MOBILE NAVIGATION */

@media (max-width: 760px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        position: static;

        width: 100%;
        min-height: auto;

        padding: 16px 18px;
    }

    .brand {
        padding: 0 2px 17px;
    }

    .navigation {
        display: flex;
        gap: 6px;

        overflow-x: auto;

        padding-bottom: 4px;
    }

    .nav-item {
        flex: 0 0 auto;

        min-height: 39px;
        padding: 0 11px;

        font-size: 11px;
    }

    .nav-item span {
        width: auto;
        font-size: 15px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        width: 100%;

        margin-left: 0;
        padding: 23px 17px;
    }

    .topbar {
        align-items: flex-start;

        padding-bottom: 20px;
    }

    .topbar h2 {
        font-size: 23px;
    }

    .profile {
        gap: 0;
    }

    .profile > div:last-child {
        display: none;
    }

    .welcome {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;

        margin-top: 22px;
        padding: 25px 22px;
    }

    .welcome h2 {
        font-size: 29px;
    }

    .stats-grid {
        gap: 11px;

        margin-top: 15px;
    }

    .stat-card {
        padding: 17px 15px;
    }

    .stat-card h3 {
        font-size: 29px;
    }

    .panel {
        margin-top: 17px;
        padding: 21px 17px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

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


/* 15. REDUCED MOTION ACCESSIBILITY */

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

.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-draft {
    background: var(--teal-soft);
    color: var(--teal);
}
/* Campaign form submit button */

#campaign-form .btn-primary {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 14px 24px;

    border: 1px solid var(--terracotta);
    border-radius: 12px;

    background-color: var(--terracotta);
    color: var(--cream-light);

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

#campaign-form .btn-primary:hover {
    background-color: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
}

#campaign-form .btn-primary:focus-visible {
    outline: 3px solid #D7A18E;
    outline-offset: 3px;
}

#campaign-form .btn-primary:active {
    transform: translateY(1px);
}
/* ========================================
   TELESCHEDULE — CAMPAIGN ACTION BUTTONS
======================================== */

.btn-edit,
.btn-delete,
.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;

    cursor: pointer;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

/* EDIT — Brand terracotta */

.btn-edit {
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

.btn-edit:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);

    box-shadow: 0 4px 12px rgba(185, 103, 79, 0.18);

    transform: translateY(-1px);
}

/* DELETE — Soft danger colour */

.btn-delete {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: #E8C9C1;
}

.btn-delete:hover {
    background: #EBD1CC;
    border-color: var(--danger);
}

/* CANCEL EDIT — Cream and teal */

.btn-cancel {
    background: var(--cream-light);
    color: var(--teal);
    border-color: var(--border);
}

.btn-cancel:hover {
    background: var(--cream-dark);
    border-color: #CFC1B0;
}

/* Focus accessibility */

.btn-edit:focus-visible,
.btn-delete:focus-visible,
.btn-cancel:focus-visible {
    outline: 3px solid #D7A18E;
    outline-offset: 3px;
}

/* Press interaction */

.btn-edit:active,
.btn-delete:active,
.btn-cancel:active {
    transform: translateY(0);
}

/* Disabled state */

.btn-edit:disabled,
.btn-delete:disabled,
.btn-cancel:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
/* ===== TeleSchedule Action Buttons — Final Fix ===== */

button.btn-edit,
button.btn-delete,
button.btn-cancel {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 14px;
    margin-right: 5px;

    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;

    cursor: pointer;
    transition: all 180ms ease;
}

/* Edit — Terracotta */
button.btn-edit {
    background: var(--terracotta);
    color: var(--white);
    border: 1px solid var(--terracotta);
}

button.btn-edit:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    transform: translateY(-1px);
}

/* Delete — Soft terracotta */
button.btn-delete {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #E8C9C1;
}

button.btn-delete:hover {
    background: #EBD1CC;
    border-color: var(--danger);
}

/* Cancel Edit — Cream */
button.btn-cancel {
    background: var(--cream-light);
    color: var(--teal);
    border: 1px solid var(--border);
}

button.btn-cancel:hover {
    background: var(--cream-dark);
    border-color: #CFC1B0;
}

/* Keyboard focus */
button.btn-edit:focus-visible,
button.btn-delete:focus-visible,
button.btn-cancel:focus-visible {
    outline: 3px solid #D7A18E;
    outline-offset: 3px;
}

/* Disabled state */
button.btn-edit:disabled,
button.btn-delete:disabled,
button.btn-cancel:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
/* ===== Telegram Connection Indicator ===== */
#telegram-connection-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 17px;
    min-width: 42px;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid rgba(29, 77, 68, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: #244b43;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 5px 18px rgba(24, 60, 53, 0.07);
    cursor: default;
    transform-origin: center;
    animation: telegramFloat 3s ease-in-out infinite;
    transition:
        padding 0.35s ease,
        border-radius 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}
/* Connected state */
#telegram-connection-status.connected {
    color: #245c46;
    border-color: rgba(49, 145, 96, 0.25);
    background: rgba(231, 247, 237, 0.92);
}
/* Disconnected or unavailable state */
#telegram-connection-status.disconnected {
    color: #a13d35;
    border-color: rgba(190, 67, 58, 0.25);
    background: rgba(255, 237, 234, 0.94);
}
/* Hover interaction */
#telegram-connection-status:hover {
    transform: translateY(-3px) scale(1.04);
    border-radius: 15px;
    padding: 14px 22px;
    box-shadow: 0 12px 28px rgba(24, 60, 53, 0.14);
}
/* Gentle floating movement */
@keyframes telegramFloat {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -3px;
    }
}
/* Respect reduced-motion accessibility settings */
@media (prefers-reduced-motion: reduce) {
    #telegram-connection-status {
        animation: none;
        transition: none;
    }
}
/* Animated Telegram status dot */
#telegram-connection-status::before {
    content: "";
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #2eaa68;
    box-shadow: 0 0 0 4px rgba(46, 170, 104, 0.13),
                0 0 12px rgba(46, 170, 104, 0.45);
    animation: telegramPulse 1.8s ease-in-out infinite;
    transition: all 0.35s ease;
}
#telegram-connection-status.disconnected::before {
    background: #d64b43;
    box-shadow: 0 0 0 4px rgba(214, 75, 67, 0.12),
                0 0 12px rgba(214, 75, 67, 0.35);
}
#telegram-connection-status:hover::before {
    transform: scale(1.25);
}
@keyframes telegramPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(0.82);
    }
}
/* ===== Premium Telegram Connection Button ===== */
#telegram-toggle-button {
    position: relative;
    overflow: hidden;
    padding: 13px 21px;
    border: 1px solid rgba(29, 77, 68, 0.25);
    border-radius: 14px;
    background: #19443c;
    color: #fffaf2;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(25, 68, 60, 0.12);
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-radius 0.3s ease,
        box-shadow 0.3s ease;
}
/* Smooth hover transformation */
#telegram-toggle-button:hover:not(:disabled) {
    transform: translateY(-3px);
    border-radius: 20px;
    background: #245c50;
    box-shadow: 0 10px 24px rgba(25, 68, 60, 0.2);
}
/* Press interaction */
#telegram-toggle-button:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}
/* Disconnected state: connect action */
#telegram-toggle-button.disconnected {
    background: #b9654e;
    border-color: rgba(185, 101, 78, 0.3);
    box-shadow: 0 5px 14px rgba(185, 101, 78, 0.14);
}
#telegram-toggle-button.disconnected:hover:not(:disabled) {
    background: #a9523d;
    box-shadow: 0 10px 24px rgba(185, 101, 78, 0.24);
}
/* Disabled state while connecting or disconnecting */
#telegram-toggle-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
/* Keyboard accessibility */
#telegram-toggle-button:focus-visible {
    outline: 3px solid rgba(185, 101, 78, 0.45);
    outline-offset: 4px;
}
/* Reduced-motion accessibility */
@media (prefers-reduced-motion: reduce) {
    #telegram-toggle-button {
        transition: none;
    }
}
/* Mobile layout: Telegram connection controls */
@media (max-width: 1000px) {
    .topbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .topbar > div:first-child {
        width: 100%;
    }

    .telegram-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}
    #telegram-connection-status {
        align-self: center;
        text-align: center;
        max-width: 100%;
        box-sizing: border-box;
    }

    #telegram-toggle-button {
        display: block;
        align-self: center;
        width: fit-content;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .profile {
        display: none;
    }
}
/* Live Campaign Progress Bars */
.progress-container {
width: 100%;
min-width: 120px;
}

.progress-info {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-bottom: 8px;
font-size: 12px;
color: var(–text-muted);
}

.progress-track {
display: block;
width: 100%;
height: 10px;
min-height: 10px;
background: #E8E0D3;
border-radius: 999px;
overflow: hidden;
}

.progress-fill {
display: block;
height: 100%;
min-height: 10px;
background: #829B83;
border-radius: 999px;
transition: width 0.4s ease;
}

.campaign-status {
display: inline-block;
padding: 5px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
text-transform: capitalize;
}

.status-running {
color: #285943;
background: #DCE8DF;
}

.status-finished {
color: #174A43;
background: #DDEAE6;
}

.status-stopped {
color: #8F4938;
background: #F1DFD7;
}
/* Create in Engine button */
/* Create in Engine button */
.btn-engine {
display: inline-block;
margin: 6px 4px;
padding: 8px 12px;
border: 1px solid #174A43;
border-radius: 6px;
background: #174A43;
color: #F8F4EC;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-engine:hover {
background: #236057;
border-color: #236057;
}

.btn-engine:disabled {
opacity: 0.6;
cursor: not-allowed;
}

/* Already linked campaign */
.btn-engine-linked {
display: inline-block;
margin: 6px 4px;
padding: 8px 12px;
border: 1px solid #B8CCBB;
border-radius: 6px;
background: #DCE8DF;
color: #285943;
font-size: 12px;
font-weight: 600;
cursor: default;
white-space: normal;
}
/* Recent Activity Logs — secondary refresh button */
#refresh-engine-logs {
    background-color: #dce8df;
    color: #174b43;
    border: 1px solid #c2d5c7;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 180ms ease,
                border-color 180ms ease,
                transform 180ms ease;
}

#refresh-engine-logs:hover {
    background-color: #c8dacd;
    border-color: #a9c4b0;
}

#refresh-engine-logs:active {
    transform: translateY(1px);
}

#refresh-engine-logs:focus-visible {
    outline: 2px solid #276c60;
    outline-offset: 3px;
}

#refresh-engine-logs:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* =========================================
AUTHENTICATION
========================================= */

.auth-screen {
min-height: 100vh;
display: grid;
place-items: center;
padding: 32px 20px;
background:
radial-gradient(ellipse at top left, #e1ece6 0%, transparent 45%),
var(–cream);
}

.auth-screen[hidden],
.auth-user-bar[hidden] {
display: none !important;
}

.auth-card {
width: 100%;
max-width: 430px;
padding: 36px;
background: var(–cream-light);
border: 1px solid var(–border);
border-radius: var(–radius-lg);
box-shadow: var(–shadow-card);
}

.auth-brand {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}

.auth-brand h1 {
margin: 0;
color: var(–teal);
font-size: 28px;
letter-spacing: -0.8px;
}

.auth-brand-mark {
display: grid;
width: 42px;
height: 42px;
place-items: center;
border-radius: 13px;
background: var(–teal);
color: white;
font-size: 24px;
font-weight: 700;
}

.auth-subtitle {
margin: 10px 0 28px;
color: var(–muted);
text-align: center;
}

.auth-message {
margin-bottom: 14px;
color: var(–danger);
overflow-wrap: anywhere;
}

.auth-message:empty {
display: none;
}

.auth-google-button,
.auth-submit-button,
.auth-sign-out-button {
width: 100%;
min-height: 46px;
border-radius: var(–radius-sm);
font-weight: 600;
cursor: pointer;
transition: background-color var(–transition),
transform var(–transition);
}

.auth-google-button {
border: 1px solid var(–border);
background: white;
color: var(–ink);
}

.auth-google-button:hover {
background: var(–teal-soft);
}

.auth-divider {
display: flex;
align-items: center;
gap: 12px;
margin: 22px 0;
color: var(–muted);
font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
content: “”;
height: 1px;
flex: 1;
background: var(–border);
}

#auth-form label {
display: block;
margin: 14px 0 6px;
color: var(–ink);
font-weight: 600;
}

#auth-form input {
width: 100%;
min-height: 44px;
padding: 10px 12px;
border: 1px solid var(–border);
border-radius: var(–radius-sm);
background: white;
color: var(–ink);
}

#auth-form input:focus-visible {
outline: 2px solid var(–teal-medium);
outline-offset: 2px;
}

.auth-submit-button {
margin-top: 22px;
border: 0;
background: var(–teal);
color: white;
}

.auth-submit-button:hover {
background: var(–teal-dark);
}

.auth-google-button:active,
.auth-submit-button:active,
.auth-sign-out-button:active {
transform: translateY(1px);
}

.auth-google-button:disabled,
.auth-submit-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}

.auth-text-button {
display: block;
margin: 18px auto 0;
padding: 4px;
border: 0;
background: transparent;
color: var(–teal-medium);
font-size: 13px;
cursor: pointer;
}

.auth-text-button:hover {
text-decoration: underline;
}

.auth-user-bar {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 16px;
padding: 12px 24px;
background: var(–cream-light);
border-bottom: 1px solid var(–border);
}

#auth-user-email {
color: var(–muted);
overflow-wrap: anywhere;
}

.auth-sign-out-button {
width: auto;
min-height: 36px;
padding: 6px 14px;
border: 1px solid var(–border);
background: white;
color: var(–teal);
}

.auth-sign-out-button:hover {
background: var(–teal-soft);
}

@media (max-width: 480px) {
.auth-card {
padding: 26px 20px;
}

.auth-user-bar {
    flex-wrap: wrap;
    padding: 12px 16px;
}

}
/* TeleSchedule authentication — layout and polish */

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--cream);
}

.auth-screen[hidden] {
    display: none !important;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--cream-light);
    box-shadow: 0 16px 48px rgba(31, 52, 47, 0.08);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-brand h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(27px, 5vw, 34px);
    letter-spacing: -1px;
}

.auth-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--teal);
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.auth-subtitle {
    margin: 12px 0 28px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.auth-google-button,
.auth-submit-button {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.auth-google-button {
    border: 1px solid var(--border);
    background: white;
    color: var(--ink);
}

.auth-google-button:hover {
    background: var(--teal-soft);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

#auth-form label {
    display: block;
    margin: 16px 0 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

#auth-form input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font: inherit;
}

#auth-form input:focus-visible,
.auth-google-button:focus-visible,
.auth-submit-button:focus-visible,
.auth-text-button:focus-visible {
    outline: 2px solid var(--teal-medium);
    outline-offset: 3px;
}

.auth-submit-button {
    margin-top: 22px;
    border: 0;
    background: var(--teal);
    color: white;
}

.auth-submit-button:hover {
    background: var(--teal-dark);
}

.auth-google-button:active,
.auth-submit-button:active {
    transform: translateY(1px);
}

.auth-google-button:disabled,
.auth-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-text-button {
    display: block;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 5px;
    border: 0;
    background: transparent;
    color: var(--teal-medium);
    font: inherit;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.auth-text-button:hover {
    text-decoration: underline;
}

.auth-message {
    margin-bottom: 14px;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.5;
}

.auth-message:empty {
    display: none;
}

.auth-user-bar[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .auth-screen {
        align-items: flex-start;
        padding: 24px 14px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .auth-brand h1 {
        font-size: 28px;
    }

    .auth-user-bar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
}
/* Sign out button */
.auth-sign-out-button {
    background: transparent;
    color: #19483f;
    border: 1px solid #d9cfc0;
    border-radius: 10px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-sign-out-button:hover {
    background: #19483f;
    color: #ffffff;
    border-color: #19483f;
    box-shadow: 0 4px 12px rgba(25, 72, 63, 0.12);
}

.auth-sign-out-button:active {
    transform: scale(0.97);
}

.auth-sign-out-button:focus-visible {
    outline: 2px solid #bd6b52;
    outline-offset: 3px;
}

.auth-sign-out-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Signed-in user bar */
.auth-user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 28px;
    background: #f5f0e7;
    font-family: inherit;
}

/* Gmail address badge */
#auth-user-email {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: #e3eee7;
    color: #19483f;
    border: 1px solid #c4dace;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.4;
    overflow-wrap: anywhere;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#auth-user-email:hover {
    background: #d6e7dc;
    border-color: #a9cbb7;
}

@media (max-width: 600px) {
    .auth-user-bar {
        gap: 8px;
        padding: 12px 16px;
    }

    #auth-user-email {
        padding: 8px 10px;
        font-size: 12px;
    }

    .auth-sign-out-button {
        padding: 8px 12px;
        font-size: 12px;
    }
}
/* OrbitFlow authentication branding */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-brand h1 {
    margin: 0;
    color: #19483F;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -1.2px;
}
.orbit-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.orbit-logo svg {
    width: 38px;
    height: 38px;
}
.brand-icon.orbit-logo {
    background: #F5F0E7;
    border: 1px solid #E4D9C9;
    border-radius: 14px;
    width: 58px;
    height: 58px;
    padding: 7px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.brand-icon.orbit-logo svg {
    display: block;
    width: 100%;
    height: 100%;
}
.brand-icon.orbit-logo {
    color: #19483F;
    background: #F5F0E7;
    border: 1px solid #E4D9C9;
}

.brand-icon.orbit-logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-icon.orbit-logo svg circle,
.brand-icon.orbit-logo svg ellipse {
    vector-effect: non-scaling-stroke;
}
/* OrbitFlow PNG logo */
.brand-icon.orbit-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    min-width: 58px;
    padding: 5px;
    box-sizing: border-box;
    overflow: hidden;
    background: #F5F0E7;
    border: 1px solid #E4D9C9;
    border-radius: 14px;
    flex-shrink: 0;
}

.orbitflow-logo-image,
.brand-icon.orbit-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
/* ========================================
OrbitFlow — Statistics Card Refinement
======================================== */

.stat-card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 18px;
}

.stat-card-header > p {
margin: 0;
color: var(–muted);
font-size: 12px;
font-weight: 600;
letter-spacing: 0.1px;
}

.stat-icon {
display: flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
flex-shrink: 0;

border: 1px solid #D8E5D9;
border-radius: 12px;
background: #E4EFE5;
color: #19483F;
font-size: 19px;
transition: background 0.25s ease,
            color 0.25s ease,
            border-color 0.25s ease,
            transform 0.25s ease;

}

.stat-card:nth-child(1) .stat-icon,
.stat-card:nth-child(4) .stat-icon {
background: #F4E1DA;
border-color: #EBD0C5;
color: #A64F39;
}

.stat-card:nth-child(2) .stat-icon,
.stat-card:nth-child(3) .stat-icon {
background: #E4EFE5;
border-color: #D0E2D3;
color: #19483F;
}

.stat-card:hover .stat-icon {
transform: translateY(-2px);
background: #19483F;
border-color: #19483F;
color: #FFFFFF;
}

.stat-card:nth-child(1):hover .stat-icon,
.stat-card:nth-child(4):hover .stat-icon {
background: #B9674F;
border-color: #B9674F;
color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
.stat-icon {
transition: none;
}
}
.stat-card h3 {
margin: 0 0 10px;
color: #19483F;
font-family: Georgia, “Times New Roman”, serif;
font-size: 36px;
font-weight: 500;
letter-spacing: -1px;
line-height: 1.15;
}

.stat-card .stat-note {
display: block;
color: var(–muted-light);
font-size: 11px;
line-height: 1.5;
}

/* Keep the cards readable on smaller screens */
@media (max-width: 1000px) {
.stats-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 520px) {
.stats-grid {
grid-template-columns: 1fr;
gap: 12px;
}

.stat-card {
    padding: 18px;
}

}
/* OrbitFlow header logo */

.site-brand-logo {

    display: block;

    width: 90px;

    height: 90px;

    max-width: 100%;

    object-fit: contain;

    flex-shrink: 0;

}
/* Mobile header logo */

@media (max-width: 700px) {

    .site-brand-logo {

        width: 54px;

        height: 54px;

    }

}
.site-brand {
display: flex;
align-items: center;
gap: 14px;
text-decoration: none;
}

.site-brand-copy {
display: flex;
flex-direction: column;
gap: 5px;
}

.site-brand-copy strong {
font-family: Georgia, “Times New Roman”, serif;
font-size: 28px;
color: #173F3B;
}

.site-brand-copy small {
font-size: 10px;
letter-spacing: 1.5px;
color: #64756D;
}
/* ===== OrbitFlow layout correction ===== */

.site-header {
position: sticky;
top: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
width: 100%;
min-height: 110px;
padding: 12px 36px;
box-sizing: border-box;
background: #FCF9F3;
border-bottom: 4px solid #000000;
}
.site-brand {
display: flex;
align-items: center;
gap: 16px;
text-decoration: none;
}


.site-brand-copy {
display: flex;
flex-direction: column;
gap: 5px;
}

.site-brand-copy strong {
color: #173F3B;
font-family: Georgia, “Times New Roman”, serif;
font-size: 30px;
font-weight: 600;
}

.site-brand-copy small {
color: #64756D;
font-size: 10px;
letter-spacing: 1.5px;
}

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

.app-layout {
display: flex;
align-items: flex-start;
gap: 24px;
width: 100%;
padding: 24px;
box-sizing: border-box;
}

.sidebar {
position: sticky;
top: 24px;
flex: 0 0 252px;
width: 252px;
min-height: calc(100vh - 148px);
padding: 24px 16px;
box-sizing: border-box;
background: #FCF9F3;
color: #173F3B;
border: 1px solid #EAE1D3;
border-radius: 18px;
}

.main-content {
flex: 1 1 0;
min-width: 0;
width: auto;
margin-left: 0;
padding: 0;
}

.navigation .nav-item {
color: #35564D;
background: transparent;
border: 1px solid transparent;
border-radius: 10px;
}

.navigation .nav-item:hover,
.navigation .nav-item.active {
color: #FFFFFF;
background: #246B52;
border-color: #246B52;
}

.navigation .nav-item.active span {
color: #FFFFFF;
}

.sidebar-footer {
color: #64756D;
border-top-color: #EAE1D3;
}

@media (max-width: 900px) {
.site-header {
align-items: flex-start;
flex-direction: column;
padding: 20px;
}

.app-layout {
    flex-direction: column;
    padding: 16px;
}
.sidebar {
    position: relative;
    top: auto;
    width: 100%;
    min-height: auto;
    flex-basis: auto;
}
.main-content {
    width: 100%;
}
}
.navigation .nav-item {
    color: #35564D;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
}

.navigation .nav-item:hover,
.navigation .nav-item.active {
    color: #FFFFFF;
    background: #246B52;
    border-color: #246B52;
}

.navigation .nav-item.active span {
    color: #FFFFFF;
}
/* Navigation: normal, hover, and active states */
.navigation .nav-item {
color: #35564D;
background: transparent;
border: 1px solid transparent;
border-radius: 10px;
transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

/* Hover: soft terracotta */
.navigation .nav-item:hover {
color: #8F4937;
background: #F3E1D8;
border-color: #E8C8B9;
}

/* Active: solid green */
.navigation .nav-item.active {
color: #FFFFFF;
background: #246B52;
border-color: #246B52;
}

.navigation .nav-item.active span {
color: #FFFFFF;
}

/* Keep hover subtle when the item is already active */
.navigation .nav-item.active:hover {
color: #FFFFFF;
background: #1D5B46;
border-color: #1D5B46;
}
/* OrbitFlow brand: reference screenshot styling */
.site-header {
background: #F3EDE2;
border-bottom: 1px solid #E3D8C7;
}
.site-brand-copy strong {
font-family: Arial, Helvetica, sans-serif;
font-size: 52px;
font-weight: 800;
letter-spacing: -1.8px;
color: #102F2C;
}

.site-brand-copy strong span {
color: #246B52;
transition: color 250ms ease;
}

.site-brand:hover .site-brand-copy strong span {
color: #B9674F;
}

.site-brand-copy small {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: 500;
letter-spacing: 1.6px;
color: #64756D;
}



.site-header {
min-height: 130px;
padding: 18px 36px;
}
/* Match the top header to the main page background */
.site-header {
background: #F5F0E7 !important;
border-bottom-color: #F5F0E7 !important;
}
/* Header layout: Telegram and account controls */
.site-header-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 18px;
flex-wrap: wrap;
}

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

.site-header .auth-user-bar {
display: flex;
align-items: center;
gap: 12px;
margin: 0;
padding: 0;
background: transparent;
border: 0;
}

.site-header .auth-user-bar[hidden] {
display: none;
}

.site-header #auth-user-email {
color: #35564D;
font-size: 12px;
font-weight: 500;
}

.site-header .auth-sign-out-button {
padding: 9px 14px;
color: #173F3B;
background: #EAE1D3;
border: 1px solid #D9CCB9;
border-radius: 9px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}

.site-header .auth-sign-out-button:hover {
background: #E0D3C1;
}

@media (max-width: 1100px) {
.site-header-actions {
justify-content: flex-start;
}
}
/* OrbitFlow animated terracotta-to-green top accent */
/* Animated OrbitFlow brand accent */
html {
border-top: 4px solid transparent;
border-image: linear-gradient(
90deg,
#B9674F,
#D98B70,
#E7C7A8,
#285B54,
#173F3B,
#B9674F
) 1;
animation: orbitflow-border 5s linear infinite;
}

@keyframes orbitflow-border {
0% {
border-image-source: linear-gradient(90deg, #B9674F, #D98B70, #E7C7A8, #285B54, #173F3B);
}
100% {
border-image-source: linear-gradient(450deg, #B9674F, #D98B70, #E7C7A8, #285B54, #173F3B);
}
}

@media (prefers-reduced-motion: reduce) {
html {
animation: none;
}
}
/* Animated gradient divider below the OrbitFlow header */
.site-header {
position: relative;
border-bottom: none !important;
}

.site-header::after {
content: “”;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background: #000000;


background-size: 250% 100%;
animation: orbitflow-divider-move 6s linear infinite;
}

@keyframes orbitflow-divider-move {
from { background-position: 100% 0; }
to { background-position: -150% 0; }
}

@media (prefers-reduced-motion: reduce) {
.site-header::after {
animation: none;
background-position: center;
}
}
/* Second animated divider: directly below the OrbitFlow header */
.site-header {
position: relative;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
height: 1px;
    background: #000000;
    pointer-events: none;
}


@keyframes orbitflow-bottom-line {
from { background-position: 100% 0; }
to { background-position: -150% 0; }
}
.orbitflow-animated-divider {
display: block;
position: relative;
top: 0;
width: 100%;
height: 4px;
margin: 0;
background: linear-gradient(
90deg,
#B9674F,
#D98B70,
#E7C7A8,
#285B54,
#173F3B,
#B9674F
);
background-size: 250% 100%;
animation: orbitflow-divider-slide 5s linear infinite;
}
/* OrbitFlow planetary area */
.orbitflow-animated-divider {
    height: 145px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at center,
            rgba(40, 91, 84, 0.08),
            transparent 70%
        ),
        #F5F0E7;
}

@keyframes orbitflow-divider-slide {
from { background-position: 100% 0; }
to { background-position: -150% 0; }
}

@media (prefers-reduced-motion: reduce) {
.orbitflow-animated-divider {
animation: none;
background-position: center;
}
}
/* Keep the animated divider thin and remove the unwanted gap */
.orbitflow-animated-divider {
    display: block;
    position: relative;
    width: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #B9674F,
        #D98B70,
        #E7C7A8,
        #285B54,
        #173F3B,
        #B9674F
    );
    background-size: 250% 100%;
    animation: orbitflow-divider-slide 5s linear infinite;
    border: 0;
}

/* Orbit paths */
.orbitflow-animated-divider::before {
content: “”;
position: absolute;
width: 280px;
height: 110px;
left: 50%;
top: 50%;
border: 1px solid rgba(40, 91, 84, 0.35);
border-radius: 50%;
transform: translate(-50%, -50%) rotate(-12deg);
animation: orbitflow-path-pulse 5s ease-in-out infinite;
}

.orbitflow-animated-divider::after {
content: “”;
position: absolute;
width: 420px;
height: 70px;
left: 50%;
top: 50%;
border: 1px solid rgba(185, 103, 79, 0.35);
border-radius: 50%;
transform: translate(-50%, -50%) rotate(12deg);
animation: orbitflow-path-pulse 5s ease-in-out infinite reverse;
}

@keyframes orbitflow-path-pulse {
0%, 100% { opacity: 0.45; }
50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
.orbitflow-animated-divider::before,
.orbitflow-animated-divider::after {
animation: none;
}
}

/* Align the sidebar and main dashboard content */
.app-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.app-layout .sidebar {
    margin-top: 31px;
    align-self: flex-start;
}

.app-layout .main-content {
    margin-top: 0;
}
/* Align the sidebar with the main dashboard content */
.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    flex: 0 0 252px;
    width: 252px;
    min-height: calc(100vh - 148px);
    padding: 24px 16px;
    box-sizing: border-box;
    background: #FCF9F3;
    color: #173F3B;
    border: 1px solid #EAE1D3;
    border-radius: 18px;
    margin-top: 0;
}


/* Keep sidebar sticky while scrolling */
.app-layout .sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: calc(100vh - 40px);
    overflow-y: auto;
}
/* Final header behavior */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}
/* OrbitFlow — Welcome card orbital decoration */
/* Five thin terracotta orbital lines */
.welcome {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 92% 12%,
            rgba(255, 255, 255, 0.13),
            transparent 32%
        ),
        var(--teal);
}

/* Five thin terracotta orbital lines */
.welcome {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.welcome::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;

    background:
        radial-gradient(
            ellipse 600px 600px at 112% 280%,
            transparent 99.4%,
            rgb(185, 99, 73) 99.6%,
            transparent 99.8%
        ),
        radial-gradient(
            ellipse 660px 660px at 112% 280%,
            transparent 99.4%,
          rgba(185, 99, 73) 99.6%,
            transparent 99.8%
        ),
        radial-gradient(
            ellipse 720px 720px at 112% 280%,
            transparent 99.4%,
            rgba(185, 99, 73) 99.6%,
            transparent 99.8%
        ),
        radial-gradient(
            ellipse 780px 780px at 112% 280%,
            transparent 99.4%,
            rgba(185, 99, 73) 99.6%,
            transparent 99.8%
        ),
        radial-gradient(
            ellipse 840px 840px at 112% 280%,
            transparent 99.4%,
           rgba(185, 99, 73) 99.6%,
            transparent 99.8%
        );
}

.welcome::after {
    content: none;
}

.welcome > * {
    position: relative;
    z-index: 1;
}
/* Telegram group selection */
.destination-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
}

.destination-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.destination-checkbox-item:hover {
    background: rgba(128, 128, 128, 0.12);
}

.destination-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.destination-checkbox-name {
    overflow-wrap: anywhere;
}

/* Engine Campaign Action Buttons */

/* Engine Campaign Action Buttons */

.engine-start-button,
.engine-stop-button,
.engine-delete-button {
    min-width: 105px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    margin: 3px;
    color: #F8F5EF;
}

.engine-start-button {
    background: #174B40;
}

.engine-start-button:hover:not(:disabled) {
    background: #103A33;
    transform: translateY(-1px);
}

.engine-stop-button {
    background: #B9674F;
}

.engine-stop-button:hover:not(:disabled) {
    background: #98513E;
    transform: translateY(-1px);
}

.engine-delete-button {
    background: #A7473D;
}

.engine-delete-button:hover:not(:disabled) {
    background: #87372F;
    transform: translateY(-1px);
}

.engine-start-button:disabled,
.engine-stop-button:disabled,
.engine-delete-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.engine-start-button:focus-visible,
.engine-stop-button:focus-visible,
.engine-delete-button:focus-visible {
    outline: 3px solid #C88A70;
    outline-offset: 2px;
}

/* =====================================
   OrbitFlow Global Modal
===================================== */

.orbit-modal[hidden] {
    display: none !important;
}

.orbit-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.orbit-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 25, 21, 0.72);
    backdrop-filter: blur(6px);
    animation: orbitFadeIn 0.2s ease;
}

.orbit-modal-card {
    position: relative;
    width: 100%;
    max-width: 410px;
    padding: 34px 30px;
    border: 1px solid rgba(23, 75, 64, 0.15);
    border-radius: 18px;
    background: #F8F5EF;
    color: #173B34;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: orbitModalEnter 0.3s ease;
}

.orbit-modal-card h2 {
    margin: 18px 0 10px;
    color: #174B40;
    font-size: 22px;
}

.orbit-modal-card p {
    margin: 0;
    color: #64756F;
    font-size: 14px;
    line-height: 1.6;
}

.orbit-modal-spinner {
    width: 43px;
    height: 43px;
    margin: 0 auto;
    border: 4px solid #D9E5DF;
    border-top-color: #174B40;
    border-right-color: #238B78;
    border-radius: 50%;
    animation: orbitSpin 0.8s linear infinite;
}

.orbit-modal-spinner.success {
    animation: none;
    border: 4px solid #174B40;
    position: relative;
}

.orbit-modal-spinner.success::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 800;
    color: #174B40;
}

.orbit-modal-spinner.error {
    animation: none;
    border: 4px solid #A7473D;
    position: relative;
}

.orbit-modal-spinner.error::after {
    content: "!";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 800;
    color: #A7473D;
}

.orbit-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.orbit-modal-actions button {
    min-width: 105px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.orbit-modal-confirm {
    background: #174B40;
    color: #F8F5EF;
}

.orbit-modal-cancel {
    background: #E6E9E4;
    color: #29463E;
}

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

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

@keyframes orbitModalEnter {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   ORBITFLOW — PREMIUM SETTINGS INTERFACE
======================================== */

.settings-view {
    width: 100%;
    min-width: 0;
    padding-bottom: 40px;
}

.settings-view[hidden],
.settings-panel[hidden] {
    display: none !important;
}

/* Page heading */

.settings-view > .section-heading {
    margin-bottom: 30px;
}

.settings-view > .section-heading h2 {
    margin: 5px 0 8px;
    font-size: 32px;
    letter-spacing: -0.8px;
}

.settings-view > .section-heading p:not(.eyebrow) {
    color: #718078;
    font-size: 14px;
}

/* Horizontal navigation */

.settings-layout {
    display: block;
}

.settings-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;

    padding: 0 0 12px;
    margin-bottom: 26px;

    background: transparent;
    border: none;
    border-bottom: 1px solid #E7E5DD;
    border-radius: 0;

    scrollbar-width: none;
}

.settings-navigation::-webkit-scrollbar {
    display: none;
}

.settings-nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 10px 17px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: #64756D;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: center;

    white-space: nowrap;
    cursor: pointer;

    transition: background 180ms ease, color 180ms ease;
}

.settings-nav-item:hover {
    background: #F3EDE5;
    color: #19483F;
}

.settings-nav-item.active {
    position: relative;
    background: #E8F0EB;
    color: #246B52;
}

.settings-nav-item.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: -12px;
    height: 3px;
    border-radius: 3px;
    background: #246B52;
}

/* Content area */

.settings-content {
    width: 100%;
    max-width: 800px;
    min-width: 0;
}
.settings-panel {
    min-width: 0;
    padding: 30px 32px;

    background: #FCF9F3;
    border: 1px solid #EAE1D3;
    border-radius: 14px;
    box-shadow: none;
}

/* Panel heading */

.settings-panel .section-heading {
    margin-bottom: 30px;
}

.settings-panel .section-heading h2,
.settings-panel > h2 {
    margin: 5px 0 8px;
    color: #19483F;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.settings-panel > p:not(.eyebrow) {
    color: #718078;
    font-size: 13px;
    line-height: 1.7;
}

/* Profile form */

.settings-panel .form-group {
    margin-bottom: 23px;
}

.settings-panel .form-group label {
    display: block;
    margin-bottom: 9px;
    color: #35564D;
    font-size: 13px;
    font-weight: 600;
}

.settings-panel .form-group input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;

    border: 1px solid #DEDCD2;
    border-radius: 8px;

    background: #FFFFFF;
    color: #19483F;

    font-family: inherit;
    font-size: 14px;
}

.settings-panel .form-group input:focus {
    outline: none;
    border-color: #246B52;
    box-shadow: 0 0 0 3px rgba(36, 107, 82, 0.10);
}

.settings-panel .form-group input[readonly] {
    background: #F3F1EB;
    color: #718078;
    cursor: default;
}

.settings-panel .form-group small {
    display: block;
    margin-top: 8px;
    color: #87928B;
    font-size: 11px;
    line-height: 1.5;
}

/* Save button */

.settings-panel .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 145px;
    min-height: 44px;
    padding: 11px 22px;

    border: 1px solid #246B52;
    border-radius: 8px;

    background: #246B52;
    color: #FFFFFF;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    transition: background 180ms ease;
}

.settings-panel .btn-primary:hover {
    background: #19483F;
}

.settings-panel .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Accessibility */

.settings-nav-item:focus-visible {
    outline: 3px solid #D7A18E;
    outline-offset: 3px;
}

/* Responsive */

@media (max-width: 650px) {
    .settings-view > .section-heading h2 {
        font-size: 27px;
    }

    .settings-navigation {
        gap: 4px;
    }

    .settings-nav-item {
        padding: 10px 12px;
        font-size: 12px;
    }

    .settings-panel {
        padding: 22px 18px;
    }
}
/* Settings view — force dashboard sections to stay hidden */
.welcome[hidden],
.stats-grid[hidden],
#dashboard[hidden],
#live-monitoring[hidden],
#campaigns[hidden],
#create[hidden],
#settings[hidden] {
    display: none !important;
}

/* ========================================
   ORBITFLOW — SECURITY SETTINGS
======================================== */

.security-section {
    padding: 25px 0;
    border-bottom: 1px solid #EAE1D3;
}

.security-section:first-of-type {
    padding-top: 0;
}

.security-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.security-section h3 {
    margin: 0 0 8px;
    color: #19483F;
    font-size: 17px;
    font-weight: 600;
}

.security-section > p {
    color: #718078;
    font-size: 13px;
    line-height: 1.6;
}

.security-section .form-group {
    max-width: 560px;
}

.security-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 560px;
    padding: 14px 0;
    border-bottom: 1px solid #EAE1D3;
    font-size: 13px;
    color: #35564D;
}

.security-status-row strong[data-status="verified"] {
    color: #246B52;
}

.security-status-row strong[data-status="unverified"] {
    color: #B7791F;
}

.security-secondary-button {
    margin-top: 12px;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #246B52;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.security-secondary-button:hover {
    color: #19483F;
    text-decoration: underline;
}

.security-danger-button {
    padding: 11px 17px;
    border: 1px solid #D9A6A0;
    border-radius: 8px;
    background: #FFF7F5;
    color: #A93226;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.security-danger-button:hover {
    background: #FCEAE7;
}

.security-danger-button:disabled,
.security-secondary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 650px) {
    .security-section {
        padding: 20px 0;
    }

    .security-status-row {
        gap: 12px;
    }
}

/* Password visibility controls */

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 48px !important;
}

.password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    padding: 4px;

    border: none;
    background: transparent;
    color: #718078;

    cursor: pointer;
}

.password-visibility-toggle:hover {
    color: #246B52;
}

.password-visibility-toggle:focus-visible {
    outline: 2px solid #246B52;
    border-radius: 5px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    pointer-events: none;
}
/* Spacing below Update Password button */
#security-password-button {
    margin-bottom: 28px;
}
/* Password validation feedback */
#security-password-feedback {
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
    transition: color 0.2s ease;
}

#security-password-feedback.error {
    color: #B85C50;
}

#security-password-feedback.success {
    color: #26785B;
}

/* Authentication screen — hide application layout when signed out */
.orbitflow-sticky-header[hidden],
.app-layout[hidden] {
    display: none !important;
}

/* ========================================
   Re-authentication Login Modal
======================================== */

.auth-screen.auth-modal-open {
    position: fixed;
    inset: 0;
    z-index: 11000;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 35, 30, 0.68);
    backdrop-filter: blur(7px);
    animation: orbitFadeIn 0.2s ease;
}

.auth-screen.auth-modal-open .auth-card {
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    animation: orbitModalEnter 0.25s ease;
}

.auth-screen.auth-modal-open[hidden] {
    display: none !important;
}

/* ==========================================
   SUBSCRIPTION & BILLING
========================================== */

.billing-description {
    margin-bottom: 25px;
}

.billing-period {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 25px 0;
}

.billing-period-btn {
    padding: 10px 18px;
    border: 1px solid #DEDCD2;
    border-radius: 8px;
    background: #FFFFFF;
    color: #718078;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 180ms ease;
}

.billing-period-btn.active {
    border-color: #246B52;
    background: #246B52;
    color: #FFFFFF;
}

.billing-save-badge {
    margin-left: 5px;
    font-size: 10px;
    font-weight: 700;
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.subscription-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px 20px;
    border: 1px solid #EAE1D3;
    border-radius: 12px;
    background: #FFFFFF;
}

.subscription-card-featured {
    border: 2px solid #246B52;
    box-shadow: 0 5px 20px rgba(36, 107, 82, 0.08);
}

.subscription-popular {
    position: absolute;
    top: -12px;
    right: 16px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #246B52;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.subscription-card-header h3 {
    margin: 0 0 6px;
    color: #19483F;
    font-size: 19px;
    font-weight: 700;
}

.subscription-card-header p {
    margin: 0;
    color: #87928B;
    font-size: 12px;
}

.subscription-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 25px 0;
}

.price-amount {
    color: #19483F;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.price-period {
    color: #87928B;
    font-size: 12px;
}

.subscription-features {
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex-grow: 1;
    margin: 0 0 25px;
    padding: 0;
    list-style: none;
}

.subscription-features li {
    position: relative;
    padding-left: 21px;
    color: #52675D;
    font-size: 12px;
    line-height: 1.5;
}

.subscription-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #246B52;
    font-weight: 700;
}

.subscription-select-btn {
    width: 100%;
    min-height: 43px;
    padding: 10px;
    border: 1px solid #DEDCD2;
    border-radius: 8px;
    background: #F3F1EB;
    color: #718078;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.8;
}

.subscription-select-primary {
    border-color: #246B52;
    background: #246B52;
    color: #FFFFFF;
}

.billing-payment-note {
    margin-top: 22px;
    font-size: 12px;
}

/* Responsive subscription cards */

@media (max-width: 900px) {
    .subscription-plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .subscription-plans {
        grid-template-columns: 1fr;
    }

    .subscription-card {
        padding: 24px 18px;
    }

    .price-amount {
        font-size: 29px;
    }

    .billing-period {
        flex-wrap: wrap;
    }
}

/* Current subscription plan badge */
.current-plan-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 6px 11px;
    border-radius: 20px;
    background: #E6F3EC;
    color: #246B52;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

/* Current plan button */
.subscription-card [data-plan-action] {
    background: #E6F3EC;
    border: 1px solid #B9D9C7;
    color: #246B52;
    opacity: 1;
    cursor: default;
}

/* Subscription card hover interaction */
.subscription-card {
    border: 1px solid #EAE1D3;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .subscription-card:hover {
        border-color: #246B52;
        box-shadow: 0 8px 24px rgba(36, 107, 82, 0.10);
        transform: translateY(-4px);
    }
}

/* Keyboard accessibility */
.subscription-card:focus-within {
    border-color: #246B52;
}

/* Featured Pro card retains its stronger green border */
.subscription-card-featured {
    border: 2px solid #246B52;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .subscription-card {
        transition: none;
    }

    .subscription-card:hover {
        transform: none;
    }
}

/* ========================================
   ORBITFLOW — SUBSCRIPTION BUTTONS
======================================== */

.subscription-select-btn {
    background: #176b50;
    color: #ffffff;
    border: 1px solid #176b50;
    border-radius: 12px;

    font-weight: 650;
    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;

    box-shadow: 0 4px 12px rgba(23, 107, 80, 0.12);
}

.subscription-select-btn:not(:disabled):hover {
    background: #10543e;
    border-color: #10543e;

    transform: translateY(-3px);

    box-shadow: 0 8px 20px rgba(23, 107, 80, 0.25);
}

.subscription-select-btn:not(:disabled):active {
    background: #0b4232;
    transform: translateY(0) scale(0.97);

    box-shadow: 0 2px 6px rgba(23, 107, 80, 0.2);
}

.subscription-select-btn:focus-visible {
    outline: 3px solid rgba(23, 107, 80, 0.35);
    outline-offset: 4px;
}

.subscription-select-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
}

.subscription-select-btn:disabled:hover {
    transform: none;
}

/* ========================================
   ORBITFLOW — PREMIUM SUBSCRIPTION BUTTONS
======================================== */

.subscription-card .subscription-select-btn:not(:disabled) {
    background: #176b50 !important;
    color: #ffffff !important;
    border: 1px solid #176b50 !important;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;

    box-shadow: 0 4px 12px rgba(23, 107, 80, 0.15);
}

/* Hover */
.subscription-card .subscription-select-btn:not(:disabled):hover {
    background: #238765 !important;
    border-color: #238765 !important;

    transform: translateY(-3px);

    box-shadow: 0 8px 20px rgba(23, 107, 80, 0.22);
}

/* Click */
.subscription-card .subscription-select-btn:not(:disabled):active {
    background: #bce8d5 !important;
    color: #145c43 !important;

    transform: scale(0.97);
    box-shadow: none;
}

/* Keyboard focus */
.subscription-card .subscription-select-btn:focus-visible {
    outline: 3px solid #80c9aa;
    outline-offset: 4px;
}

/* Disabled buttons */
.subscription-card .subscription-select-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

/* ========================================
   USAGE & LIMITS
======================================== */

.usage-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.usage-card {
    min-width: 0;
}

.usage-progress-track {
    width: 100%;
    height: 8px;
    margin-top: 18px;
    overflow: hidden;
    background: #e8eeeb;
    border-radius: 20px;
}

.usage-progress-fill {
    width: 0%;
    height: 100%;
    background: #19483f;
    border-radius: 20px;
    transition: width 0.3s ease;
}

#usage-date {
    display: block;
    margin-top: 20px;
}

@media (max-width: 700px) {
    .usage-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DARK MODE
   ========================================================= */

html[data-theme="dark"] {
    color-scheme: dark;

    --cream: #151C1B;
    --cream-light: #1D2725;
    --cream-dark: #293532;

    --teal: #A1C8BC;
    --teal-dark: #C0DED3;
    --teal-medium: #79A99A;
    --teal-soft: #263B35;

    --terracotta: #D88A70;
    --terracotta-dark: #E5A18A;
    --terracotta-soft: #422E28;

    --ink: #E9EEE9;
    --muted: #A7B2AA;
    --muted-light: #84928A;

    --border: #35423D;
    --white: #202B28;

    --success: #86C7A1;
    --success-soft: #263D30;

    --warning: #E2B875;
    --warning-soft: #403626;

    --danger: #E49A8E;
    --danger-soft: #422C2A;

    --shadow-card:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.20);
}

/* =========================================================
   ORBITFLOW — DARK MODE COMPONENT FIXES
   ========================================================= */

html[data-theme="dark"] .sidebar {
    background: #172321;
    color: #E9EEE9;
    border-right-color: #35423D;
}

html[data-theme="dark"] .brand h1,
html[data-theme="dark"] .nav-item.active {
    color: #E9EEE9;
}

html[data-theme="dark"] .nav-item {
    color: #AABBB2;
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
    background: #293B35;
    border-color: #40574D;
}

html[data-theme="dark"] .welcome {
    background:
        radial-gradient(
            circle at 92% 12%,
            rgba(255, 255, 255, 0.06),
            transparent 32%
        ),
        #24443C;

    border-color: #3B5B50;
    color: #E9EEE9;
}

html[data-theme="dark"] .welcome h2 {
    color: #F0F3ED;
}

html[data-theme="dark"] .welcome-description {
    color: #C0D0C6;
}

html[data-theme="dark"] .topbar h2,
html[data-theme="dark"] .profile strong {
    color: #E9EEE9;
}
/* =========================================================
   ORBITFLOW — TELEGRAM INSPIRED DARK THEME
   ========================================================= */

html[data-theme="dark"] {
    color-scheme: dark;

    --cream: #101820;
    --cream-light: #1C2733;
    --cream-dark: #243442;

    --teal: #3390EC;
    --teal-dark: #17212B;
    --teal-medium: #3390EC;
    --teal-soft: #243442;

    --terracotta: #3390EC;
    --terracotta-dark: #55A7F5;
    --terracotta-soft: #243442;

    --ink: #E6EDF3;
    --muted: #A3B3C2;
    --muted-light: #8193A5;

    --border: #344553;
    --white: #1C2733;
}

/* Main application */
html[data-theme="dark"] body {
    background: #101820;
    color: #E6EDF3;
}

/* Header */
html[data-theme="dark"] .site-header {
    background: #17212B;
    border-bottom: 1px solid #344553;
}

html[data-theme="dark"] .site-brand-copy strong,
html[data-theme="dark"] .site-brand-copy small {
    color: #E6EDF3;
}

/* Sidebar */
html[data-theme="dark"] .sidebar {
    background: #17212B;
    border-color: #344553;
    color: #E6EDF3;
}

html[data-theme="dark"] .nav-item {
    color: #A3B3C2;
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
    background: #243442;
    border-color: #344553;
    color: #FFFFFF;
}

/* Main headings */
html[data-theme="dark"] .topbar h2,
html[data-theme="dark"] .profile strong,
html[data-theme="dark"] .settings-view h2 {
    color: #E6EDF3;
}

/* Welcome banner */
html[data-theme="dark"] .welcome {
    background: #1C3042;
    border-color: #344F66;
    color: #E6EDF3;
}

html[data-theme="dark"] .welcome h2 {
    color: #FFFFFF;
}

html[data-theme="dark"] .welcome-description {
    color: #B8C9D8;
}

/* Dashboard statistic cards */
html[data-theme="dark"] .stat-card {
    background: #1C2733;
    border-color: #344553;
    color: #E6EDF3;
}

html[data-theme="dark"] .stat-card h3 {
    color: #55A7F5;
}

html[data-theme="dark"] .stat-card:hover {
    border-color: #3390EC;
}

/* Settings navigation */
html[data-theme="dark"] .settings-navigation {
    border-bottom-color: #344553;
}

html[data-theme="dark"] .settings-nav-item {
    color: #A3B3C2;
}

html[data-theme="dark"] .settings-nav-item:hover {
    background: #243442;
    color: #FFFFFF;
}

html[data-theme="dark"] .settings-nav-item.active {
    background: #243B50;
    color: #55A7F5;
}

html[data-theme="dark"] .settings-nav-item.active::after {
    background: #3390EC;
}

/* Settings panels */
html[data-theme="dark"] .settings-panel {
    background: #1C2733;
    border-color: #344553;
    color: #E6EDF3;
}

html[data-theme="dark"] .settings-panel .section-heading h2,
html[data-theme="dark"] .settings-panel > h2 {
    color: #E6EDF3;
}

html[data-theme="dark"] .settings-panel > p:not(.eyebrow),
html[data-theme="dark"] .settings-view > .section-heading p:not(.eyebrow) {
    color: #A3B3C2;
}

/* Forms and input fields */
html[data-theme="dark"] .settings-panel .form-group label {
    color: #D5E0E9;
}

html[data-theme="dark"] .settings-panel input,
html[data-theme="dark"] .settings-panel select,
html[data-theme="dark"] .settings-panel textarea {
    background: #17212B;
    color: #E6EDF3;
    border-color: #445766;
}

html[data-theme="dark"] .settings-panel input:focus,
html[data-theme="dark"] .settings-panel select:focus,
html[data-theme="dark"] .settings-panel textarea:focus {
    border-color: #3390EC;
    box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.16);
}

html[data-theme="dark"] .settings-panel input[readonly] {
    background: #243442;
    color: #A3B3C2;
}

/* Tables */
html[data-theme="dark"] table th {
    background: #243442;
    color: #B8C9D8;
}

html[data-theme="dark"] table td {
    background: #1C2733;
    color: #E6EDF3;
    border-color: #344553;
}

/* Primary buttons */
html[data-theme="dark"] .settings-panel .btn-primary,
html[data-theme="dark"] .welcome .primary-button {
    background: #3390EC;
    border-color: #3390EC;
    color: #FFFFFF;
}

html[data-theme="dark"] .settings-panel .btn-primary:hover,
html[data-theme="dark"] .welcome .primary-button:hover {
    background: #2678C9;
    border-color: #2678C9;
}

/* Subscription and usage cards */
html[data-theme="dark"] .subscription-card,
html[data-theme="dark"] .usage-card {
    background: #1C2733;
    border-color: #344553;
    color: #E6EDF3;
}

/* Billing history */
html[data-theme="dark"] .billing-history-table-wrapper {
    border-color: #344553;
}

html[data-theme="dark"] .billing-history-feedback {
    color: #A3B3C2;
}

/* Modal */
html[data-theme="dark"] .orbit-modal-card {
    background: #1C2733;
    color: #E6EDF3;
    border-color: #344553;
}

/* Theme and notification controls */
html[data-theme="dark"] .settings-panel input[type="checkbox"] {
    accent-color: #3390EC;
}

/* Smooth theme transition */
html[data-theme="dark"] body,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .settings-panel,
html[data-theme="dark"] .stat-card {
    transition: background-color 180ms ease,
                color 180ms ease,
                border-color 180ms ease;
}

/* HEADER */
html[data-theme="dark"] .site-header {
    background: #17212B !important;
    border-bottom: 1px solid #344553 !important;
}

html[data-theme="dark"] .site-brand-copy strong {
    color: #E6EDF3 !important;
}

html[data-theme="dark"] .site-brand-copy strong span {
    color: #3390EC !important;
}

html[data-theme="dark"] .site-brand-copy small {
    color: #A3B3C2 !important;
}

html[data-theme="dark"] .site-header #auth-user-email {
    color: #E6EDF3;
}

html[data-theme="dark"] .site-header .auth-sign-out-button {
    background: #243442;
    color: #E6EDF3;
    border-color: #344553;
}

html[data-theme="dark"] .site-header .auth-sign-out-button:hover {
    background: #304657;
}

/* SUBSCRIPTION CARDS */
html[data-theme="dark"] .subscription-card {
    background: #1C2733;
    border-color: #344553;
}

html[data-theme="dark"] .subscription-card-featured {
    border-color: #3390EC;
}

html[data-theme="dark"] .subscription-card-header h3,
html[data-theme="dark"] .price-amount {
    color: #E6EDF3;
}

html[data-theme="dark"] .subscription-card-header p,
html[data-theme="dark"] .price-period,
html[data-theme="dark"] .subscription-features li {
    color: #A3B3C2;
}

html[data-theme="dark"] .subscription-features li::before {
    color: #55A7F5;
}

html[data-theme="dark"] .subscription-popular {
    background: #3390EC;
    color: #FFFFFF;
}

/* Subscription buttons */
html[data-theme="dark"] .subscription-card .subscription-select-btn:not(:disabled) {
    background: #3390EC !important;
    border-color: #3390EC !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .subscription-card .subscription-select-btn:not(:disabled):hover {
    background: #2678C9 !important;
    border-color: #2678C9 !important;
}

html[data-theme="dark"] .subscription-card .subscription-select-btn:not(:disabled):active {
    background: #1D65AC !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .subscription-card .subscription-select-btn:disabled {
    background: #243442 !important;
    border-color: #344553 !important;
    color: #A3B3C2 !important;
    opacity: 1;
}
/* CREATE CAMPAIGN */
html[data-theme="dark"] #create {
    background: #1C2733;
    color: #E6EDF3;
}

html[data-theme="dark"] #create h2,
html[data-theme="dark"] #create label,
html[data-theme="dark"] #create span {
    color: #DCE6EF;
}

html[data-theme="dark"] #create input,
html[data-theme="dark"] #create textarea,
html[data-theme="dark"] #create select {
    background: #17212B !important;
    color: #E6EDF3 !important;
    border: 1px solid #445766 !important;
}

html[data-theme="dark"] #create input::placeholder,
html[data-theme="dark"] #create textarea::placeholder {
    color: #8193A5 !important;
}

html[data-theme="dark"] #create input:focus,
html[data-theme="dark"] #create textarea:focus,
html[data-theme="dark"] #create select:focus {
    border-color: #3390EC !important;
    box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.15);
}

html[data-theme="dark"] #create small {
    color: #A3B3C2;
}

html[data-theme="dark"] #create .destination-checkbox-list {
    background: #17212B;
    border-color: #344553;
}

html[data-theme="dark"] #create .destination-checkbox-list * {
    color: #DCE6EF;
}

html[data-theme="dark"] #create input[type="checkbox"] {
    accent-color: #3390EC;
}

/* =========================================
   DARK MODE — FINAL TEXT AND BRAND FIXES
========================================= */

/* OrbitFlow branding */
html[data-theme="dark"] .site-brand-copy strong {
    color: #E6EDF3 !important;
}

html[data-theme="dark"] .site-brand-copy strong span {
    color: #3390EC !important;
}

html[data-theme="dark"] .site-brand-copy small {
    color: #A3B3C2 !important;
}

/* Header account email */
html[data-theme="dark"] .site-header #auth-user-email {
    background: #243442;
    color: #E6EDF3 !important;
    border: 1px solid #344553;
}

/* Dashboard section headings */
html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3 {
    color: #E6EDF3;
}

html[data-theme="dark"] #live-monitoring h2,
html[data-theme="dark"] #campaigns h2,
html[data-theme="dark"] .activity-section h2 {
    color: #E6EDF3 !important;
}

/* Settings headings and labels */
html[data-theme="dark"] .settings-panel h2,
html[data-theme="dark"] .settings-panel h3,
html[data-theme="dark"] .settings-panel h4 {
    color: #E6EDF3 !important;
}

html[data-theme="dark"] .settings-panel label,
html[data-theme="dark"] .settings-panel strong {
    color: #D5E0E9;
}

/* Security section */
html[data-theme="dark"] .settings-panel .section-heading h2 {
    color: #E6EDF3 !important;
}

/* Subscription text */
html[data-theme="dark"] .subscription-card-header h3,
html[data-theme="dark"] .price-amount {
    color: #E6EDF3 !important;
}

/* Remove dark green text from links */
html[data-theme="dark"] .settings-panel a {
    color: #55A7F5;
}

/* ========================================
   ORBITFLOW — DARK THEME CONTRAST FIX
======================================== */

html[data-theme="dark"] {

    /* Brand */
    --ink: #EAF2F8;
    --muted: #A9BAC8;
    --muted-light: #91A4B4;

}

/* Header logo */
html[data-theme="dark"] .site-brand-copy strong {
    color: #173F3B !important;
}

html[data-theme="dark"] .site-brand-copy strong span {
    color: #229ED9 !important;
}

html[data-theme="dark"] .site-brand-copy small {
    color: #64756D !important;
}

/* Telegram connection status */
html[data-theme="dark"] #telegram-connection-status {
    color: #B8F0D2;
    background: #183D35;
    border: 1px solid #286B55;
}

/* Telegram button */
html[data-theme="dark"] #telegram-toggle-button {
    background: #229ED9;
    border-color: #229ED9;
    color: #FFFFFF;
}

html[data-theme="dark"] #telegram-toggle-button:hover {
    background: #168AC4;
    border-color: #168AC4;
}

/* Account email and sign-out */
html[data-theme="dark"] .site-header #auth-user-email {
    color: #EAF2F8;
}

html[data-theme="dark"] .site-header .auth-sign-out-button {
    background: #243746;
    border-color: #3B5365;
    color: #EAF2F8;
}

/* Main content headings */
html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3 {
    color: #EAF2F8;
}

/* Security section */
html[data-theme="dark"] .security-section h3,
html[data-theme="dark"] .security-secondary-button {
    color: #55B8E8;
}

html[data-theme="dark"] .security-section p,
html[data-theme="dark"] .security-status-row span {
    color: #A9BAC8;
}

/* Create Campaign button */
html[data-theme="dark"] .primary-button {
    background: #229ED9;
    border-color: #229ED9;
    color: #FFFFFF;
}

html[data-theme="dark"] .primary-button:hover {
    background: #168AC4;
    border-color: #168AC4;
}

/* Telegram Blue — Active Sidebar Button */
html[data-theme="dark"] .navigation .nav-item.active {
    background: #229ED9 !important;
    border-color: #229ED9 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .navigation .nav-item.active span {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .navigation .nav-item.active:hover {
    background: #168AC4 !important;
    border-color: #168AC4 !important;
}

/* OrbitFlow — Dark Theme Brand Colors */

html[data-theme="dark"] .site-brand-copy strong {
    color: #229ED9 !important;
}

html[data-theme="dark"] .site-brand-copy strong span {
    color: #FFFFFF !important;
    transition: color 200ms ease;
}

html[data-theme="dark"] .site-brand:hover .site-brand-copy strong span {
    color: #D88A70 !important;
}

/* Telegram Connection Badge — Blue Theme */

html[data-theme="dark"] #telegram-connection-status {
    background: #173B52 !important;
    color: #65C7F5 !important;
    border: 1px solid #229ED9 !important;
}

html[data-theme="dark"] #telegram-connection-status .status-dot {
    background: #229ED9 !important;
    box-shadow: 0 0 0 4px rgba(34, 158, 217, 0.18) !important;
}

/* Dark Theme — Dashboard Statistic Icons */

html[data-theme="dark"] .stat-card .stat-icon {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border-color: #229ED9 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .stat-card:hover .stat-icon {
    background: #168AC4 !important;
    color: #FFFFFF !important;
    border-color: #168AC4 !important;
}
/* Dashboard Icons — Cream Default, Telegram Blue on Hover */

html[data-theme="dark"] .stat-card .stat-icon {
    background: #F6F1E8 !important;
    color: #173F3B !important;
    border-color: #F6F1E8 !important;
    transition: all 200ms ease;
}

html[data-theme="dark"] .stat-card:hover .stat-icon {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border-color: #229ED9 !important;
}
/* ========================================
   CAMPAIGN ACTION BUTTONS — DARK THEME
======================================== */

/* Start — Cream default */
html[data-theme="dark"] .engine-start-button {
    background: #F6F1E8 !important;
    color: #173F3B !important;
    border: 1px solid #F6F1E8 !important;
    transition: all 200ms ease;
}

/* Start — Telegram blue hover */
html[data-theme="dark"] .engine-start-button:hover {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border-color: #229ED9 !important;
}

/* Delete — Muted red default */
html[data-theme="dark"] .engine-delete-button {
    background: #A7473D !important;
    color: #FFFFFF !important;
    border: 1px solid #A7473D !important;
    transition: all 200ms ease;
}

/* Delete — Darker red hover */
html[data-theme="dark"] .engine-delete-button:hover {
    background: #87372F !important;
    border-color: #87372F !important;
    color: #FFFFFF !important;
}

/* Disabled state */
html[data-theme="dark"] .engine-start-button:disabled,
html[data-theme="dark"] .engine-delete-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ========================================
ORBITFLOW — GLOBAL POPUP THEME
======================================== */

/* Shared modal layout */
.orbit-modal {
z-index: 10000;
}

.orbit-modal-backdrop {
background: rgba(8, 25, 21, 0.55);
backdrop-filter: blur(7px);
}

/* LIGHT THEME */
html:not([data-theme=“dark”]) .orbit-modal-card {
background: #FCF9F3 !important;
color: #252E2B !important;
border: 1px solid #E5DDD0 !important;
border-top: 3px solid #B9674F !important;
border-radius: 18px;
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

html:not([data-theme=“dark”]) .orbit-modal-card h2 {
color: #173F3B !important;
}

html:not([data-theme=“dark”]) .orbit-modal-card p {
color: #777C73 !important;
}

html:not([data-theme=“dark”]) .orbit-modal-spinner {
border-color: #D9E5DF !important;
border-top-color: #173F3B !important;
border-right-color: #B9674F !important;
}

/* DARK THEME */
html[data-theme=“dark”] .orbit-modal-card {
background: #192633 !important;
color: #F5F7FA !important;
border: 1px solid #34495B !important;
border-top: 3px solid #229ED9 !important;
border-radius: 18px;
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

html[data-theme=“dark”] .orbit-modal-card h2 {
color: #F5F7FA !important;
}

html[data-theme=“dark”] .orbit-modal-card p {
color: #B8C7D6 !important;
}

html[data-theme=“dark”] .orbit-modal-spinner {
border-color: #34495B !important;
border-top-color: #229ED9 !important;
border-right-color: #65C5F0 !important;
}

/* Spinner states */
html:not([data-theme=“dark”]) .orbit-modal-spinner.success {
border-color: #39765B !important;
}

html:not([data-theme=“dark”]) .orbit-modal-spinner.success::after {
color: #39765B !important;
}

html[data-theme=“dark”] .orbit-modal-spinner.success {
border-color: #229ED9 !important;
}

html[data-theme=“dark”] .orbit-modal-spinner.success::after {
color: #65C5F0 !important;
}

.orbit-modal-spinner.error {
border-color: #D85C5C !important;
}

.orbit-modal-spinner.error::after {
color: #D85C5C !important;
}

/* Popup buttons */
.orbit-modal-actions button {
min-height: 43px;
border-radius: 9px;
transition: 0.2s ease;
}

html:not([data-theme=“dark”]) .orbit-modal-confirm {
background: #173F3B !important;
color: #FFFFFF !important;
border: 1px solid #173F3B !important;
}

html:not([data-theme=“dark”]) .orbit-modal-cancel {
background: #EAE1D3 !important;
color: #173F3B !important;
border: 1px solid #D9CCB9 !important;
}

html[data-theme=“dark”] .orbit-modal-confirm {
background: #229ED9 !important;
color: #FFFFFF !important;
border: 1px solid #229ED9 !important;
}

html[data-theme=“dark”] .orbit-modal-cancel {
background: #263747 !important;
color: #F5F7FA !important;
border: 1px solid #43596C !important;
}

.orbit-modal-actions button:focus-visible {
outline: 3px solid #65C5F0;
outline-offset: 3px;
}
/* Create in Engine — Telegram Blue */

.btn-engine:not(:disabled) {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border: 1px solid #229ED9 !important;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.btn-engine:not(:disabled):hover {
    background: #168AC4 !important;
    border-color: #168AC4 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 158, 217, 0.25);
}

.btn-engine:not(:disabled):active {
    background: #1177AD !important;
    transform: scale(0.97);
}

.btn-engine:focus-visible {
    outline: 3px solid #65C5F0;
    outline-offset: 3px;
}

/* OrbitFlow — Automatic Light/Dark Logo Switching */

.site-brand-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* Light theme */
html:not([data-theme="dark"]) .logo-light {
    display: block !important;
}

html:not([data-theme="dark"]) .logo-dark {
    display: none !important;
}

/* Dark theme */
html[data-theme="dark"] .logo-light {
    display: none !important;
}

html[data-theme="dark"] .logo-dark {
    display: block !important;
}

/* ========================================
   ORBITFLOW — PREMIUM DARK LOGIN SCREEN
======================================== */

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(34, 158, 217, 0.12),
            transparent 40%
        ),
        #101820;
}

/* Login card */
.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 42px 38px;

    background: #1C2733;
    border: 1px solid #344553;
    border-top: 3px solid #229ED9;
    border-radius: 18px;

    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.30);
}

/* OrbitFlow branding */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-bottom: 10px;
}

.auth-brand h1 {
    color: #E6EDF3 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -1px;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #172B3A;
    border: 1px solid #229ED9;
    border-radius: 13px;

    color: #FFFFFF;
}

/* Subtitle */
.auth-subtitle {
    margin: 12px 0 28px;
    color: #A3B3C2;
    font-size: 13px;
    text-align: center;
}

/* Google login */
.auth-google-button {
    width: 100%;
    min-height: 49px;

    background: #243442;
    color: #E6EDF3;
    border: 1px solid #405464;
    border-radius: 10px;
}

.auth-google-button:hover {
    background: #304657;
    border-color: #229ED9;
}

/* Divider */
.auth-divider {
    color: #91A4B4;
}

.auth-divider::before,
.auth-divider::after {
    background: #344553;
}

/* Labels */
#auth-form label {
    color: #DCE6EF;
    font-size: 13px;
    font-weight: 600;
}

/* Inputs */
#auth-form input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;

    background: #17212B;
    color: #E6EDF3;

    border: 1px solid #405464;
    border-radius: 9px;

    font-size: 14px;
}

#auth-form input:focus {
    outline: none;
    border-color: #229ED9;
    box-shadow: 0 0 0 3px rgba(34, 158, 217, 0.15);
}

#auth-form input::placeholder {
    color: #8193A5;
}

/* Sign-in button */
.auth-submit-button {
    min-height: 49px;
    margin-top: 23px;

    background: #229ED9;
    color: #FFFFFF;

    border: 1px solid #229ED9;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    transition: all 180ms ease;
}

.auth-submit-button:hover {
    background: #168AC4;
    border-color: #168AC4;
    transform: translateY(-2px);
}

/* Create account and password reset */
.auth-text-button {
    color: #55B8E8;
    font-size: 13px;
}

.auth-text-button:hover {
    color: #8BD5F7;
}

/* Error messages */
.auth-message {
    color: #FF8585;
}

/* Keyboard accessibility */
.auth-google-button:focus-visible,
.auth-submit-button:focus-visible,
.auth-text-button:focus-visible,
#auth-form input:focus-visible {
    outline: 2px solid #65C5F0;
    outline-offset: 3px;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 22px;
    }

    .auth-brand h1 {
        font-size: 27px;
    }
}

/* Preserve hidden authentication states */
.auth-screen[hidden],
.auth-user-bar[hidden] {
    display: none !important;
}

/* OrbitFlow — Dark Login Branding */

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.auth-brand-logo {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex-shrink: 0;
    border: none;
    background: transparent;
}

.auth-brand h1 {
    margin: 0;
    color: #E6EDF3 !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -1.2px;
}

/* Responsive branding */
@media (max-width: 480px) {
    .auth-brand-logo {
        width: 58px;
        height: 58px;
    }

    .auth-brand h1 {
        font-size: 28px;
    }
}

/* ========================================
   ORBITFLOW LOGIN — LIGHT THEME
======================================== */

html:not([data-theme="dark"]) .auth-screen {
    background:
        radial-gradient(ellipse at top left, #E1ECE6 0%, transparent 45%),
        #F6F1E8;
}

html:not([data-theme="dark"]) .auth-card {
    background: #FCF9F3;
    border-color: #E5DDD0;
    box-shadow: 0 16px 48px rgba(31, 52, 47, 0.08);
}

html:not([data-theme="dark"]) .auth-brand h1 {
    color: #173F3B !important;
}

html:not([data-theme="dark"]) .auth-subtitle,
html:not([data-theme="dark"]) .auth-divider {
    color: #777C73;
}

html:not([data-theme="dark"]) #auth-form label {
    color: #252E2B;
}

html:not([data-theme="dark"]) #auth-form input {
    background: #FFFFFF;
    color: #252E2B;
    border-color: #E5DDD0;
}

html:not([data-theme="dark"]) .auth-google-button {
    background: #FFFFFF;
    color: #252E2B;
    border-color: #E5DDD0;
}

html:not([data-theme="dark"]) .auth-text-button {
    color: #285B54;
}

/* ========================================
   ORBITFLOW LOGIN — DARK THEME
======================================== */

html[data-theme="dark"] .auth-screen {
    background: #101820;
}

html[data-theme="dark"] .auth-card {
    background: #1C2733;
    border-color: #344553;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .auth-brand h1 {
    color: #E6EDF3 !important;
}

html[data-theme="dark"] .auth-subtitle,
html[data-theme="dark"] .auth-divider {
    color: #A3B3C2;
}

html[data-theme="dark"] #auth-form label {
    color: #E6EDF3;
}

html[data-theme="dark"] #auth-form input {
    background: #17212B;
    color: #E6EDF3;
    border-color: #344553;
}

html[data-theme="dark"] #auth-form input::placeholder {
    color: #8193A5;
}

html[data-theme="dark"] .auth-google-button {
    background: #243442;
    color: #E6EDF3;
    border-color: #344553;
}

html[data-theme="dark"] .auth-google-button:hover {
    background: #304657;
}

html[data-theme="dark"] .auth-text-button {
    color: #55A7F5;
}

html[data-theme="dark"] .auth-message {
    color: #E6EDF3;
}

html[data-theme="dark"] .auth-submit-button {
    background: #3390EC;
    color: #FFFFFF;
}

html[data-theme="dark"] .auth-submit-button:hover {
    background: #2678C9;
}

/* ORBITFLOW LOGIN BRANDING */

/* Logo switching */
.auth-brand .logo-light {
    display: block;
}

.auth-brand .logo-dark {
    display: none;
}

html[data-theme="dark"] .auth-brand .logo-light {
    display: none;
}

html[data-theme="dark"] .auth-brand .logo-dark {
    display: block;
}

/* Wordmark */
html:not([data-theme="dark"]) .auth-brand h1 {
    color: #173F3B !important;
}

html[data-theme="dark"] .auth-brand h1 {
    color: #E6EDF3 !important;
}

/* Cyan sign-in button in both themes */
.auth-submit-button {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit-button:hover {
    background: #168AC4 !important;
    transform: translateY(-1px);
}

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

/* OrbitFlow login wordmark */
.auth-wordmark .word-orbit {
    color: #172B2A;
}

.auth-wordmark .word-flow {
    color: #285B45;
    transition: color 0.2s ease;
}

.auth-wordmark .word-flow:hover {
    color: #C16B45;
}

/* Sign-in button */
.auth-submit-button {
    background: #172B2A !important;
    color: #FFFFFF !important;
    border: none;
}

.auth-submit-button:hover {
    background: #285B45 !important;
}
/* DARK MODE — ORBITFLOW WORDMARK */

html[data-theme="dark"] .auth-wordmark .word-orbit {
    color: #229ED9 !important; /* Blue */
}

html[data-theme="dark"] .auth-wordmark .word-flow {
    color: #FFFFFF !important; /* White */
}

html[data-theme="dark"] .auth-wordmark .word-flow:hover {
    color: #C16B45 !important; /* Terracotta */
}
html[data-theme="dark"] .auth-submit-button {
    background: #229ED9 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .auth-submit-button:hover {
    background: #168AC4 !important;
}

/* GOOGLE SIGN-IN BUTTON — INTERACTIONS */

.auth-google-button {
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;

    cursor: pointer;
}

/* LIGHT MODE HOVER */
html:not([data-theme="dark"]) .auth-google-button:hover {
    background: #EAF5FC;
    border-color: #229ED9;
    box-shadow: 0 5px 16px rgba(34, 158, 217, 0.16);
    transform: translateY(-2px);
}

/* DARK MODE HOVER */
html[data-theme="dark"] .auth-google-button:hover {
    background: #263B4D;
    border-color: #229ED9;
    color: #FFFFFF;
    box-shadow: 0 5px 18px rgba(34, 158, 217, 0.20);
    transform: translateY(-2px);
}

/* CLICK / PRESS */
.auth-google-button:active {
    transform: scale(0.98);
    box-shadow: none;
}

/* KEYBOARD FOCUS */
.auth-google-button:focus-visible {
    outline: 3px solid #229ED9;
    outline-offset: 4px;
}

/* DISABLED STATE */
.auth-google-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
/* GOOGLE BUTTON — LIGHT MODE */
html:not([data-theme="dark"]) .auth-google-button:hover {
    background: #E8F1EB;
    border-color: #285B45;
    color: #173F3B;
    box-shadow: 0 5px 16px rgba(40, 91, 69, 0.18);
    transform: translateY(-2px);
}

/* GOOGLE BUTTON — DARK MODE */
html[data-theme="dark"] .auth-google-button:hover {
    background: #263B4D;
    border-color: #229ED9;
    color: #FFFFFF;
    box-shadow: 0 5px 18px rgba(34, 158, 217, 0.20);
    transform: translateY(-2px);
}

/* CLICK EFFECT — BOTH THEMES */
.auth-google-button:active {
    transform: scale(0.98);
    box-shadow: none;
}
/* DARK MODE — TELEGRAM CONNECTED INDICATOR: BLUE */

html[data-theme="dark"] #telegram-connection-status.connected::before {
    background: #229ED9 !important;
    box-shadow:
        0 0 0 4px rgba(34, 158, 217, 0.18),
        0 0 12px rgba(34, 158, 217, 0.45) !important;
}

/* Keep connected badge blue */
html[data-theme="dark"] #telegram-connection-status.connected {
    background: #173B52 !important;
    color: #65C7F5 !important;
    border-color: #229ED9 !important;
}
/* DARK MODE — BILLING PERIOD BUTTONS */

html[data-theme="dark"] .billing-period-btn {
    background: #173B52 !important;
    color: #B8DDF0 !important;
    border: 1px solid #229ED9 !important;
    transition: all 0.2s ease;
}

/* Selected period */
html[data-theme="dark"] .billing-period-btn.active {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border-color: #229ED9 !important;
}

/* Hover */
html[data-theme="dark"] .billing-period-btn:hover {
    background: #168AC4 !important;
    color: #FFFFFF !important;
    border-color: #168AC4 !important;
}

/* Yearly savings badge */
html[data-theme="dark"] .billing-save-badge {
    color: #FFFFFF !important;
}

/* =================================
   ORBITFLOW NOTIFICATION SETTINGS
================================= */

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 20px;
    border: 1px solid #DCE5E9;
    border-radius: 12px;
    background: #FFFFFF;
    cursor: pointer;
    transition: 0.2s ease;
}

.notification-card:hover {
    border-color: #16A085;
    transform: translateY(-1px);
}

.notification-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #E8F6F2;
    color: #13866F;
    font-size: 18px;
    font-weight: 700;
}

.notification-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.notification-copy strong {
    font-size: 14px;
    font-weight: 600;
}

.notification-copy small {
    font-size: 12px;
    color: #7B8794;
}

/* Hide native checkbox */
.notification-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Toggle switch */
.notification-switch {
    width: 42px;
    height: 23px;
    flex-shrink: 0;
    border-radius: 20px;
    background: #C7D0D8;
    position: relative;
    transition: 0.2s ease;
}

.notification-switch::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: white;
    transition: 0.2s ease;
}

.notification-card input:checked + .notification-switch {
    background: #16A085;
}

.notification-card input:checked + .notification-switch::after {
    transform: translateX(19px);
}

/* Dark theme */
html[data-theme="dark"] .notification-card {
    background: #1C2733;
    border-color: #344553;
}

html[data-theme="dark"] .notification-card:hover {
    border-color: #3390EC;
}

html[data-theme="dark"] .notification-icon {
    background: #173B52;
    color: #59B5F5;
}

html[data-theme="dark"] .notification-copy strong {
    color: #E6EDF3;
}

html[data-theme="dark"] .notification-copy small {
    color: #A3B3C2;
}

html[data-theme="dark"] .notification-card input:checked + .notification-switch {
    background: #3390EC;
}

/* Mobile */
@media (max-width: 600px) {
    .notification-card {
        padding: 14px;
        gap: 11px;
    }

    .notification-icon {
        width: 34px;
        height: 34px;
    }
}

/* ==========================================
   IN-APP NOTIFICATIONS
========================================== */

.notification-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 1000;
}

.notification-container[hidden] {
    display: none !important;
}

.notification-bell {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DCE5DF;
    border-radius: 12px;
    background: #FFFFFF;
    color: #244B3F;
    font-size: 23px;
    cursor: pointer;
    transition: 0.2s ease;
}

.notification-bell:hover {
    background: #E8F6F2;
    border-color: #16A085;
}

.notification-unread-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    border-radius: 20px;
    background: #E74C3C;
    color: white;
    font-size: 10px;
    font-weight: 700;
}

.notification-unread-count[hidden] {
    display: none !important;
}

/* Notification panel */

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 370px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E2E8E4;
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
    z-index: 1000;
}

.notification-panel[hidden] {
    display: none !important;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    border-bottom: 1px solid #E8ECE9;
}

.notification-panel-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #243B32;
}

.notification-panel-header span {
    font-size: 11px;
    color: #7B8794;
}

#notification-mark-all {
    border: none;
    background: transparent;
    color: #13866F;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

#notification-mark-all:hover {
    text-decoration: underline;
}

/* Notification list */

.notification-list {
    overflow-y: auto;
    max-height: 390px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid #EDF0EE;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #F5FAF7;
}

.notification-item.unread {
    background: #F0F9F5;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-content strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #243B32;
}

.notification-item-content p {
    margin: 0 0 7px;
    font-size: 12px;
    line-height: 1.5;
    color: #66756D;
    overflow-wrap: anywhere;
}

.notification-item-content time {
    font-size: 10px;
    color: #89958E;
}

.notification-item-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    margin-top: 5px;
    border-radius: 50%;
    background: #16A085;
}

.notification-empty {
    padding: 35px 15px;
    text-align: center;
    font-size: 13px;
    color: #89958E;
}

/* Dark theme */

html[data-theme="dark"] .notification-bell {
    background: #1C2733;
    border-color: #344553;
    color: #E6EDF3;
}

html[data-theme="dark"] .notification-bell:hover {
    background: #26394A;
    border-color: #3390EC;
}

html[data-theme="dark"] .notification-panel {
    background: #18232D;
    border-color: #344553;
}

html[data-theme="dark"] .notification-panel-header {
    border-color: #344553;
}

html[data-theme="dark"] .notification-panel-header h3,
html[data-theme="dark"] .notification-item-content strong {
    color: #E6EDF3;
}

html[data-theme="dark"] .notification-panel-header span,
html[data-theme="dark"] .notification-item-content p,
html[data-theme="dark"] .notification-item-content time {
    color: #A3B3C2;
}

html[data-theme="dark"] #notification-mark-all {
    color: #59B5F5;
}

html[data-theme="dark"] .notification-item {
    border-color: #344553;
}

html[data-theme="dark"] .notification-item:hover,
html[data-theme="dark"] .notification-item.unread {
    background: #223442;
}

html[data-theme="dark"] .notification-empty {
    color: #A3B3C2;
}

/* Mobile */

@media (max-width: 600px) {
    .notification-panel {
        position: fixed;
        top: 85px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 110px);
    }

    .notification-list {
        max-height: calc(100vh - 210px);
    }
}
/* =========================================
   ORBITFLOW — COMPACT MOBILE HEADER
========================================= */

@media (max-width: 760px) {

    .orbitflow-sticky-header {
        position: relative !important;
    }

    .site-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;

        min-height: auto !important;
        padding: 14px 12px !important;
        gap: 14px !important;
    }

    /* BRAND */
    .site-brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        gap: 10px !important;
    }

    .site-brand-logo {
        width: 54px !important;
        height: 54px !important;
        flex-shrink: 0 !important;
    }

    .site-brand-copy strong {
        font-size: 34px !important;
        line-height: 1 !important;
    }

    .site-brand-copy small {
        display: block !important;
        font-size: 8px !important;
        letter-spacing: 1px !important;
        margin-top: 5px !important;
    }

   /* HEADER ACTIONS */
.site-header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 12px;
    margin: 0;
}

    /* TELEGRAM */
    .telegram-controls {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        gap: 8px !important;
    }

    #telegram-connection-status {
        padding: 9px 12px !important;
        font-size: 12px !important;
        border-radius: 30px !important;
        max-width: 65% !important;
        text-align: center !important;
    }

    #telegram-toggle-button {
        padding: 10px 14px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
        width: auto !important;
        min-width: 0 !important;
    }

    

    /* ACCOUNT */
    .auth-user-bar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    #auth-user-email {
        max-width: 70% !important;
        padding: 9px 12px !important;
        font-size: 11px !important;

        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #auth-sign-out {
        padding: 9px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

}

/* =========================================
   MOBILE BOTTOM NAVIGATION — FIXED
========================================= */

@media (max-width: 760px) {

    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        right: 0 !important;

        width: 100% !important;
        height: 76px !important;
        min-height: 76px !important;

        padding: 0 !important;
        margin: 0 !important;

        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        border-right: none !important;

        z-index: 1000;
    }

    .navigation {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;

        width: 100% !important;
        height: 100% !important;

        padding: 6px 8px !important;
        margin: 0 !important;

        gap: 2px !important;
        overflow: visible !important;
    }

    .nav-item {
        display: flex !important;
        flex-direction: column !important;

        justify-content: center !important;
        align-items: center !important;

        width: 100% !important;
        min-width: 0 !important;

        height: 100% !important;
        padding: 5px 2px !important;
        margin: 0 !important;

        gap: 5px !important;

        font-size: 10px !important;
        line-height: 1.2 !important;

        white-space: normal !important;
        text-align: center !important;

        overflow: hidden !important;
        border-radius: 12px !important;
    }

    .nav-item span {
        display: block !important;
        font-size: 20px !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
    }

    .sidebar-footer {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;

        padding-bottom: 110px !important;
    }

    .app-layout {
        margin-left: 0 !important;
    }
}



    #notification-container {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
        width: auto !important;
        margin: 0 !important;
        z-index: 1000 !important;
    }

    #notification-bell {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
    }



    #notification-bell {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    #notification-bell svg {
        width: 18px !important;
        height: 18px !important;
    }




/* ============================================
   ORBITFLOW — GLOBAL MODAL THEME FIX
   Correct selectors for Dark & Light themes
   ============================================ */

/* ---------- DARK THEME ---------- */

html[data-theme="dark"] .orbit-modal-card {
    background: #192633 !important;
    color: #F5F7FA !important;
    border: 1px solid #34495B !important;
    border-top: 3px solid #229ED9 !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="dark"] .orbit-modal-card h2 {
    color: #F5F7FA !important;
}

html[data-theme="dark"] .orbit-modal-card p {
    color: #B8C7D6 !important;
}

html[data-theme="dark"] .orbit-modal-spinner {
    border-color: #34495B !important;
    border-top-color: #229ED9 !important;
    border-right-color: #65C5F0 !important;
}

html[data-theme="dark"] .orbit-modal-spinner.success {
    border-color: #229ED9 !important;
}

html[data-theme="dark"] .orbit-modal-spinner.success::after {
    color: #65C5F0 !important;
}

html[data-theme="dark"] .orbit-modal-confirm {
    background: #229ED9 !important;
    color: #FFFFFF !important;
    border: 1px solid #229ED9 !important;
}

html[data-theme="dark"] .orbit-modal-cancel {
    background: #263747 !important;
    color: #F5F7FA !important;
    border: 1px solid #43596C !important;
}

/* ---------- LIGHT THEME ---------- */

html[data-theme="light"] .orbit-modal-card {
    background: #FCF9F3 !important;
    color: #252E2B !important;
    border: 1px solid #E5DDD0 !important;
    border-top: 3px solid #B9674F !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.20) !important;
}

html[data-theme="light"] .orbit-modal-card h2 {
    color: #173F3B !important;
}

html[data-theme="light"] .orbit-modal-card p {
    color: #777C73 !important;
}

html[data-theme="light"] .orbit-modal-spinner {
    border-color: #D9E5DF !important;
    border-top-color: #173F3B !important;
    border-right-color: #B9674F !important;
}

html[data-theme="light"] .orbit-modal-spinner.success {
    border-color: #39765B !important;
}

html[data-theme="light"] .orbit-modal-spinner.success::after {
    color: #39765B !important;
}

html[data-theme="light"] .orbit-modal-confirm {
    background: #173F3B !important;
    color: #FFFFFF !important;
    border: 1px solid #173F3B !important;
}

html[data-theme="light"] .orbit-modal-cancel {
    background: #EAE1D3 !important;
    color: #173F3B !important;
    border: 1px solid #D9CCB9 !important;
}

/* ---------- BUTTON INTERACTIONS ---------- */

.orbit-modal-actions button {
    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease,
                transform 0.15s ease !important;
}

.orbit-modal-actions button:focus-visible {
    outline: 3px solid #65C5F0 !important;
    outline-offset: 3px !important;
}

.orbit-modal-actions button:hover {
    transform: translateY(-1px);
}

/* ---------- THEME TRANSITION ---------- */

.orbit-modal-card,
.orbit-modal-card h2,
.orbit-modal-card p,
.orbit-modal-actions button {
    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease !important;
}

/* =========================================
   LIGHT THEME — CREATE IN ENGINE BUTTON
   ========================================= */

html[data-theme="light"] .create-in-engine,
html[data-theme="light"] button.create-in-engine,
html[data-theme="light"] .campaign-create-engine {
    background: #B9674F !important;
    color: #FFFFFF !important;
    border: 1px solid #B9674F !important;
}

html[data-theme="light"] .create-in-engine:hover,
html[data-theme="light"] button.create-in-engine:hover,
html[data-theme="light"] .campaign-create-engine:hover {
    background: #A6533D !important;
    border-color: #A6533D !important;
}
/* CREATE IN ENGINE — LIGHT THEME: DARK GREEN */

html[data-theme="light"] .btn-engine:not(:disabled) {
    background: #174A43 !important;
    color: #FFFFFF !important;
    border: 1px solid #174A43 !important;
}

html[data-theme="light"] .btn-engine:not(:disabled):hover {
    background: #236057 !important;
    border-color: #236057 !important;
}

html[data-theme="light"] .btn-engine:not(:disabled):active {
    background: #123B35 !important;
    border-color: #123B35 !important;
}

/* ==========================================
   MOBILE RESPONSIVE — DASHBOARD TABLES
   ========================================== */

@media (max-width: 768px) {

    /* Prevent table from breaking its parent card */
    .table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    /* Keep tables readable instead of crushing columns */
    .table-wrapper table {
        min-width: 650px;
        width: max-content;
        table-layout: auto;
    }

    .table-wrapper th,
    .table-wrapper td {
        white-space: nowrap;
        padding: 14px 16px;
    }

    /* Monitoring table */
    #live-monitoring table {
        min-width: 700px;
    }

    /* Recent campaigns table */
    #campaigns table {
        min-width: 850px;
    }

    /* Reduce card padding */
    .panel {
        padding: 24px 18px;
    }

    /* Keep section headings from unnecessarily wrapping */
    .section-heading {
        gap: 12px;
        flex-wrap: wrap;
    }
}

/* =========================================
   DATE & TIME INPUT — DARK THEME
   ========================================= */

html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"] {
    color-scheme: dark !important;
}

/* LIGHT THEME */
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="time"] {
    color-scheme: light !important;
}

/* ==========================================
   MOBILE DATE/TIME INPUT — PREVENT OVERFLOW
   ========================================== */

@media (max-width: 768px) {

    #create input[type="datetime-local"],
    #create input[type="date"],
    #create input[type="time"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        font-size: 14px !important;
        padding: 12px !important;
    }

    #create .form-group,
    #create .form-field,
    #create .input-group {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #create .panel {
        overflow: visible !important;
    }
}

/* ==========================================
   MOBILE SUBSCRIPTION PLANS — HORIZONTAL SWIPE
   ========================================== */

@media (max-width: 768px) {

    .subscription-plans,
    .pricing-plans,
    .plans-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 16px !important;
        padding-bottom: 16px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .subscription-plans > *,
    .pricing-plans > *,
    .plans-container > * {
        flex: 0 0 85% !important;
        min-width: 85% !important;
        max-width: 85% !important;
        scroll-snap-align: start;
    }

    /* Hide scrollbar */
    .subscription-plans::-webkit-scrollbar,
    .pricing-plans::-webkit-scrollbar,
    .plans-container::-webkit-scrollbar {
        display: none;
    }

    .subscription-plans,
    .pricing-plans,
    .plans-container {
        scrollbar-width: none;
    }
}

/* ==========================================
   MOBILE SETTINGS — BILLING HISTORY TABLES
   ========================================== */

@media (max-width: 768px) {

    /* Keep billing content inside its card */
    #settings .settings-section,
    #settings .settings-panel,
    #settings .billing-section {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Table wrapper: allow horizontal swipe */
    #settings .table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #settings .table-wrapper::-webkit-scrollbar {
        display: none;
    }

    /* Prevent columns from collapsing */
    #settings .table-wrapper table {
        width: max-content !important;
        min-width: 700px !important;
        table-layout: auto !important;
    }

    #settings .table-wrapper th,
    #settings .table-wrapper td {
        white-space: nowrap !important;
        padding: 14px 18px !important;
    }

    /* Prevent parent cards from creating viewport overflow */
    #settings .panel,
    #settings .settings-card {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
}
/* FIX: MOBILE BILLING HISTORY OVERFLOW */
@media (max-width: 768px) {

    #settings .billing-history-table-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        display: block !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
    }

    #settings .billing-history-table-wrapper table {
        width: 700px !important;
        min-width: 700px !important;
        max-width: none !important;
        table-layout: auto !important;
    }

    #settings .billing-history-table-wrapper th,
    #settings .billing-history-table-wrapper td {
        white-space: nowrap !important;
    }

    #settings .billing-history-table-wrapper::-webkit-scrollbar {
        display: none;
    }

    #settings .billing-history-table-wrapper {
        scrollbar-width: none;
    }

    /* Keep the billing card itself within the phone */
    #settings .billing-history-section,
    #settings .billing-history-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}


@media (max-width: 760px) {

    /* ---------- Header container ---------- */
    .app-header {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        padding: 8px 16px 8px;
        padding-top: max(8px, env(safe-area-inset-top));
    }

    /* ---------- Row 1: brand + bell ---------- */
    .header-top {
        display: flex;
        align-items: center;          /* logo, text and bell share one center line */
        justify-content: space-between;
        gap: 12px;
        width: 100%;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1 1 auto;
        min-width: 0;                 /* lets the tagline shrink instead of overflowing */
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        border-radius: 12px;
        object-fit: cover;
    }

    .brand-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        min-width: 0;
    }

    .brand-name {
        margin: 0;
        font-size: clamp(26px, 8vw, 32px);
        line-height: 1;
        font-weight: 800;
        letter-spacing: -0.5px;
        white-space: nowrap;
    }

    .brand-tagline {
        margin: 0;
        font-size: 9.5px;
        line-height: 1.3;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        opacity: 0.65;
        white-space: normal;          /* wraps cleanly on very small phones */
    }

    .notif-btn {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border-radius: 12px;
    }

    /* ---------- Row 2: Telegram controls ---------- */
    .telegram-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
}

    #telegram-connection-status,
    #telegram-toggle-button {
    width: 100%;
    max-width: 100%;
    min-height: 24px;
    margin: 0;
    padding: 6px 10px;
    box-sizing: border-box;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

    #telegram-connection-status {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        white-space: normal;
        word-break: break-word;
    }

    /* ---------- Row 3: email + sign out ---------- */
    .user-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;  /* email takes the space, button hugs content */
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .user-email {
        display: block;
        min-width: 0;
        min-height: 44px;
        padding: 0 14px;
        box-sizing: border-box;
        line-height: 44px;
        border-radius: 12px;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;      /* long emails get "..." instead of breaking layout */
        white-space: nowrap;
    }

    .signout-btn {
        min-height: 44px;
        padding: 0 18px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
    }
}

/* ---------- Very small phones (≤ 380px) ---------- */
@media (max-width: 380px) {
    .app-header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .brand-tagline {
        font-size: 8.5px;
        letter-spacing: 0.08em;
    }

    #telegram-connection-status,
    #telegram-toggle-button {
        font-size: 14px;
    }

    .user-email {
        font-size: 13px;
        padding: 0 10px;
    }
}