/* ===================================================
   GOWB - Hacker Theme Styles
   Organized structure for dual-theme support
   =================================================== */

/* ===== CSS VARIABLES ===== */

/* Dark Theme (Hacker) */
:root {
    --font-body: 'JetBrains Mono', monospace;
    --transition-theme: 0.35s ease;

    --neon-green: #00ff41;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --border-color: rgba(0, 255, 65, 0.3);
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-muted: #666666;

    /* Universal variables */
    --bg-primary: var(--dark-bg);
    --bg-secondary: var(--card-bg);
    --bg-tertiary: #2a2a2a;
    --color-primary: var(--neon-green);
    --color-secondary: var(--text-secondary);
    --color-text: var(--text-primary);
    --color-muted: var(--text-muted);
    --border-primary: var(--border-color);
    --shadow-color: rgba(0, 255, 65, 0.3);

    /* Component tokens */
    --surface-elevated: var(--bg-secondary);
    --surface-muted: var(--bg-tertiary);
    --surface-glass: rgba(0, 0, 0, 0.45);
    --border-soft: var(--border-color);
    --border-strong: rgba(0, 255, 65, 0.65);
    --focus-ring: rgba(0, 255, 65, 0.45);
    --shadow-soft: 0 0 20px rgba(0, 255, 65, 0.1);
    --shadow-strong: 0 0 30px rgba(0, 255, 65, 0.25);
    --gradient-primary: linear-gradient(135deg, rgba(0, 255, 65, 0.25) 0%, rgba(10, 10, 10, 0.9) 100%);
    --gradient-soft: linear-gradient(135deg, rgba(0, 255, 65, 0.12), rgba(0, 0, 0, 0.6));

    /* Header tool buttons */
    --header-tool-bg: linear-gradient(135deg, rgba(0, 255, 65, 0.16) 0%, rgba(10, 10, 10, 0.85) 100%);
    --header-tool-hover-bg: linear-gradient(135deg, rgba(0, 255, 65, 0.22) 0%, rgba(10, 10, 10, 0.92) 100%);
    --header-tool-border: rgba(0, 255, 65, 0.38);
    --header-tool-shadow: 0 20px 36px -26px rgba(0, 255, 65, 0.55);
    --header-tool-shadow-hover: 0 26px 44px -24px rgba(0, 255, 65, 0.68);
    --header-tool-text: var(--color-primary);
    --header-tool-accent: rgba(0, 255, 65, 0.25);
    --task-company-color: rgba(0, 255, 122, 0.92);
}

/* Light Theme (Premium) */
body.light-theme {
    /* Premium light palette */
    --font-body: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --light-bg: #f5f7ff;
    --light-card: rgba(255, 255, 255, 0.92);
    --light-card-secondary: #eef2ff;
    --light-border: rgba(92, 112, 255, 0.22);
    --light-border-strong: rgba(91, 63, 255, 0.38);
    --light-primary: #5b3fff;
    --light-secondary: #20d5ff;
    --light-accent: #ff6b6b;
    --light-success: #3dd598;
    --light-text: #1f2341;
    --light-text-secondary: #4f5b7c;
    --light-text-muted: #8a95b5;
    --light-shadow: rgba(15, 23, 42, 0.12);

    /* Theme tokens */
    --bg-primary: var(--light-bg);
    --bg-secondary: var(--light-card);
    --bg-tertiary: var(--light-card-secondary);
    --color-primary: var(--light-primary);
    --color-secondary: var(--light-secondary);
    --color-text: var(--light-text);
    --color-muted: var(--light-text-muted);
    --border-primary: var(--light-border);
    --shadow-color: var(--light-shadow);

    --surface-elevated: var(--light-card);
    --surface-muted: rgba(255, 255, 255, 0.78);
    --surface-glass: rgba(255, 255, 255, 0.6);
    --border-soft: var(--light-border);
    --border-strong: var(--light-border-strong);
    --focus-ring: rgba(91, 63, 255, 0.35);
    --shadow-soft: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
    --shadow-strong: 0 28px 60px -30px rgba(15, 23, 42, 0.28);
    --gradient-primary: linear-gradient(135deg, #5b3fff 0%, #20d5ff 100%);
    --gradient-soft: linear-gradient(155deg, rgba(91, 63, 255, 0.14) 0%, rgba(32, 213, 255, 0.08) 100%);

    --header-tool-bg: linear-gradient(135deg, rgba(91, 63, 255, 0.12) 0%, rgba(255, 255, 255, 0.94) 100%);
    --header-tool-hover-bg: linear-gradient(135deg, rgba(91, 63, 255, 0.16) 0%, rgba(255, 255, 255, 1) 100%);
    --header-tool-border: rgba(91, 63, 255, 0.32);
    --header-tool-shadow: 0 22px 42px -28px rgba(91, 63, 255, 0.28);
    --header-tool-shadow-hover: 0 28px 50px -26px rgba(91, 63, 255, 0.34);
    --header-tool-text: var(--light-text);
    --header-tool-accent: rgba(91, 63, 255, 0.2);
    --task-company-color: var(--light-text-secondary);
}

/* ===== BASE STYLES ===== */
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.25; }
h2 { font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.3; font-weight: 500; }
h3 { font-size: clamp(1.1rem, 3.5vw, 1.25rem); line-height: 1.35; font-weight: 500; }
h4 { font-size: clamp(1rem, 3vw, 1.125rem); line-height: 1.4; font-weight: 500; }
h5 { font-size: clamp(0.9rem, 2.5vw, 1rem); line-height: 1.4; font-weight: 500; }

p, span, li {
    font-size: 1rem;
    color: inherit;
}

label,
.form-label {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

small,
.label-sm {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-muted);
}

.text-muted {
    color: var(--color-muted);
}

.hidden {
    display: none !important;
}

.app-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.85rem, 2vw, 1.25rem);
    text-decoration: none;
    position: relative;
    color: inherit;
    padding: 4px 6px 4px 4px;
    border-radius: 14px;
    transition: transform 0.25s ease, box-shadow 0.35s ease;
}

.brand-logo:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.brand-logo__orb {
    position: relative;
    width: clamp(48px, 6vw, 56px);
    height: clamp(48px, 6vw, 56px);
    border-radius: 999px;
    background: radial-gradient(60% 60% at 30% 25%, rgba(22, 255, 131, 0.9), rgba(8, 52, 30, 0.95))
        , linear-gradient(160deg, rgba(12, 94, 55, 0.9), rgba(1, 15, 10, 0.95));
    box-shadow:
        0 20px 46px -18px rgba(22, 255, 140, 0.6),
        0 0 32px rgba(22, 255, 140, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.brand-logo__orb-glow {
    position: absolute;
    inset: -30%;
    border-radius: inherit;
    background: conic-gradient(from 0deg, rgba(22, 255, 140, 0.75), rgba(22, 255, 190, 0.1), rgba(22, 255, 140, 0.75));
    mix-blend-mode: screen;
    opacity: 0.75;
    animation: brand-orb-rotate 7s linear infinite;
}

.brand-logo__initial {
    position: relative;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.95rem, 2.6vw, 1.1rem);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(6, 22, 15, 0.92);
    z-index: 1;
}

.brand-logo__wordmark {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.brand-logo__wordmark::before {
    content: '';
    position: absolute;
    inset: -14px -18px -12px -12px;
    border-radius: 24px;
    background:
        radial-gradient(60% 65% at 15% 20%, rgba(22, 255, 140, 0.32), transparent 75%),
        radial-gradient(55% 60% at 80% 75%, rgba(0, 255, 188, 0.24), transparent 78%);
    filter: blur(20px);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

.brand-logo__title {
    font-size: clamp(1.6rem, 5.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    background: linear-gradient(100deg, #16ff65, #56ffe0 45%, #16ff65 90%);
    background-size: 180% 180%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: brand-title-shimmer 6s ease-in-out infinite;
}

.brand-logo__subtitle {
    font-size: clamp(0.64rem, 1.8vw, 0.85rem);
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(22, 255, 140, 0.72);
    text-shadow: 0 0 12px rgba(22, 255, 140, 0.38);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .brand-logo {
        gap: 0.75rem;
        padding-right: 4px;
    }

    .brand-logo__subtitle {
        letter-spacing: 0.26em;
        font-size: 0.7rem;
    }
}

@keyframes brand-title-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes brand-orb-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-logo:hover .brand-logo__orb {
    box-shadow:
        0 24px 50px -16px rgba(22, 255, 176, 0.72),
        0 0 40px rgba(22, 255, 176, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-logo:hover .brand-logo__subtitle {
    color: rgba(22, 255, 176, 0.82);
}

.app-header {
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.app-header__inner {
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.auth-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .auth-stack {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
}

/* ===== AUTH WIDGET ===== */
.auth-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    filter: blur(6px);
    transform-origin: right center;
    transition: max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, filter 0.35s ease;
}

.header-tools.expanded {
    max-width: 520px;
    opacity: 1;
    pointer-events: auto;
    filter: blur(0);
}

.header-tools > * {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-tools.expanded > * {
    opacity: 1;
    transform: translateX(0);
}

.header-tools.expanded > *:nth-child(1) { transition-delay: 0.05s; }
.header-tools.expanded > *:nth-child(2) { transition-delay: 0.09s; }
.header-tools.expanded > *:nth-child(3) { transition-delay: 0.13s; }
.header-tools.expanded > *:nth-child(4) { transition-delay: 0.17s; }
.header-tools.expanded > *:nth-child(5) { transition-delay: 0.21s; }
.header-tools.expanded > *:nth-child(6) { transition-delay: 0.25s; }

@media (max-width: 640px) {
    .header-tools.expanded {
        max-width: 100%;
    }
}

.header-tools .btn-secondary,
.header-tools .theme-toggle {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.header-tools.expanded .btn-secondary:hover,
.header-tools.expanded .theme-toggle:hover {
    transform: translateY(-1px);
}

.header-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--surface-elevated);
    color: var(--color-primary);
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
    line-height: 1.1;
}

.header-action--tool {
    position: relative;
    border-radius: 14px;
    padding: 0.55rem 1.15rem;
    border: 1px solid var(--header-tool-border);
    background: var(--header-tool-bg);
    color: var(--header-tool-text);
    box-shadow: var(--header-tool-shadow);
    letter-spacing: 0.01em;
    min-width: 0;
    isolation: isolate;
}

.header-action--tool::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    opacity: 0.65;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.header-action--tool::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mini-charts-picker {
    position: fixed;
    z-index: 1400;
    width: 280px;
    max-width: calc(100vw - 24px);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: linear-gradient(160deg, rgba(5, 22, 14, 0.96), rgba(9, 36, 22, 0.94));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    color: rgba(190, 255, 214, 0.9);
}

.mini-charts-picker__title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(237, 255, 245, 0.95);
}

.mini-charts-picker__subtitle {
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.25;
    color: rgba(167, 243, 208, 0.7);
}

.mini-charts-picker__list {
    margin-top: 14px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-charts-picker__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background: rgba(12, 36, 24, 0.45);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.mini-charts-picker__option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: rgba(34, 197, 94, 0.85);
}

.mini-charts-picker__option:hover {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(17, 46, 30, 0.6);
}

.mini-charts-picker__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(236, 253, 245, 0.92);
    cursor: pointer;
}

.mini-charts-picker__description {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(167, 243, 208, 0.64);
}

.mini-charts-picker__actions {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.mini-charts-picker__footer {
    margin-top: 8px;
    font-size: 0.7rem;
    color: rgba(167, 243, 208, 0.55);
    text-align: right;
}

.mini-charts-picker__select-all {
    font-size: 0.72rem;
    color: rgba(129, 199, 191, 0.85);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.mini-charts-picker__select-all:hover {
    color: rgba(74, 222, 128, 0.9);
}

.header-action:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-strong);
    color: var(--color-secondary);
}

.header-action--tool:hover {
    background: var(--header-tool-hover-bg);
    border-color: var(--header-tool-border);
    box-shadow: var(--header-tool-shadow-hover);
    color: var(--color-secondary);
    transform: translateY(-2px);
}

.header-action--tool:hover::before {
    opacity: 0.85;
}

.header-action--tool:hover::after {
    opacity: 1;
}

.header-action:active {
    transform: scale(0.97);
}

.header-action--tool:active {
    transform: scale(0.98);
    box-shadow: 0 14px 28px -24px rgba(0, 0, 0, 0.35);
}

body.light-theme .header-action {
    background: var(--surface-elevated);
    border-color: var(--border-soft);
    color: var(--color-primary);
    box-shadow: var(--shadow-soft);
}

body.light-theme .header-action--tool::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
    opacity: 0.75;
}

body.light-theme .header-action:hover {
    color: var(--color-secondary);
}

body.light-theme .mini-charts-picker {
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(155deg, rgba(241, 253, 248, 0.96), rgba(212, 245, 232, 0.94));
    color: rgba(23, 44, 36, 0.92);
    box-shadow: 0 24px 48px rgba(15, 118, 110, 0.18);
}

body.light-theme .mini-charts-picker__title {
    color: rgba(12, 74, 110, 0.9);
}

body.light-theme .mini-charts-picker__subtitle {
    color: rgba(15, 118, 110, 0.65);
}

body.light-theme .mini-charts-picker__option {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

body.light-theme .mini-charts-picker__option:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(236, 254, 255, 0.85);
}

body.light-theme .mini-charts-picker__option input[type="checkbox"] {
    accent-color: rgba(59, 130, 246, 0.8);
}

body.light-theme .mini-charts-picker__label {
    color: rgba(23, 44, 36, 0.88);
}

body.light-theme .mini-charts-picker__description {
    color: rgba(15, 118, 110, 0.55);
}

body.light-theme .mini-charts-picker__footer {
    color: rgba(15, 118, 110, 0.55);
}

body.light-theme .mini-charts-picker__select-all {
    color: rgba(59, 130, 246, 0.85);
}

.header-logout {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    transform: translateY(-6px);
}

.header-logout.visible {
    opacity: 1;
    transform: translateY(0);
}

.header-logout:hover {
    transform: translateY(-2px);
    box-shadow: var(--header-tool-shadow-hover);
}

body.light-theme .header-logout {
    color: var(--header-tool-text);
}

body.light-theme .brand-logo__orb {
    background:
        radial-gradient(55% 55% at 30% 28%, rgba(255, 255, 255, 0.95), transparent 70%),
        radial-gradient(circle at 70% 75%, rgba(32, 213, 255, 0.35), transparent 55%),
        linear-gradient(145deg, rgba(238, 242, 255, 0.98) 0%, rgba(200, 210, 255, 0.75) 50%, rgba(170, 180, 240, 0.85) 100%);
    box-shadow:
        0 16px 38px -14px rgba(91, 63, 255, 0.25),
        0 0 24px rgba(32, 213, 255, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7),
        inset 0 -8px 20px rgba(91, 63, 255, 0.12);
}

body.light-theme .brand-logo__wordmark::before {
    background:
        radial-gradient(70% 85% at 12% 18%, rgba(91, 63, 255, 0.24), transparent 78%),
        radial-gradient(65% 70% at 80% 78%, rgba(209, 233, 255, 0.22), transparent 82%);
    opacity: 0.82;
    filter: blur(22px);
}

body.light-theme .brand-logo__wordmark {
    color: var(--color-text);
}

body.light-theme .brand-logo__initial {
    color: rgba(91, 63, 255, 0.88);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

body.light-theme .brand-logo__title {
    background: linear-gradient(105deg, #5b3fff, #20d5ff 50%, #5b3fff 90%);
    background-size: 180% 180%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.light-theme .brand-logo__subtitle {
    color: rgba(56, 54, 132, 0.88);
    text-shadow: 0 6px 16px rgba(91, 63, 255, 0.25);
}

body.light-theme .brand-logo__orb-glow {
    background: conic-gradient(from 0deg, rgba(91, 63, 255, 0.22), rgba(32, 213, 255, 0.12), rgba(91, 63, 255, 0.22));
    opacity: 0.35;
    mix-blend-mode: multiply;
}

body.light-theme .brand-logo:hover .brand-logo__orb {
    box-shadow:
        0 20px 44px -12px rgba(91, 63, 255, 0.32),
        0 0 32px rgba(32, 213, 255, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.85),
        inset 0 -8px 24px rgba(91, 63, 255, 0.18);
}

.auth-widget > * {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.auth-widget > *:nth-child(1) {
    transition-delay: 0s;
}

.auth-widget > *:nth-child(2) {
    transition-delay: 0.08s;
}

.auth-widget.expanded > * {
    opacity: 1;
    transform: translateY(0);
}

.auth-trigger {
    gap: 0.5rem;
    padding-left: 0.6rem;
}

.auth-trigger__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--gradient-soft);
    color: var(--color-text);
    overflow: hidden;
    position: relative;
}

.auth-trigger__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-trigger__status {
    font-size: 14px;
    font-weight: 500;
}

.auth-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 60;
}

.auth-panel {
    position: fixed;
    top: 88px;
    right: 24px;
    width: min(320px, calc(100vw - 32px));
    max-width: calc(100% - 32px);
    z-index: 70;
}

.auth-panel__inner {
    background: var(--surface-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.auth-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 0.75rem;
    gap: 1rem;
}

.auth-panel__title {
    font-size: 18px;
    color: var(--color-text);
}

.auth-panel__subtitle {
    margin: 0.25rem 0 0;
    font-size: 13px;
    color: var(--color-muted);
}

.auth-panel__close {
    background: transparent;
    border: none;
    color: var(--color-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.auth-panel__close:hover {
    color: var(--color-text);
}

.auth-panel__profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 1.25rem 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1px dashed var(--border-soft);
}

.auth-panel__profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--gradient-soft);
    color: var(--color-text);
    overflow: hidden;
}

.auth-panel__profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-panel__profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.auth-panel__profile-username {
    font-size: 13px;
}

.auth-panel__content {
    padding: 0 1.25rem 1rem;
}

.auth-panel__login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.auth-panel__fallback {
    margin-top: 1rem;
    text-align: center;
}

.auth-panel__fallback-text {
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}

.auth-panel__fallback-link {
    display: inline-block;
    text-decoration: none;
}

.auth-panel__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#telegramBotLogin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bot-login-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bot-login-button__label {
    white-space: nowrap;
}

.auth-panel__footer {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.auth-panel__logout {
    font-size: 14px;
}

body.light-theme .auth-trigger {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(209, 213, 255, 0.58));
    border-color: rgba(91, 63, 255, 0.25);
    color: var(--color-primary);
    box-shadow: 0 22px 38px -26px rgba(15, 23, 42, 0.45), inset 0 0 0 1px rgba(91, 63, 255, 0.08);
}

body.light-theme .auth-trigger:hover {
    border-color: rgba(91, 63, 255, 0.55);
    box-shadow: 0 24px 44px -24px rgba(91, 63, 255, 0.45);
}

body.light-theme .auth-trigger.pulse-highlight {
    animation: auth-trigger-pulse 1.8s ease-in-out infinite;
}

body.light-theme .auth-trigger__avatar {
    background: linear-gradient(135deg, rgba(91, 63, 255, 0.18), rgba(29, 78, 216, 0.12));
    color: var(--color-primary);
}

@media (max-width: 640px) {
    .auth-panel {
        top: auto;
        right: 16px;
        left: 16px;
        bottom: 24px;
        width: auto;
    }

    .auth-panel__inner {
        border-radius: 16px;
    }
}

/* Accessibility */
button,
.btn-primary,
.btn-secondary,
.btn-ghost,
.chip,
.pill,
input,
textarea,
select,
.toggle-switch,
.tasks-refresh-btn,
.tasks-header,
.campaign-card,
.stat-card,
.task-item,
.json-editor-btn,
.pill-pagination button {
    transition: all 0.2s ease;
}

button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.chip:focus-visible,
.pill:focus-visible,
.toggle-switch:focus-visible,
.tasks-refresh-btn:focus-visible,
.campaign-card:focus-visible,
.stat-card:focus-visible,
.task-item:focus-visible,
.pill-pagination button:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-secondary);
}

/* Input Styling */
input, textarea {
    background: var(--surface-elevated);
    border: 1px solid var(--border-soft);
    color: var(--color-text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px -8px var(--shadow-color);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ===== BUTTONS ===== */
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 20px 40px -24px rgba(91, 63, 255, 0.55);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 48px -22px rgba(91, 63, 255, 0.65);
    filter: brightness(1.03);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 18px 34px -24px rgba(91, 63, 255, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-primary);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    color: var(--color-secondary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-primary);
}

.btn[disabled],
.btn-primary[disabled],
.btn-secondary[disabled],
.btn-ghost[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== CARDS & CONTAINERS ===== */

/* Stat Cards */
.stat-card {
    @apply bg-gray-900 border border-green-500/30 rounded-lg p-6;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card h3,
.stat-card .stat-card-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    text-shadow: 0 10px 24px rgba(0, 255, 65, 0.35);
}

.stat-card .stat-subtitle {
    font-size: 14px;
    color: var(--color-muted);
    margin-top: 8px;
}

.stat-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

/* Chart Containers */
.chart-container {
    @apply bg-gray-900 border border-green-500/30 rounded-lg p-4;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
    height: 280px;
    display: flex;
    flex-direction: column;
}

.chart-container canvas {
    flex: 1;
    min-height: 200px;
}

/* ===== CAMPAIGN CARDS ===== */

.campaign-card {
    @apply bg-gray-900 border border-green-500/30 rounded-lg p-4 transition-all duration-300;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
    min-height: 80px;
}

.campaign-card.clickable {
    @apply cursor-pointer;
}

.campaign-card.clickable:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.campaign-card:not(.clickable) {
    @apply cursor-default;
}

.campaign-card.loading {
    @apply relative;
}

.campaign-card.expanded {
    @apply border-green-500;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

/* Campaign Loading States */
.campaign-loading {
    @apply absolute inset-0 bg-gray-900/80 flex items-center justify-center rounded-lg;
    z-index: 10;
}

.loading-spinner {
    @apply w-8 h-8 border-2 border-green-500 border-t-transparent rounded-full animate-spin;
}

/* Campaign Expanded Content */
.campaign-expanded {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.45s ease, opacity 0.3s ease, transform 0.3s ease;
}

.campaign-card.expanded .campaign-expanded {
    max-height: 4000px;
    opacity: 1;
    transform: translateY(0);
}

.campaign-card.expanded .campaign-expanded > div {
    border-top-color: rgba(0, 255, 65, 0.45);
    box-shadow: inset 0 1px 0 rgba(0, 255, 65, 0.2);
}

.campaign-expanded.loading {
    min-height: 72px;
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.05), rgba(0, 0, 0, 0));
}

/* Campaign Header */
.campaign-header {
    @apply flex justify-between items-center mb-3;
}

.campaign-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.campaign-header-main {
    min-width: 0;
}

.campaign-name-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.campaign-name-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: rgba(240, 255, 240, 0.92);
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

body.light-theme .campaign-name-button {
    color: var(--color-text);
}

.campaign-name-button:hover,
.campaign-name-button:focus-visible {
    color: var(--color-primary);
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.45);
}

.campaign-name-button:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.campaign-name-button[disabled],
.campaign-name-button[aria-disabled="true"] {
    cursor: default;
    opacity: 0.6;
    text-shadow: none;
}

.campaign-wb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 65, 0.16);
    background: rgba(0, 255, 65, 0.08);
    color: rgba(0, 255, 122, 0.68);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.campaign-wb-link:hover,
.campaign-wb-link:focus-visible {
    color: var(--color-primary);
    background: rgba(0, 255, 65, 0.16);
    border-color: rgba(0, 255, 65, 0.32);
    transform: translateX(1px);
    outline: none;
}

body.light-theme .campaign-wb-link {
    border-color: rgba(91, 63, 255, 0.2);
    background: rgba(91, 63, 255, 0.08);
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .campaign-wb-link:hover,
body.light-theme .campaign-wb-link:focus-visible {
    background: rgba(91, 63, 255, 0.14);
    border-color: rgba(91, 63, 255, 0.28);
    color: var(--color-secondary);
}

.campaign-wb-icon {
    width: 16px;
    height: 16px;
}

.campaign-wb-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.campaign-header-meta {
    min-width: 0;
}

.campaign-top-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.campaign-top-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 122, 0.35);
    background: linear-gradient(135deg, rgba(0, 255, 122, 0.24) 0%, rgba(0, 128, 96, 0.16) 100%);
    color: rgba(222, 255, 240, 0.9);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

.campaign-top-badge:hover .campaign-top-badge-pill {
    transform: translateY(-1px) scale(1.015);
    box-shadow: 0 10px 26px rgba(0, 255, 122, 0.22);
}

.campaign-top-badge--active .campaign-top-badge-pill {
    background: linear-gradient(135deg, rgba(0, 255, 163, 0.4) 0%, rgba(0, 120, 88, 0.24) 100%);
    border-color: rgba(0, 255, 163, 0.55);
    color: rgba(255, 255, 255, 0.96);
}

.campaign-top-badge-tooltip {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(6, 20, 14, 0.96);
    border: 1px solid rgba(0, 255, 122, 0.25);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    z-index: 32;
}

.campaign-top-badge:hover .campaign-top-badge-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.campaign-top-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    font-size: 0.78rem;
    color: rgba(210, 255, 225, 0.92);
}

.campaign-top-badge-row + .campaign-top-badge-row {
    margin-top: 0.45rem;
}

.campaign-top-badge-row span:first-child {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(132, 255, 190, 0.85);
}

.campaign-top-badge-row span:last-child {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
}

body.light-theme .campaign-top-badge-pill {
    border-color: rgba(36, 191, 122, 0.28);
    background: linear-gradient(135deg, rgba(36, 191, 122, 0.2) 0%, rgba(124, 231, 173, 0.12) 100%);
    color: rgba(18, 58, 44, 0.92);
    box-shadow: 0 6px 14px rgba(10, 36, 26, 0.16);
}

body.light-theme .campaign-top-badge--active .campaign-top-badge-pill {
    background: linear-gradient(135deg, rgba(62, 214, 150, 0.36) 0%, rgba(121, 214, 180, 0.2) 100%);
    color: rgba(5, 42, 24, 0.96);
}

body.light-theme .campaign-top-badge-tooltip {
    background: rgba(248, 255, 252, 0.95);
    border-color: rgba(36, 191, 122, 0.28);
    box-shadow: 0 18px 32px rgba(26, 67, 47, 0.18);
}

body.light-theme .campaign-top-badge-row {
    color: rgba(16, 48, 34, 0.9);
}

body.light-theme .campaign-top-badge-row span:first-child {
    color: rgba(28, 122, 84, 0.7);
}

body.light-theme .campaign-top-badge-row span:last-child {
    color: rgba(4, 38, 24, 0.9);
}

/* Mini Charts */
.campaign-mini-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
    width: 100%;
    height: auto;
}

.mini-chart-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-chart-header {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mini-chart-caption {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(180, 255, 210, 0.85);
}

.mini-chart-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 14px;
    color: rgba(0, 255, 122, 0.95);
}

.mini-chart-canvas {
    position: relative;
    height: 38px;
}

.mini-chart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.mini-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(34, 197, 94, 0.35);
    color: rgba(148, 187, 169, 0.9);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(12, 24, 18, 0.4);
}

.campaigns-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.campaigns-sort-control {
    display: flex;
    align-items: center;
}

.campaigns-range-control {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

.campaigns-range-slider {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

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

.campaigns-range-labels,
.campaigns-sort-labels {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.campaigns-range-summary {
    margin-top: 1.35rem;
    width: 100%;
}

.range-summary-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 0.7rem 1.8rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.16), rgba(0, 120, 66, 0.12));
    border: 1px solid rgba(0, 255, 65, 0.35);
    box-shadow: 0 18px 38px -24px rgba(0, 210, 96, 0.45);
    backdrop-filter: blur(6px);
    width: min(100%, 1080px);
    margin: 0 auto;
}

body.light-theme .range-summary-pill {
    background: linear-gradient(135deg, rgba(0, 120, 66, 0.18), rgba(0, 255, 165, 0.12));
    border-color: rgba(0, 120, 66, 0.35);
    box-shadow: 0 22px 40px -24px rgba(0, 140, 45, 0.32);
}

.range-summary-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.range-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 88px;
}

.range-summary-label {
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.range-summary-value {
    font-weight: 600;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
}

body.light-theme .range-summary-label {
    color: rgba(0, 44, 30, 0.65);
}

body.light-theme .range-summary-value {
    color: rgba(0, 44, 30, 0.88);
}

.range-summary-divider {
    align-self: stretch;
    width: 1px;
    background: rgba(0, 255, 65, 0.35);
}

@media (max-width: 1024px) {
    .range-summary-pill {
        width: 100%;
        gap: 1.2rem;
        border-radius: 36px;
    }
    .range-summary-section {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .campaigns-range-summary {
        margin-top: 1rem;
    }
    .range-summary-pill {
        flex-direction: column;
        align-items: stretch;
        gap: 1.1rem;
        padding: 1rem 1.25rem;
    }
    .range-summary-section {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
    }
    .range-summary-item {
        min-width: 0;
        flex: 1 1 calc(33.333% - 0.75rem);
    }
    .range-summary-divider {
        display: none;
    }
}

.campaigns-range-labels .tabbed-button,
.campaigns-sort-labels .tabbed-button {
    font-size: 0.95rem;
}

body.light-theme .mini-chart-value {
    color: rgba(0, 120, 66, 0.85);
}

body.light-theme .mini-chart-empty {
    border-color: rgba(56, 189, 248, 0.25);
    background: rgba(231, 253, 246, 0.65);
    color: rgba(28, 56, 48, 0.8);
}

body.light-theme .mini-chart-caption {
    color: rgba(0, 64, 42, 0.75);
}

/* ===== REPORTS & TABLES ===== */

/* Compact Report Table */
.compact-report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 680px;
    font-size: 0.8rem;
    color: rgba(224, 255, 232, 0.92);
}

.compact-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-size: 0.75rem;
    background: rgba(6, 12, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 255, 65, 0.25);
    color: rgba(154, 230, 180, 0.8);
}

.compact-report-sticky {
    min-width: 160px;
}

.compact-report-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(4, 8, 6, 0.7);
    transition: background 0.2s ease, color 0.2s ease;
}

.compact-report-table tbody tr:nth-child(even) td {
    background: rgba(8, 16, 12, 0.78);
}

.compact-report-table tbody tr:hover td {
    background: rgba(14, 28, 20, 0.85);
}

.compact-report-table tbody td:first-child,
.compact-report-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    background: rgba(12, 20, 14, 0.92);
    box-shadow: 6px 0 16px -12px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.compact-report-table tbody td:first-child {
    color: rgba(154, 230, 180, 0.9);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.compact-report-table tbody tr:hover td:first-child {
    background: rgba(18, 32, 24, 0.95);
}

.compact-report-table tbody td .trend-up {
    color: #ff6b6b;
}

.compact-report-table tbody td .trend-down {
    color: #3dd598;
}

/* Compact Date Cell */
.compact-date-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 5px 6px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 65, 0.22);
    background: rgba(10, 18, 14, 0.6);
    transition: all 0.2s ease;
    font-weight: 600;
}

.compact-date-cell:hover {
    background: rgba(0, 255, 65, 0.12);
    border-color: rgba(0, 255, 65, 0.4);
    color: var(--neon-green);
}

.compact-date-cell.promo {
    border-color: rgba(255, 193, 7, 0.35);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(26, 26, 26, 0.85));
    box-shadow: 0 0 14px rgba(255, 193, 7, 0.25);
    color: #ffd166;
}

.compact-date-cell.promo.trend-down {
    background: linear-gradient(135deg, rgba(61, 213, 152, 0.35), rgba(26, 26, 26, 0.85));
    border-color: rgba(61, 213, 152, 0.45);
    color: #6bffbf;
}

.compact-date-cell.promo.trend-up {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.35), rgba(26, 26, 26, 0.85));
    border-color: rgba(255, 107, 107, 0.45);
    color: #ff8080;
}

.compact-date-cell.organic {
    border-color: rgba(61, 213, 152, 0.4);
    background: rgba(61, 213, 152, 0.12);
    color: #8bffd1;
}

.competitor-meta {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
}

.competitor-meta .product-thumb-link {
    flex: 1;
}

.competitor-meta .brand-caption {
    display: block;
    max-width: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 255, 65, 0.06);
    color: var(--neon-green);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: inset 0 0 0 rgba(0, 255, 65, 0.1);
    align-self: center;
}

.favorite-heart:hover,
.favorite-heart:focus-visible {
    outline: none;
    border-color: var(--neon-green);
    background: rgba(0, 255, 65, 0.12);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.25);
}

.favorite-heart .heart-icon {
    width: 16px;
    height: 16px;
    fill: transparent;
    stroke: rgba(0, 255, 65, 0.65);
    stroke-width: 1.5;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.favorite-heart.active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.32), rgba(8, 24, 16, 0.95));
    border-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.32);
}

.favorite-heart.active .heart-icon {
    fill: rgba(0, 255, 65, 0.8);
    stroke: rgba(8, 24, 16, 0.9);
}

/* Campaigns - Show More bar */
.campaigns-show-more {
    @apply flex items-center justify-center gap-3 uppercase;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 255, 65, 0.24);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.06), rgba(8, 24, 16, 0.9));
    color: var(--neon-green);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.campaigns-show-more:hover,
.campaigns-show-more:focus-visible {
    border-color: var(--neon-green);
    box-shadow: 0 0 24px rgba(0, 255, 65, 0.25);
    transform: translateY(-1px);
    outline: none;
}

.campaigns-show-more__icon {
    font-size: 1.25rem;
    line-height: 1;
    text-shadow: inherit;
}

.campaigns-show-more__label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
}

/* Campaign Report Results */
.campaign-report-results {
    margin-top: 1.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.campaign-report-results.hidden {
    opacity: 0;
    transform: translateY(12px);
}

.campaign-report-results:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.campaign-report-shell {
    position: relative;
    border-radius: 20px;
    padding: 24px 28px;
    background: var(--gradient-soft);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.campaign-card.expanded .campaign-report-shell {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-strong);
}

.campaign-report-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.campaign-report-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(154, 230, 180, 0.75);
}

.campaign-report-meta .campaign-load-time {
    font-family: 'JetBrains Mono', monospace;
    color: inherit;
}

.campaign-range-toggle,
.campaign-limit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.18);
    background: rgba(0, 255, 65, 0.06);
    box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.08);
}

.range-pill,
.limit-pill {
    border: none;
    padding: 4px 12px;
    border-radius: 9999px;
    background: transparent;
    color: rgba(154, 230, 180, 0.75);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    cursor: pointer;
}

.range-pill:hover,
.limit-pill:hover,
.range-pill:focus-visible,
.limit-pill:focus-visible {
    color: var(--neon-green);
    outline: none;
}

.range-pill.active,
.limit-pill.active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.25), rgba(8, 24, 16, 0.95));
    color: var(--neon-green);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.22);
}

.campaign-report-table {
    margin-top: 18px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: var(--surface-elevated);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: auto;
    max-height: 840px;
    backdrop-filter: blur(10px);
}

.campaign-report-table::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.campaign-report-table::-webkit-scrollbar-track {
    background: transparent;
}

.campaign-report-table::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 65, 0.25);
    border-radius: 9999px;
}

.campaign-report-table {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 65, 0.35) transparent;
}

/* Position Info */
.position-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    width: 100%;
}

.promo-position {
    font-size: 1.375rem !important;
    font-weight: 700;
}

.arrow-left {
    @apply text-xs;
}

.organic-position {
    font-size: 1.125rem !important;
    font-weight: 600;
}

/* Product Thumbnails */
.product-thumb-link {
    display: inline-block;
    text-decoration: none;
}

.product-thumb-link .thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(0,255,65,0.25);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.08);
}

.product-thumb-link .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb-link .badge-top-right {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 214, 102, 0.6);
    color: #ffd166;
    border-radius: 6px;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.product-thumb-link .rating-small {
    top: 1px;
    right: 1px;
    font-size: 10px;
    padding: 1px 4px;
}

.product-thumb-link .badge-bottom-right {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(0,255,65,0.35);
    color: #9ae6b4;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.product-thumb-link .brand-caption {
    margin-top: 6px;
    font-size: 12px;
    color: #9ae6b4;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Position Cell & Podium */
.position-cell {
    @apply relative cursor-pointer;
}

.position-cell:hover {
    @apply bg-green-500/20;
}

.podium-item {
    @apply bg-gray-800 border border-green-500/30 rounded p-3 mb-2;
}

.podium-item.ours {
    @apply border-green-400 bg-green-500/10;
}

.podium-item.top {
    @apply border-blue-400 bg-blue-500/10;
}

.position-badge {
    @apply inline-block px-2 py-1 rounded text-xs font-medium;
}

.position-badge.promo {
    @apply bg-yellow-500/20 text-yellow-400 border border-yellow-500/50;
}

.position-badge.organic {
    @apply bg-green-500/20 text-green-400 border border-green-500/50;
}

/* Totals Row */
.totals-row {
    @apply border-b-2 border-green-500/50;
}

.totals-row td {
    @apply bg-gray-800/80;
}

.totals-cell {
    @apply p-1 rounded border border-green-500/30;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, rgba(26, 26, 26, 0.8) 100%);
}

.totals-info {
    @apply space-y-1;
}

.total-item {
    @apply flex justify-between items-center text-xs;
}

.total-label {
    @apply text-gray-400 font-medium;
}

.total-value {
    @apply font-bold;
    text-shadow: 0 0 3px currentColor;
}

/* ===== TASKS ===== */
.tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.14) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(0, 255, 65, 0.32);
    box-shadow: 0 24px 60px -28px rgba(0, 255, 65, 0.35);
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    position: relative;
    overflow: hidden;
}

.tasks-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(0, 255, 65, 0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.tasks-header:hover::before,
.tasks-header.expanded::before {
    opacity: 1;
}

.tasks-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 32px 70px -32px rgba(0, 255, 65, 0.45);
    border-color: rgba(0, 255, 65, 0.45);
}

.tasks-header.expanded {
    border-color: rgba(0, 255, 65, 0.55);
}

.tasks-header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tasks-title {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.tasks-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(154, 230, 180, 0.7);
}

.tasks-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.32);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 255, 65, 0.85);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.35s ease, color 0.3s ease;
}

.tasks-toggle-icon::before {
    content: "";
    width: 10px;
    height: 10px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.35s ease;
}

.tasks-header.expanded .tasks-toggle-icon {
    background: rgba(0, 255, 65, 0.18);
    border-color: rgba(0, 255, 65, 0.55);
    color: rgba(0, 255, 65, 0.95);
}

.tasks-header.expanded .tasks-toggle-icon::before {
    transform: rotate(135deg);
}

.tasks-interface {
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px);
    transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.4s ease;
    overflow: hidden;
    pointer-events: none;
}

.tasks-interface:not(.hidden) {
    max-height: 2400px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 20px;
    pointer-events: auto;
}

.tasks-shell {
    border-radius: 24px;
    padding: 28px;
    background: linear-gradient(155deg, rgba(0, 255, 65, 0.12) 0%, rgba(8, 8, 8, 0.92) 100%);
    border: 1px solid rgba(0, 255, 65, 0.25);
    box-shadow: 0 30px 80px -42px rgba(0, 255, 65, 0.45);
    backdrop-filter: blur(18px);
}

.tasks-columns {
    display: flex;
    gap: 28px;
    align-items: stretch;
    flex-wrap: wrap;
}

.tasks-sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    width: 100%;
}

.tasks-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-radius: 20px;
    padding: 24px;
    background: rgba(6, 12, 10, 0.88);
    border: 1px solid rgba(0, 255, 65, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    min-height: 420px;
}

.tasks-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tasks-sidebar-title {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(154, 230, 180, 0.85);
}

.tasks-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.28);
    background: rgba(0, 0, 0, 0.55);
    color: rgba(0, 255, 65, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.tasks-refresh-btn:hover {
    background: rgba(0, 255, 65, 0.15);
    border-color: rgba(0, 255, 65, 0.45);
    color: rgba(0, 255, 65, 0.95);
    transform: rotate(90deg);
}

.tasks-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}

.tasks-list::-webkit-scrollbar {
    width: 6px;
}

.tasks-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 65, 0.25);
    border-radius: 9999px;
}

.tasks-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 65, 0.3) transparent;
}

.task-item {
    position: relative;
    border-radius: 16px;
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(0, 255, 65, 0.1), rgba(8, 12, 10, 0.75));
    border: 1px solid rgba(0, 255, 65, 0.2);
    color: rgba(214, 254, 230, 0.9);
    box-shadow: 0 18px 40px -28px rgba(0, 255, 65, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    cursor: pointer;
}

.task-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 4px;
    border-radius: 9999px;
    background: transparent;
    transition: background 0.25s ease, opacity 0.25s ease;
    opacity: 0;
}

.task-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 65, 0.4);
    background: linear-gradient(145deg, rgba(0, 255, 65, 0.18), rgba(10, 18, 12, 0.85));
    box-shadow: 0 24px 48px -26px rgba(0, 255, 65, 0.45);
}

.task-item.selected {
    border-color: rgba(0, 255, 65, 0.55);
    background: linear-gradient(145deg, rgba(0, 255, 65, 0.26), rgba(10, 18, 12, 0.92));
    box-shadow: 0 28px 60px -22px rgba(0, 255, 65, 0.55);
}

.task-item.selected::before {
    background: var(--gradient-primary);
    opacity: 1;
}

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

.task-id {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.task-company {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--task-company-color);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    line-height: 1.4;
    min-width: 0;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.task-company:hover {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 255, 122, 0.35);
}

.task-company:focus-visible {
    outline: none;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 255, 122, 0.45);
}

.task-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.status-dot.running {
    background: #20d5ff;
}

.status-dot.paused {
    background: #ffb347;
}

.status-dot.finished {
    background: #3dd598;
}

.status-dot.error {
    background: #ff6b6b;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(198, 255, 214, 0.8);
}

.tasks-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tasks-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tasks-empty {
    border-radius: 20px;
    padding: 48px 32px;
    background: rgba(6, 12, 10, 0.82);
    border: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: rgba(154, 230, 180, 0.8);
}

.tasks-empty-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

.tasks-empty-subtitle {
    font-size: 0.82rem;
    color: rgba(154, 230, 180, 0.65);
    max-width: 320px;
}

.task-details-card {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(150deg, rgba(0, 255, 65, 0.1), rgba(8, 8, 8, 0.9));
    border: 1px solid rgba(0, 255, 65, 0.25);
    box-shadow: 0 30px 70px -38px rgba(0, 255, 65, 0.45);
    color: rgba(214, 254, 230, 0.92);
}

.task-details-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-demo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(0, 255, 65, 0.18);
    border: 1px solid rgba(0, 255, 65, 0.45);
    color: var(--color-primary);
}

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

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

.task-action-note {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px dashed rgba(0, 255, 65, 0.45);
    color: rgba(214, 254, 230, 0.8);
    background: rgba(0, 255, 65, 0.08);
}

.task-action-btn {
    border-radius: 9999px;
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.task-action-btn.start {
    background: linear-gradient(135deg, rgba(61, 213, 152, 0.6), rgba(15, 99, 70, 0.85));
    border-color: rgba(61, 213, 152, 0.5);
    color: #0a1f15;
    box-shadow: 0 18px 38px -20px rgba(61, 213, 152, 0.65);
}

.task-action-btn.stop {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.75), rgba(161, 83, 0, 0.85));
    border-color: rgba(255, 193, 7, 0.45);
    color: #2a1600;
    box-shadow: 0 18px 38px -20px rgba(255, 193, 7, 0.55);
}

.task-action-btn.delete {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.78), rgba(161, 30, 53, 0.9));
    border-color: rgba(255, 107, 107, 0.5);
    color: #2a020b;
    box-shadow: 0 18px 38px -20px rgba(255, 107, 107, 0.6);
}

.task-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.task-section {
    margin-bottom: 18px;
}

.task-section:last-child {
    margin-bottom: 0;
}

.task-section-content {
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(6, 12, 10, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: rgba(185, 255, 210, 0.85);
}

.task-section-content pre {
    margin: 0;
   white-space: pre-wrap;
   word-break: break-word;
}

.ai-response-card {
    border-radius: 18px;
    padding: 20px 22px;
    background: linear-gradient(145deg, rgba(0, 255, 65, 0.14), rgba(6, 12, 10, 0.92));
    border: 1px solid rgba(0, 255, 65, 0.28);
    box-shadow: 0 20px 48px -30px rgba(0, 255, 65, 0.4);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-response-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.ai-response-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: rgba(214, 254, 230, 0.92);
    line-height: 1.7;
    font-size: 0.95rem;
}

.ai-response-body .markdown-heading {
    margin: 0;
    color: var(--color-primary);
}

.ai-response-body .markdown-paragraph {
    margin: 0;
}

.ai-response-body .markdown-list,
.ai-response-body .markdown-ol {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-response-body .markdown-list li,
.ai-response-body .markdown-ol li {
    line-height: 1.6;
}

.ai-response-body .markdown-quote {
    border-left: 3px solid rgba(0, 255, 65, 0.4);
    margin: 0;
    padding-left: 14px;
    color: rgba(214, 254, 230, 0.8);
    font-style: italic;
}

.ai-response-body .markdown-code {
    background: rgba(0, 0, 0, 0.38);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}

.ai-response-body .markdown-code code {
    background: transparent;
    padding: 0;
}

.ai-response-body code {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.ai-response-body .markdown-hr {
    border: none;
    border-top: 1px dashed rgba(0, 255, 65, 0.28);
    margin: 12px 0;
}

.ai-response-body .markdown-image {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 65, 0.25);
    box-shadow: 0 14px 28px -20px rgba(0, 255, 65, 0.45);
}

body.light-theme .ai-response-body {
    color: var(--color-text);
}

body.light-theme .ai-response-body .markdown-heading {
    color: var(--color-primary);
}

body.light-theme .ai-response-body .markdown-quote {
    border-left: 3px solid rgba(91, 63, 255, 0.35);
    color: var(--color-muted);
}

body.light-theme .ai-response-body .markdown-code {
    background: rgba(238, 242, 255, 0.85);
    border: 1px solid rgba(91, 63, 255, 0.22);
    box-shadow: 0 16px 40px -28px rgba(91, 63, 255, 0.25);
}

body.light-theme .ai-response-body code {
    background: rgba(91, 63, 255, 0.12);
    color: var(--color-primary);
}

body.light-theme .ai-response-body .markdown-hr {
    border-top-color: rgba(91, 63, 255, 0.24);
}

body.light-theme .ai-response-body .markdown-image {
    border-color: rgba(91, 63, 255, 0.22);
    box-shadow: 0 20px 48px -28px rgba(91, 63, 255, 0.28);
}

/* Light Theme Overrides – Tasks */
body.light-theme .tasks-header {
    background: linear-gradient(140deg, rgba(91, 63, 255, 0.12) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(91, 63, 255, 0.22);
    box-shadow: 0 26px 60px -32px rgba(15, 23, 42, 0.35);
    color: var(--color-primary);
}

body.light-theme .tasks-header::before {
    background: radial-gradient(circle at top left, rgba(91, 63, 255, 0.28), transparent 60%);
}

body.light-theme .app-header {
    border-bottom-color: rgba(91, 63, 255, 0.18);
}

body.light-theme .tasks-subtitle {
    color: rgba(91, 63, 255, 0.55);
}

body.light-theme .tasks-toggle-icon {
    border-color: rgba(91, 63, 255, 0.28);
    background: rgba(255, 255, 255, 0.72);
    color: var(--color-primary);
}

body.light-theme .tasks-header.expanded .tasks-toggle-icon {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
}

body.light-theme .tasks-shell {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.97), rgba(238, 242, 255, 0.8));
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: 0 40px 90px -45px rgba(15, 23, 42, 0.45);
}

body.light-theme .tasks-sidebar-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(91, 63, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.light-theme .tasks-sidebar-title {
    color: var(--color-muted);
}

body.light-theme .tasks-refresh-btn {
    border-color: rgba(91, 63, 255, 0.2);
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-primary);
}

body.light-theme .tasks-refresh-btn:hover {
    background: rgba(91, 63, 255, 0.12);
    border-color: rgba(91, 63, 255, 0.35);
    color: var(--color-secondary);
}

body.light-theme .tasks-list::-webkit-scrollbar-thumb {
    background: rgba(91, 63, 255, 0.25);
}

body.light-theme .tasks-list {
    scrollbar-color: rgba(91, 63, 255, 0.35) transparent;
}

body.light-theme .task-item {
    background: linear-gradient(145deg, rgba(91, 63, 255, 0.12), rgba(255, 255, 255, 0.94));
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.3);
    color: var(--color-text);
}

body.light-theme .task-item:hover {
    background: linear-gradient(145deg, rgba(91, 63, 255, 0.2), rgba(255, 255, 255, 0.98));
    border-color: rgba(91, 63, 255, 0.35);
    box-shadow: 0 24px 44px -26px rgba(15, 23, 42, 0.35);
}

body.light-theme .task-item.selected {
    background: linear-gradient(145deg, rgba(91, 63, 255, 0.28), rgba(255, 255, 255, 1));
    border-color: rgba(91, 63, 255, 0.45);
    box-shadow: 0 30px 54px -24px rgba(91, 63, 255, 0.45);
}

body.light-theme .task-company {
    color: var(--task-company-color);
}

body.light-theme .task-company:hover,
body.light-theme .task-company:focus-visible {
    text-shadow: none;
}

body.light-theme .status-text {
    color: var(--color-muted);
}

body.light-theme .chip,
body.light-theme .pill,
body.light-theme .filter-chip {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(91, 63, 255, 0.2);
    color: var(--color-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.light-theme .chip:hover,
body.light-theme .pill:hover,
body.light-theme .filter-chip:hover {
    background: rgba(91, 63, 255, 0.12);
    border-color: rgba(91, 63, 255, 0.35);
    color: var(--color-primary);
}

body.light-theme .chip.is-active,
body.light-theme .pill.is-active,
body.light-theme .filter-chip.is-active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 18px 34px -20px rgba(91, 63, 255, 0.55);
}

body.light-theme .status-dot.running {
    background: #3dd598;
}

body.light-theme .status-dot.paused {
    background: #ffb347;
}

body.light-theme .status-dot.finished {
    background: #5bbcff;
}

body.light-theme .status-dot.error {
    background: #ff6b6b;
}

body.light-theme .tasks-empty {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(91, 63, 255, 0.18);
    color: var(--color-muted);
    box-shadow: 0 26px 60px -38px rgba(15, 23, 42, 0.35);
}

body.light-theme .tasks-empty-title {
    color: var(--color-primary);
}

body.light-theme .tasks-empty-subtitle {
    color: var(--color-muted);
}

body.light-theme .task-details-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.82));
    border-color: rgba(91, 63, 255, 0.18);
    color: var(--color-text);
    box-shadow: 0 36px 70px -38px rgba(15, 23, 42, 0.45);
}

body.light-theme .stat-card h3,
body.light-theme .stat-card .stat-card-title {
    color: var(--color-muted);
}

body.light-theme .stat-card .stat-value {
    color: var(--color-primary);
    text-shadow: 0 24px 40px -24px rgba(91, 63, 255, 0.55);
}

body.light-theme .task-section-content {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(91, 63, 255, 0.16);
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.light-theme .task-section-content pre {
    color: var(--color-muted);
}

body.light-theme .task-action-btn {
    box-shadow: none;
}

body.light-theme .task-action-btn.start {
    background: linear-gradient(135deg, rgba(61, 213, 152, 0.9), rgba(16, 196, 120, 0.85));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 24px 48px -26px rgba(61, 213, 152, 0.45);
}

body.light-theme .task-action-btn.stop {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 158, 0, 0.85));
    color: #1f1f1f;
    border-color: transparent;
    box-shadow: 0 24px 48px -26px rgba(255, 193, 7, 0.4);
}

body.light-theme .task-action-btn.delete {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(255, 82, 82, 0.9));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 24px 48px -26px rgba(255, 107, 107, 0.45);
}

body.light-theme .task-action-btn:hover {
    filter: brightness(1.04);
}

@media (max-width: 1024px) {
    .tasks-columns {
        flex-direction: column;
    }

    .tasks-sidebar {
        max-width: 100%;
    }

    .tasks-list {
        max-height: 280px;
    }
}

@media (max-width: 768px) {
    .tasks-shell {
        padding: 20px;
    }

    .tasks-header {
        padding: 18px;
    }
}

/* JSON Preview */
.json-preview-container {
    @apply cursor-pointer transition-all duration-300;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, rgba(26, 26, 26, 0.8) 100%);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

.json-preview-container:hover {
    border-color: rgba(0, 255, 65, 0.6);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(26, 26, 26, 0.9) 100%);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

.json-preview-header {
    @apply flex justify-between items-center mb-2;
}

.json-preview-title {
    @apply text-green-400 font-semibold text-sm;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

.json-preview-badge {
    @apply text-xs text-green-300 px-2 py-0.5 rounded border border-green-500/40;
    background: rgba(0, 255, 65, 0.06);
}

.json-preview-icon {
    @apply text-green-400 text-lg;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.json-preview-container:hover .json-preview-icon {
    opacity: 1;
}

.json-preview-content {
    @apply relative;
}

.json-preview-text {
    @apply text-gray-300 text-sm font-mono;
    margin: 0;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

/* ===================================================
   LIGHT THEME OVERRIDES – Startups 2025
   =================================================== */

body.light-theme {
    background: var(--bg-primary);
    color: var(--color-text);
}

body.light-theme a {
    color: var(--color-primary);
    transition: color 0.25s ease;
}

body.light-theme a:hover {
    color: var(--color-secondary);
}

body.light-theme input,
body.light-theme textarea {
    background: var(--surface-glass);
    border-color: var(--border-primary);
    color: var(--color-text);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 32px -24px rgba(15, 23, 42, 0.4);
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: var(--color-muted);
    opacity: 0.85;
}

body.light-theme .btn-primary {
    @apply border-0;
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 18px 38px -20px rgba(91, 63, 255, 0.75);
}

body.light-theme .btn-primary:hover {
    filter: brightness(1.03);
    box-shadow: 0 24px 46px -20px rgba(91, 63, 255, 0.85);
}

body.light-theme .btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 14px 28px -20px rgba(91, 63, 255, 0.6);
}

body.light-theme .btn-primary[disabled] {
    background: linear-gradient(135deg, rgba(91, 63, 255, 0.18), rgba(32, 213, 255, 0.18));
    color: rgba(255, 255, 255, 0.6);
    box-shadow: none;
    filter: grayscale(0.15);
}

body.light-theme .btn-secondary {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(91, 63, 255, 0.08), 0 14px 28px -24px rgba(15, 23, 42, 0.35);
}

body.light-theme .btn-secondary:hover {
    background: rgba(91, 63, 255, 0.08);
    border-color: rgba(91, 63, 255, 0.45);
    color: var(--color-secondary);
}

body.light-theme .btn-secondary:active {
    background: rgba(91, 63, 255, 0.12);
}

body.light-theme .btn-secondary[disabled] {
    border-color: rgba(91, 63, 255, 0.12);
    color: rgba(91, 63, 255, 0.35);
    box-shadow: none;
}

body.light-theme .btn-ghost {
    color: var(--color-secondary);
}

body.light-theme .btn-ghost:hover {
    background: rgba(91, 63, 255, 0.08);
    color: var(--color-primary);
}

body.light-theme .btn-ghost[disabled] {
    color: rgba(91, 63, 255, 0.38);
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.light-theme .stat-card,
body.light-theme .chart-container,
body.light-theme .campaign-card,
body.light-theme .json-preview-container {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(238, 242, 255, 0.75));
    border-color: var(--border-soft);
    box-shadow: var(--shadow-soft);
    color: var(--color-text);
}

body.light-theme .stat-card {
    position: relative;
    overflow: hidden;
}

body.light-theme .stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 4px;
    border-radius: 9999px;
    background: var(--gradient-primary);
    opacity: 0.9;
}

body.light-theme .chart-container {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(238, 242, 255, 0.72));
}

body.light-theme .stat-card:hover,
body.light-theme .campaign-card:hover,
body.light-theme .json-preview-container:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-strong);
}

body.light-theme .campaign-card.clickable:hover {
    transform: translateY(-4px);
}

body.light-theme .campaign-card.expanded {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-strong);
}

body.light-theme .campaign-card.expanded .campaign-expanded > div {
    border-top-color: rgba(91, 63, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(91, 63, 255, 0.08);
}

body.light-theme .tabbed-section {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.88));
    border-color: var(--border-soft);
    box-shadow: var(--shadow-soft);
}

body.light-theme .tabbed-nav {
    background: rgba(91, 63, 255, 0.08);
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(91, 63, 255, 0.08);
}

body.light-theme .tabbed-button {
    color: var(--color-muted);
}

body.light-theme .tabbed-button:hover {
    color: var(--color-primary);
}

body.light-theme .tabbed-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(91, 63, 255, 1), rgba(32, 213, 255, 0.9));
    box-shadow: 0 18px 36px -20px rgba(91, 63, 255, 0.35);
}

body.light-theme .sku-toolbar {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(91, 63, 255, 0.16);
    box-shadow: 0 22px 44px -28px rgba(15, 23, 42, 0.28);
}

body.light-theme .sku-filters {
    background: rgba(91, 63, 255, 0.08);
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: 0 18px 26px -26px rgba(91, 63, 255, 0.28);
}

body.light-theme .sku-filter-btn {
    border-color: rgba(91, 63, 255, 0.26);
    background: rgba(91, 63, 255, 0.12);
    color: rgba(79, 91, 124, 0.75);
}

body.light-theme .sku-filter-btn:hover,
body.light-theme .sku-filter-btn:focus-visible {
    color: rgba(31, 35, 65, 0.95);
    border-color: rgba(91, 63, 255, 0.45);
    box-shadow: 0 14px 22px -18px rgba(91, 63, 255, 0.32);
}

body.light-theme .sku-filter-btn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(91, 63, 255, 1), rgba(32, 213, 255, 0.9));
    border-color: rgba(91, 63, 255, 0.58);
    box-shadow: 0 18px 30px -20px rgba(91, 63, 255, 0.4);
}

body.light-theme .sku-period-picker {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: 0 24px 48px -30px rgba(91, 63, 255, 0.22);
}

body.light-theme .sku-period-picker.is-loading::after {
    background: rgba(91, 63, 255, 0.08);
    border-color: rgba(91, 63, 255, 0.18);
}

body.light-theme .sku-period-picker.is-loading::before {
    border-color: rgba(91, 63, 255, 0.22);
    border-top-color: var(--color-primary);
}

body.light-theme .sku-period-title {
    color: rgba(79, 91, 124, 0.88);
}

body.light-theme .sku-period-value {
    color: var(--color-primary);
}

body.light-theme .sku-period-range,
body.light-theme .sku-period-range::-moz-range-track {
    background: linear-gradient(90deg, rgba(91, 63, 255, 0.25), rgba(32, 213, 255, 0.12));
}

body.light-theme .sku-period-range::-webkit-slider-thumb,
body.light-theme .sku-period-range::-moz-range-thumb {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(91, 63, 255, 0.22);
}

body.light-theme .sku-period-tick {
    background: rgba(91, 63, 255, 0.08);
    color: rgba(79, 91, 124, 0.75);
}

body.light-theme .sku-period-tick:hover,
body.light-theme .sku-period-tick:focus-visible {
    background: rgba(91, 63, 255, 0.18);
    color: rgba(31, 35, 65, 0.95);
}

body.light-theme .sku-period-tick.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(91, 63, 255, 1), rgba(32, 213, 255, 0.85));
    box-shadow: 0 16px 28px -22px rgba(91, 63, 255, 0.42);
}

body.light-theme .sku-meta {
    color: var(--color-muted);
}

body.light-theme .sku-table-container {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: 0 26px 48px -30px rgba(15, 23, 42, 0.32);
}

body.light-theme .sku-table thead th {
    background: rgba(91, 63, 255, 0.08);
    color: rgba(31, 35, 65, 0.75);
    border-bottom: 1px solid rgba(91, 63, 255, 0.18);
}
body.light-theme .sku-sort-btn .sku-sort-icon {
    opacity: 0.6;
}
body.light-theme .sku-sort-btn:hover .sku-sort-label,
body.light-theme .sku-sort-btn:focus-visible .sku-sort-label {
    color: rgba(31, 35, 65, 0.95);
}
body.light-theme .sku-sort-btn:hover .sku-sort-icon,
body.light-theme .sku-sort-btn:focus-visible .sku-sort-icon,
body.light-theme .sku-sort-btn.is-active .sku-sort-icon {
    color: rgba(91, 63, 255, 0.95);
    opacity: 0.95;
}

body.light-theme .sku-table tbody td {
    border-bottom: 1px solid rgba(91, 63, 255, 0.12);
    color: var(--color-text);
}

body.light-theme .sku-table tbody tr:hover td {
    background: rgba(91, 63, 255, 0.08);
}

body.light-theme .sku-photo {
    background: rgba(91, 63, 255, 0.12);
    border-color: rgba(91, 63, 255, 0.22);
}

body.light-theme .sku-brand {
    color: rgba(79, 91, 124, 0.9);
}

body.light-theme .sku-sales-main {
    color: rgba(91, 63, 255, 0.95);
}

body.light-theme .sku-sales-meta,
body.light-theme .sku-sales-empty {
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .sku-vendor,
body.light-theme .sku-created {
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .sku-vendor-lead {
    color: rgba(31, 35, 65, 0.85);
}

body.light-theme .sku-vendor-tail,
body.light-theme .sku-vendor-empty {
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .sku-cr-main {
    color: rgba(91, 63, 255, 0.95);
}

body.light-theme .sku-cr-meta,
body.light-theme .sku-cr-empty {
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .sku-action--ark {
    background: linear-gradient(135deg, rgba(91, 63, 255, 0.12), rgba(32, 213, 255, 0.12));
    border-color: rgba(91, 63, 255, 0.26);
    color: var(--color-primary);
}

body.light-theme .sku-action--ark:hover {
    filter: brightness(1.05);
}

body.light-theme .sku-action--search {
    background: rgba(32, 213, 255, 0.12);
    border-color: rgba(32, 213, 255, 0.2);
    color: var(--color-secondary);
}

body.light-theme .sku-action--search:hover {
    filter: brightness(1.05);
}

body.light-theme .sku-actions-empty {
    color: rgba(31, 35, 65, 0.6);
}

body.light-theme .sku-empty {
    border-color: rgba(91, 63, 255, 0.2);
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-muted);
}

body.light-theme .sku-badge {
    border-color: rgba(91, 63, 255, 0.2);
    background: rgba(91, 63, 255, 0.12);
    color: var(--color-primary);
}

body.light-theme .campaign-loading {
    background: rgba(245, 247, 255, 0.86);
}

body.light-theme .loading-spinner {
    border-color: rgba(91, 63, 255, 0.4);
    border-top-color: transparent;
}



body.light-theme .json-preview-title {
    color: var(--color-primary);
    text-shadow: none;
}

body.light-theme .json-preview-badge {
    background: rgba(91, 63, 255, 0.1);
    border-color: rgba(91, 63, 255, 0.25);
    color: var(--color-secondary);
}

body.light-theme .json-preview-text {
    color: var(--color-text);
    text-shadow: none;
}

body.light-theme .compact-report-table th {
    background: rgba(91, 63, 255, 0.08);
    color: var(--color-primary);
    border-color: rgba(91, 63, 255, 0.12);
}

body.light-theme .compact-report-table td {
    border-color: rgba(91, 63, 255, 0.08);
    color: var(--color-text);
}

body.light-theme .compact-report-table tbody tr:nth-child(even) {
    background: rgba(91, 63, 255, 0.04);
}

body.light-theme .compact-report-table tbody tr:hover {
    background: rgba(91, 63, 255, 0.08);
    box-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.35);
}

body.light-theme .campaign-report-shell {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.75));
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: 0 32px 70px -40px rgba(15, 23, 42, 0.4);
}

body.light-theme .campaigns-show-more {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    border-color: rgba(91, 63, 255, 0.25);
    box-shadow: 0 18px 36px -26px rgba(15, 23, 42, 0.35);
    text-shadow: none;
}

body.light-theme .campaigns-show-more:hover,
body.light-theme .campaigns-show-more:focus-visible {
    border-color: rgba(91, 63, 255, 0.45);
    box-shadow: 0 22px 40px -24px rgba(91, 63, 255, 0.35);
}

body.light-theme .campaign-report-meta {
    color: var(--color-muted);
}

body.light-theme .campaign-report-table {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(91, 63, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.light-theme .campaign-report-table::-webkit-scrollbar-thumb {
    background: rgba(91, 63, 255, 0.25);
}

body.light-theme .campaign-report-table {
    scrollbar-color: rgba(91, 63, 255, 0.35) transparent;
}

body.light-theme .campaign-range-toggle,
body.light-theme .campaign-limit-toggle {
    background: rgba(91, 63, 255, 0.08);
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: inset 0 0 12px rgba(91, 63, 255, 0.12);
}

body.light-theme .range-pill,
body.light-theme .limit-pill {
    color: var(--color-secondary);
}

body.light-theme .range-pill.active,
body.light-theme .limit-pill.active {
    background: linear-gradient(135deg, rgba(91, 63, 255, 0.28), rgba(238, 242, 255, 0.92));
    color: var(--color-primary);
    box-shadow: 0 0 18px rgba(91, 63, 255, 0.25);
}

body.light-theme .favorite-heart {
    border-color: rgba(91, 63, 255, 0.25);
    background: rgba(91, 63, 255, 0.08);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 rgba(91, 63, 255, 0.12);
}

body.light-theme .favorite-heart:hover,
body.light-theme .favorite-heart:focus-visible {
    border-color: rgba(91, 63, 255, 0.45);
    background: rgba(91, 63, 255, 0.16);
    box-shadow: 0 0 18px rgba(91, 63, 255, 0.25);
}

body.light-theme .favorite-heart .heart-icon {
    stroke: rgba(91, 63, 255, 0.65);
}

body.light-theme .favorite-heart.active {
    background: linear-gradient(135deg, rgba(91, 63, 255, 0.32), rgba(238, 242, 255, 0.95));
    border-color: rgba(91, 63, 255, 0.55);
    box-shadow: 0 0 18px rgba(91, 63, 255, 0.35);
}

body.light-theme .favorite-heart.active .heart-icon {
    fill: rgba(91, 63, 255, 0.75);
    stroke: rgba(255, 255, 255, 0.92);
}

body.light-theme .competitor-meta .brand-caption {
    color: var(--color-primary);
}

body.light-theme .compact-report-table {
    color: var(--color-text);
}

body.light-theme .compact-report-table thead th {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-muted);
    border-bottom: 1px solid rgba(91, 63, 255, 0.2);
    padding: 8px 12px;
}

body.light-theme .compact-report-table tbody td {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(91, 63, 255, 0.12);
}

body.light-theme .compact-report-table tbody tr:nth-child(even) td {
    background: rgba(238, 242, 255, 0.7);
}

body.light-theme .compact-report-table tbody tr:hover td {
    background: rgba(213, 220, 255, 0.72);
}

body.light-theme .compact-report-table tbody td:first-child,
body.light-theme .compact-report-table thead th:first-child {
    background: rgba(238, 242, 255, 0.92);
    box-shadow: 12px 0 18px -16px rgba(15, 23, 42, 0.25);
    color: var(--color-primary);
}

body.light-theme .compact-report-table tbody td:first-child {
    color: var(--color-primary);
}

body.light-theme .compact-report-table tbody tr:hover td:first-child {
    background: rgba(213, 220, 255, 0.85);
}

body.light-theme .compact-date-cell {
    border-color: rgba(91, 63, 255, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
}

body.light-theme .compact-date-cell:hover {
    background: rgba(91, 63, 255, 0.12);
}

body.light-theme .compact-date-cell.promo {
    background: linear-gradient(150deg, rgba(255, 214, 102, 0.35), rgba(255, 242, 204, 0.65));
    border-color: rgba(255, 193, 7, 0.38);
    box-shadow: 0 14px 30px -24px rgba(255, 193, 7, 0.6);
}

body.light-theme .compact-date-cell.promo.trend-down {
    background: linear-gradient(150deg, rgba(61, 213, 152, 0.35), rgba(233, 250, 245, 0.7));
    border-color: rgba(61, 213, 152, 0.45);
}

body.light-theme .compact-date-cell.promo.trend-up {
    background: linear-gradient(150deg, rgba(255, 138, 128, 0.35), rgba(255, 236, 233, 0.7));
    border-color: rgba(255, 107, 107, 0.45);
}

body.light-theme .compact-date-cell.organic {
    background: rgba(61, 213, 152, 0.12);
    border-color: rgba(61, 213, 152, 0.38);
}

body.light-theme .totals-cell {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(236, 242, 255, 0.6));
    border-color: rgba(91, 63, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.light-theme .total-label {
    color: var(--color-muted);
}

body.light-theme .total-value {
    color: var(--color-primary);
    text-shadow: none;
}

body.light-theme .podium-item {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(236, 242, 255, 0.7));
    border-color: rgba(91, 63, 255, 0.18);
}

body.light-theme .podium-item.ours {
    background: linear-gradient(150deg, rgba(61, 213, 152, 0.12), rgba(61, 213, 152, 0.05));
    border-color: rgba(61, 213, 152, 0.4);
}

body.light-theme .podium-item.top {
    background: linear-gradient(150deg, rgba(91, 63, 255, 0.14), rgba(32, 213, 255, 0.08));
    border-color: rgba(91, 63, 255, 0.35);
}

body.light-theme .position-badge.promo {
    background: rgba(255, 193, 7, 0.16);
    color: #b36b00;
    border-color: rgba(255, 193, 7, 0.4);
}

body.light-theme .position-badge.organic {
    background: rgba(61, 213, 152, 0.18);
    color: #1d6b4e;
    border-color: rgba(61, 213, 152, 0.4);
}

body.light-theme .product-thumb-link .thumb {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(91, 63, 255, 0.16);
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.35);
}

body.light-theme .product-thumb-link .badge-top-right {
    background: rgba(255, 255, 255, 0.8);
    color: #b36b00;
    border-color: rgba(255, 193, 7, 0.45);
}

body.light-theme .product-thumb-link .badge-bottom-right {
    background: rgba(255, 255, 255, 0.84);
    color: var(--color-secondary);
    border-color: rgba(91, 63, 255, 0.25);
}

body.light-theme .product-thumb-link .brand-caption {
    color: var(--color-muted);
}

body.light-theme .json-preview-icon {
    color: var(--color-secondary);
    opacity: 0.85;
}

body.light-theme .status-text {
    color: var(--color-muted);
}

body.light-theme .pill-pagination {
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    border-radius: 9999px;
    background: rgba(91, 63, 255, 0.08);
    backdrop-filter: blur(16px);
}

body.light-theme .pill-pagination button {
    border: none;
    border-radius: 9999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.35);
}

body.light-theme .pill-pagination button:hover {
    background: rgba(91, 63, 255, 0.12);
    color: var(--color-secondary);
}

body.light-theme .pill-pagination button.is-active {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 18px 32px -18px rgba(91, 63, 255, 0.6);
}

body.light-theme .toggle-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(91, 63, 255, 0.22);
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-muted);
    font-weight: 600;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

body.light-theme .toggle-pill.is-active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 16px 28px -16px rgba(91, 63, 255, 0.65);
}

body.light-theme .toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
    border-radius: 9999px;
    background: rgba(91, 63, 255, 0.18);
    border: 1px solid rgba(91, 63, 255, 0.25);
    transition: all 0.25s ease;
    cursor: pointer;
}

body.light-theme .toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
    transition: transform 0.25s ease;
}

body.light-theme .toggle-switch.is-on {
    background: var(--gradient-primary);
    border-color: transparent;
}

body.light-theme .toggle-switch.is-on::after {
    transform: translateX(26px);
}

body.light-theme input[type="checkbox"],
body.light-theme input[type="radio"] {
    accent-color: #5b3fff;
}

body.light-theme .status-token {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
}

body.light-theme .status-token.success {
    background: rgba(61, 213, 152, 0.12);
    color: #1d6b4e;
}

body.light-theme .status-token.warning {
    background: rgba(255, 179, 71, 0.16);
    color: #a66300;
}

body.light-theme .status-token.danger {
    background: rgba(255, 107, 107, 0.16);
    color: #a32035;
}

body.light-theme .logs-area {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: var(--shadow-soft);
}

body.light-theme .logs-header {
    border-color: rgba(91, 63, 255, 0.12);
}

body.light-theme .log-entry {
    color: var(--color-text);
    text-shadow: none;
}

body.light-theme .log-entry.error {
    color: #ff6b6b;
}

body.light-theme .log-entry.success {
    color: #3dd598;
}

body.light-theme .log-entry.warning {
    color: #ffb347;
}

body.light-theme .log-entry.info {
    color: var(--color-primary);
}

body.light-theme .toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(91, 63, 255, 0.18);
    box-shadow: 0 18px 36px -20px rgba(15, 23, 42, 0.35);
    color: var(--color-text);
}

body.light-theme .toast.success {
    border-color: rgba(61, 213, 152, 0.35);
    box-shadow: 0 18px 34px -18px rgba(61, 213, 152, 0.45);
}

body.light-theme .toast.error {
    border-color: rgba(255, 107, 107, 0.35);
    box-shadow: 0 18px 34px -18px rgba(255, 107, 107, 0.4);
}

body.light-theme .toast.warning {
    border-color: rgba(255, 179, 71, 0.35);
    box-shadow: 0 18px 34px -18px rgba(255, 179, 71, 0.4);
}

body.light-theme .bid-popover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: 0 28px 48px -28px rgba(15, 23, 42, 0.45);
    color: var(--color-text);
}

body.light-theme .bid-popover-title {
    color: var(--color-primary);
    text-shadow: none;
}

body.light-theme .bid-popover-sub {
    color: var(--color-muted);
}

body.light-theme .bid-input {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(91, 63, 255, 0.22);
    color: var(--color-text);
}

body.light-theme .wb-tooltip {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(91, 63, 255, 0.2);
    box-shadow: 0 24px 46px -28px rgba(15, 23, 42, 0.45);
    color: var(--color-text);
}

body.light-theme .wb-tooltip-thumb {
    background: rgba(91, 63, 255, 0.1);
    border-color: rgba(91, 63, 255, 0.2);
}

body.light-theme .wb-tooltip-title {
    color: var(--color-text);
}

body.light-theme .wb-tooltip-price {
    color: var(--color-primary);
}

body.light-theme .wb-tooltip-spinner {
    border-color: rgba(91, 63, 255, 0.22);
    border-top-color: transparent;
}

body.light-theme .json-editor-overlay {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(18px);
}

body.light-theme .json-editor-container {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(91, 63, 255, 0.3);
    box-shadow: 0 40px 80px -42px rgba(15, 23, 42, 0.45);
}

body.light-theme .json-editor-header {
    border-bottom: 1px solid rgba(91, 63, 255, 0.18);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
}

body.light-theme .json-editor-title {
    color: transparent;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
}

body.light-theme .json-editor-subtitle {
    color: rgba(91, 63, 255, 0.7);
}

body.light-theme .json-editor-meta {
    color: rgba(91, 63, 255, 0.8);
    border-color: rgba(91, 63, 255, 0.28);
    background: rgba(91, 63, 255, 0.1);
}

body.light-theme .json-editor-body {
    border-color: rgba(91, 63, 255, 0.22);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(14px);
}

body.light-theme .json-editor-lines {
    background: linear-gradient(180deg, rgba(91, 63, 255, 0.92) 0%, rgba(32, 213, 255, 0.9) 100%);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

body.light-theme .json-editor-code {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.light-theme .json-key { color: #5b3fff; }
body.light-theme .json-string { color: #20d5ff; }
body.light-theme .json-number { color: #3dd598; }
body.light-theme .json-boolean { color: #ff6b6b; }
body.light-theme .json-null { color: #8a95b5; }

body.light-theme .json-editor-btn.primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 22px 44px -24px rgba(91, 63, 255, 0.65);
}

body.light-theme .json-editor-btn.primary:hover {
    box-shadow: 0 28px 54px -24px rgba(91, 63, 255, 0.75);
}

body.light-theme .json-editor-btn.ghost {
    border-color: rgba(91, 63, 255, 0.32);
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.6);
}

body.light-theme .json-editor-btn.ghost:hover {
    border-color: rgba(91, 63, 255, 0.5);
    background: rgba(91, 63, 255, 0.08);
}

body.light-theme .json-editor-btn[disabled] {
    background: rgba(91, 63, 255, 0.16);
    color: rgba(255, 255, 255, 0.6);
}

/* JSON Editor Modal */
.json-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.json-editor-modal.show {
    opacity: 1;
}

.json-editor-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.json-editor-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    width: min(960px, 90vw);
    max-height: 82vh;
    background: linear-gradient(135deg, rgba(16, 16, 16, 0.96) 0%, rgba(4, 4, 4, 0.92) 100%);
    border: 2px solid rgba(0, 255, 65, 0.45);
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(0, 255, 65, 0.25);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.json-editor-modal.show .json-editor-container {
    transform: translate(-50%, -50%) scale(1);
}

.json-editor-container.expanded {
    width: min(1480px, 98vw);
    height: 90vh;
    max-height: 90vh;
}

.json-editor-expand {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.45);
    color: var(--neon-green);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.json-editor-expand:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.7);
    transform: translateY(-1px);
}

.json-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 20px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 255, 65, 0.05);
}

.json-editor-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.json-editor-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
}

.json-editor-subtitle {
    font-size: 0.85rem;
    color: rgba(154, 230, 180, 0.8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.json-editor-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(154, 230, 180, 0.8);
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: rgba(0, 255, 65, 0.08);
}

.json-editor-content {
    padding: 28px 32px;
    max-height: calc(82vh - 90px);
    overflow-y: auto;
}

.json-editor-body {
    display: flex;
    align-items: stretch;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.08);
}

.json-editor-lines {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 24px 18px;
    min-width: 64px;
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.25) 0%, rgba(0, 0, 0, 0.4) 100%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(154, 230, 180, 0.75);
    letter-spacing: 0.08em;
}

.json-line-number {
    display: block;
    min-height: 1.4em;
}

.json-editor-code {
    flex: 1;
    margin: 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(12, 12, 12, 0.94) 100%);
    color: #b7ffdc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.json-line {
    display: block;
    min-height: 1.45em;
}

.json-key { color: #7af0ff; }
.json-string { color: #63ffa3; }
.json-number { color: #ffd166; }
.json-boolean { color: #ff88d4; }
.json-null { color: #c084fc; }

.json-editor-footer {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.json-editor-btn {
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.json-editor-btn.primary {
    background: linear-gradient(135deg, #00ff41, #6bff8f);
    color: #0a0a0a;
    box-shadow: 0 12px 24px -12px rgba(0, 255, 65, 0.6);
}

.json-editor-btn.primary:hover {
    box-shadow: 0 16px 32px -12px rgba(0, 255, 65, 0.75);
    transform: translateY(-1px);
}

.json-editor-btn.ghost {
    background: transparent;
    color: rgba(154, 230, 180, 0.9);
    border-color: rgba(154, 230, 180, 0.35);
}

.json-editor-btn.ghost:hover {
    border-color: rgba(0, 255, 65, 0.6);
    color: var(--neon-green);
}

.json-editor-btn[disabled] {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Pagination Pills */
.pill-pagination {
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    border-radius: 9999px;
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
}

.pill-pagination button {
    border: none;
    border-radius: 9999px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neon-green);
    background: rgba(0, 0, 0, 0.45);
    transition: all 0.2s ease;
    cursor: pointer;
}

.pill-pagination button:hover {
    background: rgba(0, 255, 65, 0.1);
}

.pill-pagination button.is-active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.35), rgba(0, 255, 65, 0.15));
    color: #0a0a0a;
}

/* Toggle Controls */
.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.4);
    background: rgba(0, 0, 0, 0.6);
    color: var(--neon-green);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-pill.is-active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.4), rgba(0, 0, 0, 0.8));
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.35);
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 65, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.5);
    transition: transform 0.25s ease;
}

.toggle-switch.is-on {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.35), rgba(0, 255, 65, 0.15));
}

.toggle-switch.is-on::after {
    transform: translateX(26px);
}

.chip,
.pill,
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover,
.pill:hover,
.filter-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0, 0, 0, 0.5);
}

.chip.is-active,
.pill.is-active,
.filter-chip.is-active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 16px 30px -18px rgba(91, 63, 255, 0.6);
}

.chip[disabled],
.pill[disabled],
.filter-chip[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.status-token {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(0, 255, 65, 0.12);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 65, 0.35);
}

.status-token.warning {
    background: rgba(255, 170, 0, 0.12);
    color: #ffbf47;
    border-color: rgba(255, 170, 0, 0.35);
}

.status-token.danger {
    background: rgba(255, 68, 68, 0.12);
    color: #ff6b6b;
    border-color: rgba(255, 68, 68, 0.35);
}

/* ===== UI COMPONENTS (Popovers, Modals, Tooltips) ===== */

/* Logs Area */
.logs-area {
    @apply bg-gray-900 border border-green-500/30 rounded-lg;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
    min-height: 300px;
}

.logs-header {
    @apply flex justify-between items-center p-4 border-b border-green-500/30;
}

.logs-content {
    @apply p-4 max-h-64 overflow-y-auto;
    min-height: 200px;
}

.log-entry {
    @apply text-sm text-green-300 mb-2 font-mono;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.log-entry.error {
    @apply text-red-400;
}

.log-entry.warning {
    @apply text-yellow-400;
}

.log-entry.info {
    @apply text-blue-400;
}

.log-entry.success {
    @apply text-green-400;
}

/* ===== ARK / SKU TABS ===== */
.tabbed-section {
    background: var(--surface-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
}

.tabbed-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tabbed-header-slider {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 240px;
}

.tabbed-title {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tabbed-heading {
    font-size: 1.35rem;
}

.tabbed-subtitle {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin: 0;
}

.tabbed-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-muted);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem;
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.08);
}

.segment-slider {
    position: relative;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.segment-slider.segment-slider--center {
    margin-left: auto;
    margin-right: auto;
}

.segment-slider .tabbed-button {
    position: relative;
    z-index: 1;
}

.segment-slider .tabbed-button + .tabbed-button::before {
    content: '|';
    position: absolute;
    left: -0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-weight: 500;
    opacity: 0.65;
    pointer-events: none;
}

.tabbed-button {
    border: none;
    background: transparent;
    color: var(--color-muted);
    padding: 0.45rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.tabbed-button:hover {
    color: var(--color-secondary);
}

.tabbed-button.active {
    color: #0b0b0b;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.92), rgba(0, 210, 125, 0.85));
    box-shadow: 0 16px 28px -18px rgba(0, 255, 65, 0.4);
}

.tabbed-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.25);
}

.tabbed-panels {
    display: block;
}

.tabbed-panel {
    display: block;
}

.tabbed-panel.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .tabbed-header {
        align-items: stretch;
        justify-content: center;
    }

    .tabbed-header-slider {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .tabbed-header-slider .segment-slider {
        width: 100%;
        max-width: 420px;
    }
}

.sku-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sku-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid rgba(0, 255, 65, 0.18);
    box-shadow: 0 18px 36px -28px rgba(0, 255, 65, 0.25);
}

.sku-heading {
    font-size: 1.15rem;
}

.sku-meta {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin-top: 0.3rem;
}

.sku-downloads {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sku-downloads.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.sku-downloads-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-right: 0.25rem;
}

.sku-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-inline: 0.85rem;
}

.sku-download-icon {
    font-size: 0.9rem;
}

@media (max-width: 680px) {
    .sku-downloads {
        width: 100%;
        justify-content: flex-start;
    }
}

.sku-actions {
    display: flex;
    align-items: stretch;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.sku-filters {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.65rem;
    border-radius: 16px;
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid rgba(0, 255, 65, 0.18);
    box-shadow: 0 18px 24px -26px rgba(0, 255, 65, 0.28);
    backdrop-filter: blur(4px);
}

.sku-filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 65, 0.22);
    background: rgba(0, 255, 65, 0.08);
    color: var(--color-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sku-filter-btn:hover,
.sku-filter-btn:focus-visible {
    color: var(--color-primary);
    border-color: rgba(0, 255, 65, 0.38);
    box-shadow: 0 12px 18px -16px rgba(0, 255, 65, 0.45);
    outline: none;
}

.sku-filter-btn.is-active {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.95), rgba(0, 210, 125, 0.9));
    color: #0b0b0b;
    border-color: rgba(0, 255, 65, 0.65);
    box-shadow: 0 16px 28px -18px rgba(0, 255, 65, 0.45);
}

.sku-filter-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.sku-period-picker {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 260px;
    padding: 0.9rem 1.2rem 1rem;
    border-radius: 18px;
    background: var(--surface-glass);
    border: 1px solid rgba(0, 255, 65, 0.18);
    box-shadow: 0 18px 34px -28px rgba(0, 255, 65, 0.25);
    backdrop-filter: blur(6px);
}

.sku-period-picker.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(0, 255, 65, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.12);
}

.sku-period-picker.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 999px;
    border: 2px solid rgba(0, 255, 65, 0.28);
    border-top-color: var(--color-primary);
    animation: sku-period-spin 0.8s linear infinite;
    pointer-events: none;
}

.sku-period-picker.is-disabled {
    opacity: 0.6;
}

.sku-meta {
    margin-top: -0.5rem;
    padding: 0 0.25rem;
}

.sku-period-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.sku-period-title {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.sku-period-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

.sku-period-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sku-period-range {
    width: 100%;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.45), rgba(0, 255, 65, 0.1));
    outline: none;
    transition: opacity 0.2s ease;
}

.sku-period-range:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.25);
}

.sku-period-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid rgba(10, 10, 10, 0.8);
    box-shadow: 0 0 0 4px rgba(0, 255, 65, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sku-period-range::-webkit-slider-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(0, 255, 65, 0.3);
}

.sku-period-range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.45), rgba(0, 255, 65, 0.1));
}

.sku-period-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid rgba(10, 10, 10, 0.8);
    box-shadow: 0 0 0 4px rgba(0, 255, 65, 0.25);
    cursor: pointer;
}

.sku-period-ticks {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.35rem;
}

.sku-period-tick {
    position: relative;
    border: none;
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
    background: rgba(0, 255, 65, 0.05);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sku-period-tick:hover,
.sku-period-tick:focus-visible {
    color: var(--color-primary);
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

.sku-period-tick.is-active {
    color: #0a0a0a;
    background: var(--color-primary);
    box-shadow: 0 10px 18px -14px rgba(0, 255, 65, 0.65);
}

@keyframes sku-period-spin {
    to {
        transform: rotate(360deg);
    }
}

.sku-refresh-btn,
.sku-sales-btn {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
}

.sku-sales-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.sku-sales-btn.is-loading {
    opacity: 0.65;
    cursor: wait;
}

.sku-table-container {
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 65, 0.16);
    background: var(--surface-muted);
    box-shadow: 0 24px 42px -32px rgba(0, 255, 65, 0.25);
    overflow: hidden;
    position: relative;
}

.sku-table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.sku-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
}

.sku-table thead th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--color-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 65, 0.12);
}

.sku-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.sku-sort-btn .sku-sort-label {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.sku-sort-btn .sku-sort-icon {
    font-size: 0.7rem;
    opacity: 0.65;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.sku-sort-btn.is-active .sku-sort-label {
    color: var(--color-primary);
}

.sku-sort-btn:hover .sku-sort-label,
.sku-sort-btn:focus-visible .sku-sort-label {
    color: var(--color-primary);
}

.sku-sort-btn:hover .sku-sort-icon,
.sku-sort-btn:focus-visible .sku-sort-icon {
    opacity: 0.9;
    color: var(--color-primary);
}

.sku-sort-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 0.35rem;
}

.sku-sort-btn.is-active .sku-sort-icon {
    opacity: 1;
    color: var(--color-primary);
}

.sku-table tbody td {
    padding: 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.08);
    color: var(--color-text);
    vertical-align: middle;
    background: transparent;
}

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

.sku-table tbody tr:hover td {
    background: rgba(0, 255, 65, 0.05);
}

.sku-photo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 255, 65, 0.12);
    border: 1px solid rgba(0, 255, 65, 0.2);
    box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.05);
}

.sku-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--color-muted);
}

.sku-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sku-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sku-brand {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.sku-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--color-primary);
}

.sku-codes {
    min-width: 150px;
}

.sku-cr {
    min-width: 140px;
}

.sku-vendor {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.sku-vendor-lead {
    font-size: calc(0.85rem + 1px);
    font-weight: 600;
    display: inline;
    color: inherit;
}

.sku-vendor-tail {
    font-size: 0.85rem;
    color: inherit;
}

.sku-vendor-empty {
    color: var(--color-muted);
}

.sku-created {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.sku-sales {
    min-width: 160px;
}

.sku-sales-main {
    font-weight: 600;
    color: var(--color-primary);
}

.sku-sales-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.sku-sales-empty {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.sku-cr-main {
    font-weight: 600;
    color: var(--color-primary);
}

.sku-cr-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.sku-cr-empty {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.sku-actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sku-actions-empty {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-style: italic;
    padding: 0.2rem 0;
}

.sku-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sku-action--existing {
    flex-direction: column;
    align-items: flex-start;
    min-width: 168px;
    padding: 0.55rem 0.85rem;
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(0, 255, 65, 0.12);
    color: rgba(255, 255, 255, 0.78);
    cursor: default;
    gap: 0.4rem;
}

.sku-action--existing:hover {
    background: rgba(0, 0, 0, 0.22);
}

.sku-action--existing-link {
    cursor: pointer;
}

.sku-action--existing-link:hover {
    background: rgba(0, 0, 0, 0.28);
}

.sku-action--ark-existing {
    border-color: rgba(0, 255, 65, 0.18);
}

.sku-action--search-existing {
    border-color: rgba(0, 200, 255, 0.14);
}

.sku-action-existing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
}

.sku-action-existing-badge {
    color: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sku-action-existing-status {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sku-action-existing-status--on {
    color: rgba(0, 255, 110, 0.85);
}

.sku-action-existing-status--off {
    color: rgba(255, 180, 0, 0.85);
}

.sku-action-existing-metrics {
    display: flex;
    gap: 0.75rem;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.sku-action-existing-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.sku-action:disabled,
.sku-action.is-loading {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

.sku-action--existing:disabled {
    opacity: 1;
    cursor: default;
    pointer-events: none;
}

.sku-action svg {
    width: 16px;
    height: 16px;
}

.sku-action--ark {
    background: rgba(0, 255, 65, 0.12);
    border-color: rgba(0, 255, 65, 0.25);
    color: var(--color-primary);
}

.sku-action--ark:hover {
    background: rgba(0, 255, 65, 0.22);
}

.sku-action--search {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 255, 65, 0.14);
    color: var(--color-secondary);
}

.sku-action--search:hover {
    background: rgba(0, 0, 0, 0.32);
}

body.light-theme .sku-action--existing {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(30, 30, 30, 0.8);
}

body.light-theme .sku-action-existing-badge {
    color: rgba(30, 30, 30, 0.85);
}

body.light-theme .sku-action-existing-metrics {
    color: rgba(30, 30, 30, 0.75);
}

body.light-theme .sku-action-existing-meta {
    color: rgba(30, 30, 30, 0.55);
}

body.light-theme .sku-action-existing-status--on {
    color: #00a86b;
}

body.light-theme .sku-action-existing-status--off {
    color: #d28a00;
}

.sku-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border: 2px dashed rgba(0, 255, 65, 0.18);
    border-radius: 18px;
    margin: 1.5rem;
    background: rgba(0, 0, 0, 0.18);
}

.sku-empty-icon {
    font-size: 2rem;
}

.sku-empty-text {
    font-size: 0.95rem;
}

.sku-updated-at {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.sku-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid rgba(0, 255, 65, 0.25);
    color: var(--color-primary);
    background: rgba(0, 255, 65, 0.12);
}

@media (max-width: 900px) {
    .tabbed-section {
        padding: 1.25rem;
    }

    .sku-table {
        min-width: 720px;
    }
}

@media (max-width: 640px) {
    .tabbed-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sku-toolbar {
        padding: 1rem;
    }

    .sku-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Toast Notifications */
.toast {
    @apply bg-gray-900 border border-green-500/50 rounded-lg p-4 shadow-lg max-w-sm;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.toast.error {
    border-color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

.toast.warning {
    border-color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);
}

/* Bid Popover */
.bid-popover {
    position: fixed;
    z-index: 1000;
    background: rgba(10,10,10,0.98);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
    width: 320px;
    max-width: 92vw;
    color: var(--text-primary);
}

.bid-popover-inner {
    padding: 12px;
}

.bid-popover-title {
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
    margin-bottom: 2px;
}

.bid-popover-sub {
    font-size: 0.75rem;
    color: #9ae6b4;
    margin-bottom: 10px;
}

.bid-popover-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.bid-input {
    flex: 1 1 120px;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.bid-ruble {
    color: var(--neon-green);
    font-weight: 700;
    flex: 0 0 auto;
}

.bid-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Product Preview Tooltip */
.wb-tooltip {
    position: fixed;
    z-index: 1200;
    min-width: 240px;
    max-width: 320px;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 10px;
    box-shadow: 0 0 22px rgba(0, 255, 65, 0.25);
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.wb-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.wb-tooltip-inner {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    padding: 10px;
}

.wb-tooltip-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #111;
    border: 1px solid rgba(0,255,65,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wb-tooltip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-tooltip-title {
    font-size: 12px;
    line-height: 1.3;
    color: #9ae6b4;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wb-tooltip-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.wb-tooltip-price {
    color: var(--neon-green);
    font-weight: 700;
}

.wb-tooltip-rating {
    color: #ffd166;
    font-weight: 600;
    font-size: 12px;
}

.wb-tooltip-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,255,65,0.35);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Modal Styles */
#podiumModal {
    backdrop-filter: blur(10px);
}

#podiumModal .bg-gray-900 {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

/* Console Panels */
#apiPanel, #todoPanel {
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

/* ===== ANIMATIONS ===== */

@keyframes aiShine {
    0% { left: -30%; }
    100% { left: 110%; }
}

@keyframes sparkleMove {
    0% { --x: 0%; --y: 0%; }
    50% { --x: 100%; --y: 100%; }
    100% { --x: 0%; --y: 0%; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

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

.cursor {
    animation: blink 1s infinite;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 5px white;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .stat-card {
        @apply p-4;
    }
}

@media (max-width: 480px) {
    .auth-trigger__avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .campaign-header-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

}

/* ===== THEME TOGGLE BUTTON ===== */

.theme-toggle {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px var(--shadow-color);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 24px;
    transition: all 0.3s ease;
    position: absolute;
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-theme .theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body * {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
@keyframes auth-trigger-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(91, 63, 255, 0.35);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(91, 63, 255, 0.0);
        transform: translateY(-1.5px);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(91, 63, 255, 0.0);
        transform: translateY(0);
    }
}

.auth-trigger.pulse-highlight {
    position: relative;
    z-index: 1;
    animation: auth-trigger-pulse 1.8s ease-in-out infinite;
}

/* ===== AI CHAT FLOATING BUTTON & PANEL ===== */

/* Плавающая кнопка */
.ai-chat-floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-strong), 0 0 30px rgba(0, 255, 65, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 28px;
}

.ai-chat-floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--shadow-strong), 0 0 40px rgba(0, 255, 65, 0.6);
    border-color: var(--color-primary);
}

.ai-chat-floating-btn:active {
    transform: scale(0.95);
}

.ai-chat-floating-btn--hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.ai-chat-floating-icon {
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Панель чата */
.ai-chat-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    height: 650px;
    min-width: 320px;
    min-height: 400px;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 2px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: var(--shadow-strong), 0 0 60px rgba(0, 255, 65, 0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Кастомный уголок растягивания (левый верхний) */
.ai-chat-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    cursor: nw-resize;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 4px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.ai-chat-resize-handle:hover {
    opacity: 1;
}

.ai-chat-resize-handle::before {
    content: '';
    width: 16px;
    height: 16px;
    border-top: 3px solid var(--color-primary);
    border-left: 3px solid var(--color-primary);
    border-radius: 4px 0 0 0;
}

.ai-chat-resize-handle::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--color-primary);
    border-left: 2px solid var(--color-primary);
    opacity: 0.6;
}

.ai-chat-panel--open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Заголовок панели */
.ai-chat-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gradient-soft);
    border-radius: 14px 14px 0 0;
}

.ai-chat-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-primary);
}

.ai-chat-panel-icon {
    font-size: 20px;
}

.ai-chat-panel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-mode-toggle {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-chat-mode-toggle:hover {
    background: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}

.ai-chat-mode-toggle--thinking {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(75, 0, 130, 0.15));
    border-color: rgba(138, 43, 226, 0.5);
    color: #b19cd9;
}

.ai-chat-mode-toggle--thinking:hover {
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.4);
    border-color: #b19cd9;
}

.ai-chat-mode-icon {
    font-size: 14px;
}

.ai-chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    color: var(--color-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.ai-chat-close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
    color: #ff4444;
}

/* Быстрые действия */
.ai-chat-quick-actions {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-primary);
}

.ai-chat-quick-btn {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chat-quick-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
    transform: translateY(-1px);
}

.ai-chat-quick-btn:active {
    transform: translateY(0);
}

.ai-chat-quick-btn--primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-weight: 600;
    border-color: var(--border-strong);
}

.ai-chat-quick-btn--primary:hover {
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.ai-chat-quick-btn--action {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-weight: 600;
    border-color: rgba(255, 107, 107, 0.3);
}

.ai-chat-quick-btn--action:hover {
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ff5252 0%, #e84a5f 100%);
}

/* Селектор периода */
.ai-chat-period-selector {
    display: flex;
    gap: 4px;
    flex: 1;
}

.ai-chat-period-select {
    flex: 0 0 auto;
    padding: 8px 8px 8px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--color-secondary);
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff41' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 20px;
}

.ai-chat-period-select:hover {
    background-color: var(--bg-secondary);
    border-color: var(--color-primary);
}

.ai-chat-period-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

body.light-theme .ai-chat-period-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235b3fff' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

/* Область сообщений */
.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-primary);
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.ai-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0.5;
}

.ai-chat-empty-icon {
    font-size: 48px;
}

.ai-chat-empty-text {
    font-size: 14px;
    color: var(--color-muted);
}

/* Сообщения */
.ai-chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: messageSlideIn 0.3s ease;
}

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

.ai-chat-message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 85%;
    overflow-wrap: break-word;
}

.ai-chat-message--user .ai-chat-message-content {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    margin-left: auto;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.ai-chat-message--assistant .ai-chat-message-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

.ai-chat-message--system .ai-chat-message-content {
    background: rgba(0, 150, 255, 0.1);
    border: 1px solid rgba(0, 150, 255, 0.3);
    color: #5eb4ff;
    margin: 0 auto;
    font-size: 12px;
    padding: 6px 12px;
    max-width: 100%;
    text-align: center;
}

.ai-chat-message--loading .ai-chat-message-content {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.ai-chat-message-content code {
    background: rgba(0, 255, 65, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--color-primary);
}

/* Action buttons для команд управления */
.ai-chat-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-soft);
}

.ai-chat-action-btn {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--color-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.ai-chat-action-btn:hover:not(:disabled) {
    background: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
    transform: translateY(-1px);
}

.ai-chat-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-chat-action-btn--execute-all {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-weight: 600;
    border-color: var(--border-strong);
}

.ai-chat-action-btn--execute-all:hover:not(:disabled) {
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.ai-chat-action-btn--success {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.ai-chat-action-btn--error {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.ai-chat-commands-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-chat-action-btn--command {
    font-size: 11px;
    padding: 6px 10px;
}

.ai-chat-management-hint {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.05);
}

.ai-chat-management-hint__icon {
    font-size: 20px;
}

.ai-chat-management-hint__title {
    font-weight: 600;
    font-size: 13px;
}

.ai-chat-management-hint__text {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 2px;
    line-height: 1.5;
}

.ai-chat-action-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-muted);
}

.ai-chat-action-btn--ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-soft);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.15);
}

.ai-chat-action-btn--primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-color: var(--border-strong);
    font-weight: 600;
}

.ai-chat-action-btn--primary:hover:not(:disabled) {
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}

.ai-chat-inline-actions {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-chat-inline-actions__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ai-chat-inline-actions__title {
    font-weight: 600;
    font-size: 13px;
}

.ai-chat-inline-actions__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-inline-actions__status {
    font-size: 12px;
    color: var(--color-muted);
}

.ai-chat-inline-actions__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-chat-command-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--bg-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-command-row__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-command-row__icon {
    font-size: 18px;
}

.ai-chat-command-row__label {
    font-weight: 600;
    font-size: 13px;
}

.ai-chat-command-row__id {
    font-size: 12px;
    color: var(--color-muted);
    margin-left: auto;
}

.ai-chat-command-row__param {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 255, 65, 0.1);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
}

.ai-chat-command-row__reason {
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.5;
}

.ai-chat-command-row__footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-command-row__button {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: var(--bg-tertiary);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chat-command-row__button:hover:not(:disabled) {
    background: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.ai-chat-command-row__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-chat-command-row__button--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-muted);
}

.ai-chat-command-row__button--ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-soft);
    color: var(--color-text);
}

.ai-chat-command-row__status {
    font-size: 12px;
    color: var(--color-muted);
    margin-left: auto;
}

.ai-chat-command-row--primary {
    border-color: rgba(0, 255, 65, 0.4);
    box-shadow: 0 6px 14px rgba(0, 255, 65, 0.08);
}

.ai-chat-command-row--accent {
    border-color: rgba(0, 181, 255, 0.4);
    box-shadow: 0 6px 14px rgba(0, 181, 255, 0.08);
}

.ai-chat-command-row--danger {
    border-color: rgba(255, 99, 132, 0.45);
    box-shadow: 0 6px 14px rgba(255, 99, 132, 0.08);
}

.ai-chat-command-row--warning {
    border-color: rgba(255, 198, 0, 0.45);
    box-shadow: 0 6px 14px rgba(255, 198, 0, 0.08);
}

.ai-chat-command-row--success {
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 6px 14px rgba(52, 211, 153, 0.08);
}

.ai-chat-command-row--neutral {
    border-color: var(--border-soft);
}

.ai-chat-command-row--running {
    border-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.2);
}

.ai-chat-command-row--done {
    border-color: rgba(52, 211, 153, 0.6);
}

.ai-chat-command-row--error {
    border-color: rgba(255, 107, 107, 0.6);
}

.ai-chat-message-content pre {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    border: 1px solid var(--border-soft);
}

.ai-chat-message-content pre code {
    background: none;
    padding: 0;
}

/* Область ввода */
.ai-chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-secondary);
    border-radius: 0 0 14px 14px;
}

.ai-chat-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font-body);
    resize: none;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

.ai-chat-input::placeholder {
    color: var(--color-muted);
}

.ai-chat-input-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ai-chat-control-btn {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--color-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chat-control-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

.ai-chat-send-btn {
    padding: 8px 20px;
    background: var(--gradient-primary);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--bg-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chat-send-btn:hover {
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.4);
    transform: translateY(-1px);
}

.ai-chat-send-btn:active {
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .ai-chat-panel {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 16px;
        right: 16px;
    }

    .ai-chat-floating-btn {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ai-chat-quick-actions {
        flex-direction: column;
    }

    .ai-chat-quick-btn {
        width: 100%;
    }

    .ai-chat-panel-title span { display: inline; }
}

/* --- Modern AI Button & Chat Redesign Overrides --- */

/* Floating AI button with glassmorphism */
.ai-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 999px;
    background:
        radial-gradient(120% 120% at 22% 18%, rgba(22, 255, 101, 0.88) 0%, rgba(22, 255, 101, 0.35) 45%, rgba(4, 32, 18, 0.85) 100%),
        linear-gradient(160deg, rgba(22, 255, 101, 0.45) 0%, rgba(0, 90, 54, 0.75) 65%, rgba(0, 0, 0, 0.85) 100%);
    border: 1.6px solid rgba(22, 255, 101, 0.7);
    box-shadow:
        0 18px 40px -18px rgba(22, 255, 101, 0.6),
        0 0 35px rgba(22, 255, 101, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #0a130d;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    isolation: isolate;
}

.ai-button--floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
}

.ai-button::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, rgba(22, 255, 101, 0.65), rgba(0, 255, 208, 0.8), rgba(122, 255, 220, 0.45), rgba(22, 255, 101, 0.65));
    mix-blend-mode: screen;
    opacity: 0.95;
    filter: saturate(140%);
    animation: ai-button-spectrum 4.5s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.ai-button::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: inherit;
    background: radial-gradient(45% 75% at 15% 15%, rgba(255, 255, 255, 0.45), transparent 70%),
                radial-gradient(40% 60% at 85% 85%, rgba(0, 255, 170, 0.35), transparent 72%);
    opacity: 0;
    mix-blend-mode: screen;
    transform: rotate(0deg) scale(0.85);
    animation: ai-button-flare 3.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.ai-button:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: rgba(22, 255, 180, 0.9);
    box-shadow:
        0 22px 46px -18px rgba(22, 255, 140, 0.75),
        0 0 40px rgba(22, 255, 180, 0.55),
        inset 0 0 0 1.2px rgba(255, 255, 255, 0.16);
}

.ai-button:active {
    transform: translateY(0) scale(0.95);
    box-shadow:
        0 10px 20px -12px rgba(22, 255, 120, 0.55),
        0 0 18px rgba(22, 255, 120, 0.45);
}

.ai-button__glow {
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background: radial-gradient(80px 80px at var(--mx, 50%) var(--my, 50%), rgba(22, 255, 150, 0.45), transparent 65%);
    filter: blur(14px);
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.ai-button:hover .ai-button__glow {
    opacity: 1;
}

.ai-button__content {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 1;
    color: #0c2014;
}

.ai-button__icon {
    font-size: 18px;
    line-height: 1;
}

.ai-button__label {
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.12em;
}

/* Panel glassmorphism */
.ai-chat-panel {
    background: linear-gradient(180deg, rgba(7, 14, 10, 0.92), rgba(7, 14, 10, 0.86));
    border: 1px solid rgba(22, 255, 101, 0.28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.02) inset;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.ai-chat-panel-header { background: linear-gradient(180deg, rgba(22,255,101,0.06), rgba(22,255,101,0)); }
.ai-chat-mode-toggle { border-radius: 12px; }
.ai-chat-quick-actions { background: linear-gradient(180deg, rgba(22,255,101,0.04), rgba(22,255,101,0)); border-bottom: 1px solid var(--border-soft); }
.ai-chat-messages { background: linear-gradient(180deg, rgba(10, 19, 14, 0.4), rgba(10, 19, 14, 0.2)); }
.ai-chat-message--user .ai-chat-message-content { box-shadow: 0 6px 20px rgba(22, 255, 101, 0.2); }
.ai-chat-message--assistant .ai-chat-message-content { background: linear-gradient(180deg, rgba(18, 30, 23, 0.8), rgba(18, 30, 23, 0.7)); }

@media (max-width: 768px) {
    .ai-button--floating { right: 16px; bottom: 16px; height: 52px; border-radius: 14px; }
}

/* Light Theme Overrides — AI Chat */
body.light-theme .ai-button {
    background:
        radial-gradient(120% 120% at 22% 20%, rgba(91, 63, 255, 0.85) 0%, rgba(91, 63, 255, 0.45) 50%, rgba(64, 83, 255, 0.35) 100%),
        linear-gradient(155deg, rgba(91, 63, 255, 0.72) 0%, rgba(32, 213, 255, 0.6) 55%, rgba(45, 94, 255, 0.65) 100%);
    border-color: rgba(91, 63, 255, 0.55);
    box-shadow:
        0 18px 40px -18px rgba(91, 63, 255, 0.52),
        0 0 35px rgba(32, 213, 255, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

body.light-theme .ai-button__content {
    color: #ffffff;
}

body.light-theme .ai-button::after {
    background: conic-gradient(from 0deg, rgba(91, 63, 255, 0.75), rgba(32, 213, 255, 0.85), rgba(255, 162, 255, 0.55), rgba(91, 63, 255, 0.75));
    opacity: 0.9;
    filter: saturate(165%);
}

body.light-theme .ai-button:hover {
    border-color: rgba(91, 63, 255, 0.85);
    box-shadow:
        0 24px 48px -18px rgba(91, 63, 255, 0.65),
        0 0 44px rgba(32, 213, 255, 0.6),
        inset 0 0 0 1.4px rgba(255, 255, 255, 0.24);
}

body.light-theme .ai-button:active {
    box-shadow:
        0 12px 24px -14px rgba(91, 63, 255, 0.5),
        0 0 22px rgba(32, 213, 255, 0.5);
}

body.light-theme .ai-button::before {
    background: radial-gradient(45% 75% at 20% 20%, rgba(255, 255, 255, 0.5), transparent 70%),
                radial-gradient(40% 60% at 80% 80%, rgba(91, 63, 255, 0.4), transparent 70%);
    opacity: 0.1;
    filter: saturate(140%);
}

body.light-theme .ai-chat-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.92));
    border-color: var(--border-soft);
    box-shadow: 0 20px 60px var(--shadow-color), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

body.light-theme .ai-chat-panel-header {
    background: linear-gradient(180deg, rgba(91, 63, 255, 0.08), rgba(255, 255, 255, 0));
    border-bottom-color: var(--border-soft);
}

body.light-theme .ai-chat-quick-actions {
    background: linear-gradient(180deg, rgba(91, 63, 255, 0.06), rgba(255, 255, 255, 0));
    border-bottom-color: var(--border-soft);
}

body.light-theme .ai-chat-messages {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 242, 255, 0.85));
}

body.light-theme .ai-chat-message--assistant .ai-chat-message-content {
    background: #ffffff;
    border: 1px solid rgba(91, 63, 255, 0.16);
    color: var(--color-text);
}

body.light-theme .ai-chat-message--user .ai-chat-message-content {
    background: #f5f5f5;
    border: 1px solid rgba(91, 63, 255, 0.16);
    color: var(--color-text);
}

body.light-theme .ai-chat-message-content code {
    background: rgba(91, 63, 255, 0.12);
    color: var(--color-primary);
}

body.light-theme .ai-chat-message-content pre {
    background: rgba(238, 242, 255, 0.85);
    border: 1px solid rgba(91, 63, 255, 0.22);
    color: var(--color-text);
}

@keyframes ai-button-spectrum {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes ai-button-flare {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 0;
    }
    18% {
        opacity: 0.55;
    }
    40% {
        transform: rotate(140deg) scale(1.05);
        opacity: 0.15;
    }
    65% {
        transform: rotate(240deg) scale(0.95);
        opacity: 0.45;
    }
    100% {
        transform: rotate(360deg) scale(0.8);
        opacity: 0;
    }
}
