/* ============================================
   ТвойОтчёт — Design System
   На основе Дизайн 1 + Дизайн 2
   ============================================ */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* === CSS VARIABLES === */
:root {
    --primary: #9f1fef;
    --primary-hover: #8a17d4;
    --primary-light: rgba(159, 31, 239, 0.1);
    --primary-border: rgba(159, 31, 239, 0.2);
    --primary-glow: rgba(159, 31, 239, 0.4);

    --bg-dark: #0d0b12;
    --bg-sidebar: #0a0910;
    --bg-card: rgba(20, 18, 28, 0.5);
    --bg-input: rgba(14, 12, 22, 0.6);
    --bg-hover: rgba(159, 31, 239, 0.05);
    --bg-table-header: rgba(16, 14, 24, 0.6);

    --border: rgba(30, 30, 38, 1);
    --border-light: rgba(30, 30, 38, 0.6);

    --text-white: #ffffff;
    --text-primary: #e2e8f0;
    --text-secondary: #ae9db9;
    --text-muted: #64748b;
    --text-dim: #555;

    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --orange: #f97316;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --emerald: #10b981;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 5px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);

    --transition: all 0.2s ease;
}

/* === RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(30, 22, 38, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary-border);
    color: var(--text-white);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4a3b54; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6b5a78; }

/* === NUMBER INPUT SPINNERS === */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* === LAYOUT === */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === SIDEBAR (Hover-Expand) === */
.sidebar {
    width: 72px;
    background: rgba(21, 17, 24, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
}

.sidebar:hover {
    width: 250px;
}

.sidebar-logo {
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
}

.sidebar-logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-logo-text {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease 0.1s;
}

.sidebar:hover .sidebar-logo-text {
    opacity: 1;
}

.sidebar-logo h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.1;
}

.sidebar-logo p {
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 0.15rem;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-lg);
    color: rgba(173, 170, 170, 0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item .material-symbols-outlined {
    font-size: 1.25rem;
    min-width: 1.25rem;
    flex-shrink: 0;
}

.nav-label {
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    white-space: nowrap;
}

.sidebar:hover .nav-label {
    opacity: 1;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #e0dde5;
    text-decoration: none;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(159,31,239,0.18), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: calc(0.85rem - 3px);
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item.logout:hover {
    color: var(--red);
}

/* Hide old sidebar toggle and header collapsed elements */
.sidebar-toggle-btn,
.header-collapsed-logo,
.header-collapsed-divider,
.sidebar-toggle-open {
    display: none !important;
}


/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* === HEADER === */
.top-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(27, 16, 34, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.period-selector {
    display: flex;
    background: rgba(50, 40, 57, 1);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    gap: 0.125rem;
}

.period-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    color: var(--text-secondary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    font-family: inherit;
}

.period-btn:hover {
    color: var(--text-white);
}

.period-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-bell {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-lg);
    background: rgba(50, 40, 57, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    color: var(--text-secondary);
}

.header-bell:hover {
    background: rgba(60, 50, 67, 1);
    color: var(--text-white);
}

.header-bell .material-symbols-outlined {
    font-size: 1.25rem;
}

.bell-dot {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-sidebar);
    animation: bellPulse 2s ease-in-out infinite;
}

@keyframes bellPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.notif-wrapper {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: 360px;
    max-height: 420px;
    background: rgba(18, 10, 30, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-2xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(159, 31, 239, 0.08);
    z-index: 1000;
    overflow: hidden;
    animation: notifSlideIn 0.2s ease-out;
}

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

.notif-header {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: #fff;
}

.notif-list {
    overflow-y: auto;
    max-height: 340px;
    padding: 0.5rem;
}

.notif-item {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 0.25rem;
    transition: background 0.15s;
    cursor: default;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
    border-left: 3px solid var(--primary);
    background: rgba(159, 31, 239, 0.06);
}

.notif-item .notif-msg {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notif-item.unread .notif-msg {
    color: #fff;
}

.notif-item .notif-time {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.header-divider {
    width: 1px;
    height: 2rem;
    background: var(--border);
    margin: 0 0.25rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user-info {
    text-align: right;
}

.header-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
}

.header-user-role {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary-light);
    border: 2px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}

/* Avatar upload in settings */
.avatar-upload-area {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    background: rgba(50, 40, 57, 0.4);
    position: relative;
}

.avatar-upload-area img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-area .material-symbols-outlined {
    font-size: 2rem;
    color: var(--text-muted);
}

.avatar-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.avatar-section {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-hint {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
}

/* === SETTINGS GRID === */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.settings-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card-icon {
    font-size: 1rem;
}

.settings-card-body {
    padding: 1.25rem;
}

/* === CROP MODAL === */
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    width: 420px;
    max-width: 90vw;
}

.crop-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #111;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-container img {
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    pointer-events: none;
    transition: transform 0.15s;
}

.crop-circle {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
    cursor: move;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* === PAGE CONTENT === */
.page-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* === SECTION TITLES === */
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--primary);
}

.section-dot.green { background: var(--emerald); }

/* === KPI CARDS === */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    position: relative;
}
.kpi-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    background: var(--kpi-glow, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}
.kpi-card:hover::before {
    opacity: 1;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.15);
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.kpi-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.1rem;
}
.kpi-icon .material-symbols-outlined {
    font-size: 1.2rem;
}
.kpi-change {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 0.35rem;
}
.kpi-change.up {
    color: #4af8e3;
    background: rgba(74, 248, 227, 0.1);
}
.kpi-change.down {
    color: #ff6e84;
    background: rgba(255, 110, 132, 0.1);
}

.kpi-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.kpi-value-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.kpi-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

/* === SPARKLINE BARS === */
.kpi-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin-top: 1rem;
    height: 2rem;
    position: relative;
}
.kpi-spark-bar {
    flex: 1;
    border-radius: 3px 3px 1px 1px;
    min-height: 3px;
    transition: height 0.4s ease, opacity 0.3s ease;
    opacity: 0.35;
}
.kpi-spark-bar:nth-last-child(1) {
    opacity: 1;
}
.kpi-spark-bar:nth-last-child(2) {
    opacity: 0.65;
}

/* === CARD TOOLTIPS === */
.has-tooltip {
    position: relative;
}

.tooltip-icon {
    font-size: 0.75rem !important;
    color: var(--text-dim);
    vertical-align: middle;
    cursor: help;
    opacity: 0.5;
    transition: var(--transition);
    position: relative;
}

.tooltip-icon:hover {
    opacity: 1;
    color: var(--primary);
}

.card-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 22, 38, 0.97);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--text-secondary);
    width: 260px;
    z-index: 50;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.card-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-border);
}

.has-tooltip:hover .card-tooltip {
    display: block;
}

/* === FUNNEL CARDS === */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.funnel-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.1rem 1.25rem;
    border-radius: 1rem;
    transition: all 0.25s ease;
}

.funnel-card:hover {
    transform: translateY(-1px);
    background: var(--funnel-hover, rgba(255,255,255,0.07));
    border-color: var(--funnel-border, rgba(255,255,255,0.15));
}

.funnel-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.funnel-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.55rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.funnel-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

/* === DATA TABLE === */
.table-container {
    background: rgba(15, 10, 20, 0.5);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.table-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
}

.table-header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    max-width: 280px;
}

.search-box .material-symbols-outlined {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.status-filter {
    padding: 0.5rem 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

.status-filter:focus {
    border-color: var(--primary);
}

/* === TABLE === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: fixed;
}

.data-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--bg-table-header);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.data-table thead th:hover {
    color: var(--primary);
}

.data-table thead th.sorted {
    color: var(--primary);
}

.data-table thead th .sort-icon {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    opacity: 0.5;
}

.data-table thead th.sorted .sort-icon {
    opacity: 1;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.data-table td.text-right,
.data-table th.text-right {
    text-align: right;
}

.data-table td.text-center,
.data-table th.text-center {
    text-align: center;
}

/* Campaign name cell */
.campaign-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.campaign-expand {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.campaign-expand:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.campaign-expand.expanded {
    color: var(--primary);
}

.campaign-expand.locked {
    color: var(--text-dim);
    cursor: default;
}

.campaign-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.campaign-status-dot.active { background: var(--green); }
.campaign-status-dot.paused { background: var(--text-muted); }

.campaign-info {
    overflow: hidden;
}

.campaign-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white);
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-name.paused {
    background: rgba(80, 0, 0, 0.6);
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 0.125rem 0.375rem;
    display: inline-block;
}

.campaign-id {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: monospace;
    background: rgba(255,255,255,0.06);
    padding: 0.0625rem 0.375rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: all;
    margin-top: 0.125rem;
    display: inline-block;
}

.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 700;
}

.status-badge.active {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.paused {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Sub-rows (groups, ads) */
.group-row td {
    background: rgba(255,255,255,0.015);
}

.group-row .campaign-cell {
    padding-left: 1rem;
}

.ad-row td {
    background: rgba(255,255,255,0.005);
}

.ad-row .campaign-cell {
    padding-left: 2rem;
}

.ad-row td {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Summary row */
.summary-row td {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    border-top: 2px solid var(--primary-border);
    border-bottom: 2px solid var(--primary-border);
}
.summary-row--bright td {
    background: rgba(255, 255, 255, 0.04);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    border-top: 2px solid rgba(124,58,237,0.5);
    border-bottom: 2px solid rgba(124,58,237,0.5);
}
.summary-row--bright td:first-child {
    border-left: 3px solid var(--primary);
}

/* Campaign Show More / Hide buttons */
.camp-show-more-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
}
.camp-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(124,58,237,0.3);
    border-radius: 0.75rem;
    background: rgba(124,58,237,0.08);
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.camp-show-more-btn:hover {
    background: rgba(124,58,237,0.2);
    border-color: rgba(124,58,237,0.5);
    color: #e9d5ff;
    transform: translateY(-1px);
}
.camp-show-more-btn .material-symbols-outlined {
    font-size: 1.1rem;
}
.camp-hide-btn {
    background: rgba(239,68,68,0.06);
    border-color: rgba(239,68,68,0.2);
    color: #fca5a5;
}
.camp-hide-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #fecaca;
}

/* Value dim when zero */
.val-dim { color: var(--text-dim); }

/* === BUTTONS === */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

/* === LOADING === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 16, 34, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    flex-direction: column;
    gap: 1rem;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-xl);
    padding: 1rem 1.5rem;
    color: var(--text-white);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    transform: translateY(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateY(0);
}

/* === GLASSMORPHISM CHART SECTION === */
.glass-chart-section {
    position: relative;
    background: rgba(38, 38, 38, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2rem;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(159, 31, 239, 0.06);
    margin-top: 0.5rem;
}

.glass-chart-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.glass-chart-glow--primary {
    width: 380px;
    height: 380px;
    background: rgba(159, 31, 239, 0.08);
    top: -180px;
    right: -180px;
}

.glass-chart-glow--secondary {
    width: 320px;
    height: 320px;
    background: rgba(16, 185, 129, 0.06);
    bottom: -160px;
    left: -160px;
}

.glass-chart-inner {
    position: relative;
    z-index: 1;
}

.glass-chart-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.glass-chart-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0;
}

.glass-chart-subtitle {
    font-size: 0.8rem;
    color: rgba(173, 170, 170, 0.7);
    margin-top: 0.25rem;
}

.glass-chart-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.glass-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: rgba(200, 200, 200, 0.7);
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
}

.glass-toggle:hover {
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.glass-toggle.active[data-metric='clicks'] {
    background: rgba(159, 31, 239, 0.12);
    border-color: rgba(159, 31, 239, 0.4);
    color: #c799ff;
    box-shadow: 0 0 12px rgba(159, 31, 239, 0.15);
}

.glass-toggle.active[data-metric='leads'] {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #4af8e3;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.glass-toggle.active[data-metric='qleads'] {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.4);
    color: #ffc87f;
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.15);
}

.glass-toggle.active[data-metric='sales'] {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.4);
    color: #ff6e84;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.15);
}

.glass-toggle.active[data-metric='cost'] {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ff6e84;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.glass-toggle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.glass-chart-canvas-wrap {
    position: relative;
    height: 420px;
    width: 100%;
}

/* Keep old classes for time-day grid */
.time-day-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.time-day-grid > .chart-card {
    min-width: 0;
    overflow: hidden;
}

.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    position: relative;
}

.chart-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* === AUDIENCE ANALYTICS (Glassmorphism) === */
.glass-audience-section {
    margin-top: 2rem;
}

.glass-audience-settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    border: 1px solid rgba(72,72,71,0.15);
    background: rgba(38,38,38,0.4);
    color: rgba(173,170,170,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}

.glass-audience-settings-btn:hover {
    border-color: rgba(199,153,255,0.3);
    color: #c799ff;
    background: rgba(199,153,255,0.08);
}

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

.glass-audience-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin: 0;
}

.glass-audience-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.glass-audience-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4af8e3;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,248,227,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(74,248,227,0); }
}

.glass-audience-total-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(173,170,170,0.7);
}

.glass-audience-total-text span,
.glass-audience-total-text b,
.glass-audience-total-text strong {
    color: #fff;
    font-weight: 700;
}

.glass-audience-toggles {
    display: flex;
    background: rgba(19,19,19,0.6);
    padding: 5px;
    border-radius: 1rem;
    border: 1px solid rgba(72,72,71,0.1);
}

.glass-audience-toggle {
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    background: transparent;
    color: rgba(173,170,170,0.7);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.glass-audience-toggle:hover {
    color: #fff;
}

.glass-audience-toggle.active {
    background: rgba(38,38,38,0.6);
    backdrop-filter: blur(20px);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.glass-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.glass-audience-card {
    position: relative;
    background: rgba(38,38,38,0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1.75rem;
    padding: 1.75rem;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-audience-card:hover {
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.glass-audience-card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.7s ease;
}

.glass-audience-card:hover .glass-audience-card-glow {
    opacity: 0.8;
}

.glass-audience-card-glow--violet {
    background: rgba(199,153,255,0.08);
    top: -100px;
    right: -100px;
}

.glass-audience-card-glow--teal {
    background: rgba(74,248,227,0.08);
    bottom: -100px;
    left: -100px;
}

.glass-audience-card-glow--amber {
    background: rgba(255,200,127,0.08);
    top: -100px;
    left: -100px;
}

.glass-audience-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.glass-audience-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-align: left;
}

.glass-audience-icon {
    font-size: 1.5rem;
}

.glass-audience-card .donut-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.glass-audience-card .donut-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.25rem;
    font-size: 0.7rem;
    color: rgba(173,170,170,0.7);
    position: relative;
    z-index: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

/* === Glass Legend: Stat Cards (Devices) === */
.glass-legend-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
}

.glass-legend-stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
}

.glass-legend-stat-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(173,170,170,0.6);
    margin-bottom: 0.4rem;
}

.glass-legend-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* === Glass Legend: Icon Rows (Gender) === */
.glass-legend-rows {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.glass-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
    padding: 0.65rem 1rem;
}

.glass-legend-row-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e0dde5;
}

.glass-legend-row-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

/* === Glass Legend: Progress Bars (Age) === */
.glass-legend-bars {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.glass-legend-bar-item {
    width: 100%;
}

.glass-legend-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.glass-legend-bar-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: rgba(173,170,170,0.7);
}

.glass-legend-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.glass-legend-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 99px;
    overflow: hidden;
}

.glass-legend-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}

.glass-legend-cost {
    display: inline-block;
    font-size: 0.65rem;
    color: rgba(74,248,227,0.8);
    font-weight: 600;
    margin-left: 0.25rem;
}

/* === GEOGRAPHY SECTION (Glass) === */
.geo-section { margin-bottom: 2rem; }
.geo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.geo-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.geo-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}
.geo-title-accent {
    background: linear-gradient(135deg, #c799ff, #bc87fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.geo-subtitle {
    font-size: 0.8rem;
    color: rgba(173,170,170,0.7);
    margin: 0.25rem 0 0;
}
.geo-total-pill {
    background: rgba(38,38,38,0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(72,72,71,0.15);
    border-left: 4px solid #c799ff;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
}
.geo-total-pill-main { display: flex; flex-direction: column; }
.geo-total-pill-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(173,170,170,0.5);
}
.geo-total-pill-value {
    font-family: 'Manrope', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}
.geo-metric-btns { display: none; } /* Hidden, replaced by sidebar */
.geo-metric-btn { display: none; }

/* Map Bento Layout */
.geo-map-bento {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}
@media (max-width: 1100px) {
    .geo-map-bento { grid-template-columns: 180px 1fr; }
    .geo-insight-sidebar { display: none; }
}
@media (max-width: 768px) {
    .geo-map-bento { grid-template-columns: 1fr; }
}
.geo-filter-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.geo-filter-card {
    background: rgba(38,38,38,0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1.5rem;
    padding: 1.25rem;
}
.geo-filter-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(72,72,71,0.1);
    padding-bottom: 0.75rem;
    margin: 0 0 0.75rem;
}
.geo-filter-btns { display: flex; flex-direction: column; gap: 0.5rem; }
.geo-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    border: none;
    background: rgba(32,32,31,0.7);
    color: rgba(173,170,170,0.7);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}
.geo-filter-btn:hover { color: #fff; background: rgba(50,50,49,0.8); }
.geo-filter-btn.active {
    background: #c799ff;
    color: #111;
    font-weight: 800;
}
.geo-filter-btn.active .geo-filter-dot { display: none; }
.geo-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.geo-insight-card {
    background: rgba(38,38,38,0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.geo-insight-card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.geo-insight-card--clicks { background-image: linear-gradient(135deg, rgba(199,153,255,0.06) 0%, transparent 60%); }
.geo-insight-card--leads { background-image: linear-gradient(135deg, rgba(74,248,227,0.06) 0%, transparent 60%); }
.geo-insight-card--qleads { background-image: linear-gradient(135deg, rgba(255,200,127,0.06) 0%, transparent 60%); }
.geo-insight-card--sales { background-image: linear-gradient(135deg, rgba(255,107,157,0.06) 0%, transparent 60%); }
.geo-insight-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}
.geo-top-icon {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}
.geo-top-icon .material-symbols-outlined { font-size: 1.1rem; }
.geo-top-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(173,170,170,0.5);
    font-family: 'Space Grotesk', monospace;
}
.geo-top-region {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
}
.geo-top-value {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

/* Globe Container */
.geo-map-container {
    position: relative;
    background: rgba(18,18,28,0.6);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1.5rem;
    overflow: hidden;
    height: 420px;
}
.geo-globe-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}
.geo-globe-canvas:active { cursor: grabbing; }
.geo-map-density {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    z-index: 5;
    pointer-events: none;
}
.geo-map-density span {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(173,170,170,0.5);
}
.geo-map-density-bar {
    width: 100px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right, rgba(26,26,26,0.8), #c799ff, #4af8e3);
}
.geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) { .geo-grid { grid-template-columns: 1fr; } }
.geo-glass-card {
    position: relative;
    background: rgba(38,38,38,0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
}
.geo-glass-card-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
}
.geo-glass-card-glow--purple { background: #c799ff; top: -40px; right: -40px; }
.geo-glass-card-glow--teal { background: #4af8e3; top: -40px; right: -40px; }
.geo-glass-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(72,72,71,0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}
.geo-glass-card-header h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    margin: 0;
}
.geo-glass-card-badge {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.6rem;
    color: rgba(173,170,170,0.6);
}
.geo-bars-list { display: flex; flex-direction: column; gap: 1rem; }
.geo-bar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}
.geo-bar-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
}
.geo-bar-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem;
    font-weight: 700;
}
.geo-bar-value--purple { color: #c799ff; }
.geo-bar-value--teal { color: #4af8e3; }
.geo-bar-track {
    width: 100%;
    height: 0.5rem;
    background: rgba(26,26,26,0.6);
    border-radius: 99px;
    overflow: hidden;
}
.geo-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}
.geo-bar-fill--purple { background: linear-gradient(90deg, #c799ff, #bc87fe); }
.geo-bar-fill--teal { background: linear-gradient(90deg, #4af8e3, #33e9d5); }
.geo-card-footer {
    text-align: center;
    margin-top: 0.75rem;
}
.geo-show-more-btn, .geo-collapse-btn {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    margin: 0.2rem;
}
.geo-show-more-btn {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.3);
}
.geo-show-more-btn:hover { background: rgba(139,92,246,0.3); }
.geo-collapse-btn {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.25);
}
.geo-collapse-btn:hover { background: rgba(239,68,68,0.25); }
.geo-info-txt {
    font-size: 0.65rem;
    color: rgba(139,122,158,0.7);
    margin-top: 0.3rem;
}

/* === STATUS BADGE (table) === */
.status-pill-table {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.status-pill-table.active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill-table.paused {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === ROMI COLORING === */
.romi-positive { color: #22c55e; }
.romi-negative { color: #ef4444; }



/* === LOGIN PAGE === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.login-bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.login-bg .blob-1 {
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: rgba(159, 31, 239, 0.2);
}

.login-bg .blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: rgba(159, 31, 239, 0.1);
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 60rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 0 auto;
}

.login-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-hero-icon {
    width: 5rem;
    height: 5rem;
    background: var(--primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--primary-glow);
    animation: fadeInUp 0.8s ease forwards;
}

.login-hero-icon .material-symbols-outlined {
    font-size: 3rem;
    color: white;
}

.login-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.1;
    letter-spacing: -0.033em;
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.login-hero h1 span {
    color: var(--primary);
}

.login-hero-desc {
    max-width: 28rem;
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.login-hero-desc p:first-child {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.login-hero-desc p:last-child {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.login-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.login-stat {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.1);
}

.login-stat-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.login-stat-label {
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Glass form card */
.login-form-card {
    width: 100%;
    max-width: 28rem;
    background: rgba(34, 28, 39, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-2xl);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.login-form-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.login-form-card .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input-wrapper {
    position: relative;
}

.form-input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-input);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--radius-lg);
    color: var(--text-white);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.form-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

.form-row a {
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.form-divider span {
    color: var(--text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid rgba(100, 116, 139, 0.3);
}

.btn-register {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.form-error {
    color: var(--red);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

.form-error.visible {
    display: block;
}

.login-footer {
    position: fixed;
    bottom: 1.5rem;
    width: 100%;
    text-align: center;
    z-index: 10;
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* === INTEGRATIONS PAGE === */
.integration-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.integration-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.integration-title-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.integration-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    font-size: 1.5rem;
}

.integration-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-white);
}

.status-pill {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.on {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill.off {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.integration-body {
    padding: 0 1.5rem 1.5rem;
    display: none;
}

.integration-body.open {
    display: block;
}

.integration-body .form-group {
    max-width: 400px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .funnel-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .sidebar { display: none; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .funnel-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .audience-grid { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-container { justify-content: center; }
    .page-content { padding: 1rem; }
    .top-header { padding: 0.75rem 1rem; }
    .datepicker-dropdown { left: 0; right: 0; }
    .datepicker-calendars { flex-direction: column; }
    .settings-grid { grid-template-columns: 1fr; }
}

/* === DATE PICKER === */
.datepicker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(30, 22, 38, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    z-index: 50;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    min-width: 560px;
}

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.datepicker-month-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    flex: 1;
    text-align: center;
}

.datepicker-nav {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.datepicker-nav:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.datepicker-calendars {
    display: flex;
    gap: 1.5rem;
}

.datepicker-month {
    flex: 1;
}

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    margin-bottom: 0.25rem;
}

.dp-weekday {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    padding: 0.375rem 0;
    text-transform: uppercase;
}

.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.125rem;
}

.dp-day {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.dp-day:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dp-day.empty {
    cursor: default;
}
.dp-day.empty:hover {
    background: transparent;
}

.dp-day.today {
    border: 1px solid var(--primary);
}

.dp-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: var(--radius-md);
}

.dp-day.in-range {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 0;
}

.dp-day.range-start {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.dp-day.range-end {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.dp-day.other-month {
    color: var(--text-dim);
}

.dp-day.disabled {
    color: var(--text-dim);
    cursor: not-allowed;
    opacity: 0.3;
}

.datepicker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.datepicker-range-display {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
}

/* Hidden utility */
.hidden { display: none !important; }


/* === CLASSIC REPORT TABLE === */
.report-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-lg);
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    vertical-align: middle;
    margin-right: 0.4rem;
}

.report-icon .material-symbols-outlined {
    font-size: 1.1rem;
}

.report-month-select {
    background: var(--bg-card);
    color: #fff;
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-family: Inter, sans-serif;
    cursor: pointer;
    outline: none;
}

.report-month-select option {
    background: #1a1025;
    color: #fff;
}

.report-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-2xl);
    background: var(--bg-card);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    white-space: nowrap;
}

.report-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.report-table th {
    background: rgba(30, 20, 42, 0.98);
    color: var(--text-secondary);
    padding: 0.65rem 0.75rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--primary-border);
}

.report-table th.col-month,
.report-table th.col-date {
    text-align: left;
}

.report-filter-row th {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--primary-border);
}

.report-filter {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #fff;
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
    font-family: Inter, sans-serif;
    outline: none;
    transition: border-color 0.15s;
}

.report-filter:focus {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.06);
}

.report-table td {
    padding: 0.5rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.report-table td:first-child {
    text-align: left;
    color: #fff;
    font-weight: 500;
}

.report-table tbody tr:hover {
    background: rgba(159, 31, 239, 0.04);
}

.report-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.report-table tbody tr:nth-child(even):hover {
    background: rgba(159, 31, 239, 0.06);
}

.report-table tr.report-summary {
    background: rgba(159, 31, 239, 0.08) !important;
    font-weight: 700;
    border-top: 2px solid var(--primary-border);
}

.report-table tr.report-summary td {
    color: #fff;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

/* === REPORT GROUPING BUTTONS === */
.report-group-btns {
    display: flex;
    gap: 0.25rem;
    background: rgba(30,25,40,0.6);
    border-radius: 0.6rem;
    padding: 0.2rem;
    border: 1px solid rgba(139,92,246,0.12);
}
.report-group-btn {
    padding: 0.35rem 0.85rem;
    border: none;
    border-radius: 0.45rem;
    background: transparent;
    color: rgba(200,195,210,0.6);
    font-size: 0.72rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.report-group-btn:hover {
    color: rgba(200,195,210,0.9);
    background: rgba(139,92,246,0.08);
}
.report-group-btn.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(168,85,247,0.2));
    color: #c799ff;
    box-shadow: 0 1px 6px rgba(139,92,246,0.2);
}

/* === REPORT NOTES COLUMN === */
.col-notes {
    min-width: 160px;
    max-width: 240px;
    text-align: left !important;
    padding-left: 1rem !important;
}
.note-cell {
    position: relative;
    min-width: 140px;
    max-width: 240px;
    padding: 0.3rem 0.5rem !important;
    vertical-align: top !important;
    cursor: pointer;
}
.note-cell-active {
    cursor: default;
    padding: 0.25rem 0.35rem !important;
}
.note-preview {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 28px;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}
.note-preview--empty {
    justify-content: center;
    opacity: 0.25;
}
.note-preview--empty:hover {
    opacity: 0.6;
    background: rgba(139,92,246,0.08);
}
.note-preview--filled {
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.15);
}
.note-preview--filled:hover {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.3);
}
.note-icon {
    font-size: 0.9rem !important;
    color: #a78bfa;
    flex-shrink: 0;
}
.note-preview-text {
    font-size: 0.68rem;
    color: rgba(200,195,210,0.85);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.report-note-editor {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
    background: rgba(22,18,28,0.95);
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 0.5rem;
    padding: 0.5rem 0.6rem;
    color: #e0dde5;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.report-note-editor:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 2px rgba(139,92,246,0.15), 0 4px 20px rgba(0,0,0,0.4);
}
.report-note-editor::placeholder {
    color: rgba(173,170,170,0.4);
}

.col-filterable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.col-filterable:hover {
    background: rgba(124, 58, 237, 0.12) !important;
    color: #fff;
}

.col-filter-icon {
    display: inline-block;
    width: 0;
    font-size: 0;
    transition: all 0.15s;
}

.col-filterable.filtered .col-filter-icon::after {
    content: "▼";
    font-size: 0.55rem;
    color: #a78bfa;
    margin-left: 0.2rem;
}

.col-filterable:hover .col-filter-icon::after {
    content: "▼";
    font-size: 0.55rem;
    color: var(--text-dim);
    margin-left: 0.2rem;
}

/* Column Filter Popup */
.col-filter-popup {
    position: absolute;
    width: 260px;
    max-height: 380px;
    background: rgba(18, 10, 30, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 58, 237, 0.08);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: notifSlideIn 0.15s ease-out;
}

.col-filter-search {
    padding: 0.6rem 0.75rem 0.4rem;
}

.col-filter-search input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-family: Inter, sans-serif;
    outline: none;
}

.col-filter-search input:focus {
    border-color: var(--primary);
}

.col-filter-actions {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.75rem 0.4rem;
    font-size: 0.72rem;
}

.col-filter-actions a {
    color: #a78bfa;
    text-decoration: none;
    cursor: pointer;
}

.col-filter-actions a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

.col-filter-options {
    overflow-y: auto;
    max-height: 220px;
    padding: 0 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.3) transparent;
}

.col-filter-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.35rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: background 0.1s;
}

.col-filter-opt:hover {
    background: rgba(124, 58, 237, 0.08);
    color: #fff;
}

.col-filter-opt input[type="checkbox"] {
    accent-color: #7c3aed;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.col-filter-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
    text-align: right;
}

.metric-total-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: -0.4rem 0 0.6rem 0.25rem;
    min-height: 1.2rem;
}

.metric-total-label span {
    color: #fff;
    font-weight: 600;
}

/* Column Settings Dropdown */
.hidden {
    display: none !important;
}

.btn-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.col-settings-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 220px;
    background: rgba(18, 10, 30, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(124,58,237,0.08);
    z-index: 2000;
    padding: 0.5rem 0;
    animation: notifSlideIn 0.15s ease-out;
}

.col-settings-title {
    padding: 0.4rem 0.85rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}

.col-settings-list {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.3) transparent;
}

.col-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.col-settings-item:hover {
    background: rgba(124,58,237,0.08);
    color: #fff;
}

.col-settings-item.disabled-col {
    color: var(--text-dim);
}

/* Toggle switch */
.col-toggle {
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(255,255,255,0.1);
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.col-toggle.active {
    background: #7c3aed;
}

.col-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.col-toggle.active::after {
    transform: translateX(14px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline:hover {
    background: rgba(124,58,237,0.1);
    border-color: #7c3aed;
    color: #fff;
}


/* ============================================
   ONBOARDING WIZARD
   ============================================ */

/* Overlay */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0d0714;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.onboarding-overlay.hidden {
    display: none;
}

/* Animated Background */
.onboarding-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ob-particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: obFloat 12s ease-in-out infinite;
}

.ob-p1 { width: 400px; height: 400px; background: #7c3aed; top: -100px; left: -100px; animation-delay: 0s; }
.ob-p2 { width: 350px; height: 350px; background: #ec4899; bottom: -80px; right: -80px; animation-delay: -4s; }
.ob-p3 { width: 250px; height: 250px; background: #3b82f6; top: 40%; right: 10%; animation-delay: -8s; }
.ob-p4 { width: 200px; height: 200px; background: #10b981; bottom: 20%; left: 15%; animation-delay: -2s; }
.ob-p5 { width: 300px; height: 300px; background: #8b5cf6; top: 10%; left: 40%; animation-delay: -6s; }

@keyframes obFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Container */
.onboarding-container {
    position: relative;
    width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(18, 12, 28, 0.85);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(124, 58, 237, 0.08);
}

/* Progress Bar */
.ob-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.ob-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    border-radius: 99px;
    transition: width 0.5s ease;
}

/* Step Dots */
.ob-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.ob-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.ob-step-dot.active {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    transform: scale(1.1);
}

.ob-step-dot.completed {
    background: #10b981;
    border-color: transparent;
    color: #fff;
}

.ob-step-dot.completed span {
    font-size: 0;
}
.ob-step-dot.completed::after {
    content: '✓';
    font-size: 0.75rem;
}

.ob-step-line {
    width: 32px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Step Content */
.ob-step {
    text-align: center;
}

.ob-step.hidden {
    display: none;
}

/* Icon Wrap */
.ob-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ob-icon-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3), transparent 70%);
    animation: obPulse 3s ease-in-out infinite;
}

.ob-glow-yellow { background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent 70%); }
.ob-glow-blue { background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%); }
.ob-glow-green { background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%); }
.ob-glow-emerald { background: radial-gradient(circle, rgba(34, 197, 94, 0.3), transparent 70%); }

@keyframes obPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.ob-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    border: 2px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ob-icon-circle .material-symbols-outlined {
    font-size: 2rem;
    color: #a78bfa;
}

.ob-circle-yellow { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.25); }
.ob-circle-yellow .material-symbols-outlined { color: #fbbf24; }
.ob-circle-blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); }
.ob-circle-blue .material-symbols-outlined { color: #60a5fa; }
.ob-circle-green { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.25); }
.ob-circle-green .material-symbols-outlined { color: #34d399; }
.ob-circle-emerald { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.25); }
.ob-circle-emerald .material-symbols-outlined { color: #22c55e; font-size: 2.5rem; }

.ob-logo-svg {
    position: relative;
}

/* Text */
.ob-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.ob-brand {
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ob-desc {
    font-size: 0.9rem;
    color: #a89bb4;
    line-height: 1.6;
    max-width: 450px;
    margin: 0 auto 1.5rem;
}

/* Features */
.ob-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    align-items: center;
}

.ob-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #d4c7e3;
    width: 320px;
    max-width: 100%;
    transition: all 0.2s;
}

.ob-feature:hover {
    background: rgba(124, 58, 237, 0.14);
    transform: translateX(4px);
}

.ob-feature .material-symbols-outlined {
    font-size: 1.25rem;
    color: #a78bfa;
}

/* Buttons */
.ob-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0.75rem 1.75rem;
}

.ob-btn-primary {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.ob-btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9, #7e22ce);
    box-shadow: 0 6px 28px rgba(124, 58, 237, 0.45);
    transform: translateY(-2px);
}

.ob-btn-primary .material-symbols-outlined {
    font-size: 1.1rem;
}

.ob-btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.ob-btn-ghost {
    background: transparent;
    color: #a89bb4;
    padding: 0.5rem 1rem;
}

.ob-btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.ob-btn-ghost .material-symbols-outlined {
    font-size: 1rem;
}

.ob-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}

.ob-btn-sm:hover {
    background: linear-gradient(135deg, #6d28d9, #7e22ce);
}

.ob-btn-yandex {
    background: linear-gradient(135deg, #fc3f1d, #ff6633);
    color: #fff;
    font-size: 0.95rem;
    padding: 0.85rem 2rem;
    box-shadow: 0 4px 20px rgba(252, 63, 29, 0.3);
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.25s;
}

.ob-btn-yandex:hover {
    background: linear-gradient(135deg, #e33615, #eb5520);
    box-shadow: 0 6px 28px rgba(252, 63, 29, 0.45);
    transform: translateY(-2px);
}

/* Navigation */
.ob-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* Info Card */
.ob-info-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.ob-info-card .material-symbols-outlined {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.ob-info-card strong {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.ob-info-card p {
    font-size: 0.8rem;
    color: #a89bb4;
    line-height: 1.5;
    margin: 0;
}

.ob-info-small {
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.15);
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: #a89bb4;
    align-items: center;
}

.ob-info-small div {
    font-size: 0.8rem;
    color: #a89bb4;
}

/* Connected Badge */
.ob-connected-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.9rem;
    animation: obFadeSlideIn 0.4s ease-out;
}

.ob-connected-badge .material-symbols-outlined {
    font-size: 1.3rem;
}

.ob-connect-status {
    margin: 1.5rem 0;
}

/* Client Selection (Organization accounts) */
.ob-client-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
}

.ob-client-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
}

.ob-client-item.ob-client-selected {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.ob-client-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}

.ob-client-item input[type="radio"]:checked {
    border-color: #10b981;
    background: #10b981;
}

.ob-client-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.ob-client-login {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.ob-client-detail {
    font-size: 0.72rem;
    color: #8b7a9e;
    margin-top: 0.1rem;
}

.ob-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Sync Card */
.ob-sync-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0.5rem 0;
    margin: 1.5rem 0;
}

.ob-sync-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ob-sync-item:last-child {
    border-bottom: none;
}

.ob-sync-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ob-sync-icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.ob-sync-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: obSpinAnim 0.8s linear infinite;
}

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

.ob-sync-info {
    text-align: left;
}

.ob-sync-label {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.ob-sync-detail {
    font-size: 0.75rem;
    color: #8b7a9e;
    margin-top: 0.15rem;
    transition: color 0.3s;
}

/* Sync Progress */
.ob-sync-progress-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
    margin: 1rem 0 0.75rem;
}

.ob-sync-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #3b82f6, #10b981);
    border-radius: 99px;
    transition: width 1s ease;
    background-size: 200% 100%;
    animation: obShimmer 2s ease-in-out infinite;
}

@keyframes obShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}

.ob-audience-bar {
    background: linear-gradient(90deg, #f59e0b, #10b981, #06b6d4);
    background-size: 200% 100%;
    animation: obShimmer 2s ease-in-out infinite;
}

.ob-sync-elapsed {
    font-size: 0.8rem;
    color: #8b7a9e;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.ob-spin {
    animation: obSpinIcon 2s linear infinite;
}

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

/* Metrika */
.ob-metrika-section {
    text-align: left;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.ob-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.ob-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    margin-left: auto;
}

.ob-badge-green {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.ob-counter-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ob-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(27, 16, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 0.75rem;
    flex: 1;
    transition: border-color 0.2s;
}

.ob-input-wrap:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.ob-input-wrap .material-symbols-outlined {
    font-size: 1rem;
    color: #6b5a78;
}

.ob-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.ob-input::placeholder {
    color: #5a4d68;
}

.ob-search-wrap {
    margin-bottom: 0.5rem;
}

.ob-counters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ob-counter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 99px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: #d4c7e3;
}

.ob-counter-remove {
    cursor: pointer;
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.15rem;
    transition: color 0.15s;
}

.ob-counter-remove:hover {
    color: #f87171;
}

.ob-no-counters {
    font-size: 0.8rem;
    color: #6b5a78;
    padding: 0.5rem 0;
}

/* Goals List */
.ob-goals-list {
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.ob-goals-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #8b7a9e;
    padding: 1rem 0;
    justify-content: center;
}

.ob-goal-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #d4c7e3;
    transition: background 0.15s;
}

.ob-goal-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ob-goal-checked {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.ob-goal-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s;
}

.ob-goal-item input[type="checkbox"]:checked {
    background: var(--accent, #ec4899);
    border-color: var(--accent, #ec4899);
}

.ob-goal-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.ob-goal-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Done Page */
.ob-done-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
    text-align: left;
}

.ob-done-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #6b5a78;
}

.ob-done-item .material-symbols-outlined {
    font-size: 1.1rem;
}

.ob-done-item.ob-done-ok {
    color: #10b981;
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
}

.ob-done-item.ob-done-ok .material-symbols-outlined {
    color: #22c55e;
}

/* Animations */
@keyframes obFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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


/* ===================================================================
   EMPLOYEES / ORG CHART STYLES
   =================================================================== */

.emp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.emp-page-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.emp-page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.emp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.emp-btn .material-symbols-outlined { font-size: 1.1rem; }

.emp-btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    box-shadow: 0 4px 15px rgba(159, 31, 239, 0.3);
}

.emp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(159, 31, 239, 0.4);
}

.emp-btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.emp-btn-secondary:hover { background: rgba(159, 31, 239, 0.15); }

.emp-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.emp-btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

.emp-org-chart {
    overflow-x: auto;
    padding: 1rem 0 2rem;
}

.emp-tree-level {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
}

.emp-tree-root {
    flex-direction: column;
    align-items: center;
}

.emp-tree-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.emp-tree-connector {
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(159, 31, 239, 0.2) 100%);
    margin: 0 auto;
}

.emp-tree-node {
    background: rgba(159, 31, 239, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(159, 31, 239, 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 260px;
    max-width: 340px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.emp-tree-node:hover {
    border-color: rgba(159, 31, 239, 0.5);
    box-shadow: 0 8px 30px rgba(159, 31, 239, 0.15);
    transform: translateY(-2px);
}

.emp-node-head {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 2rem;
    min-width: 280px;
    border-color: rgba(159, 31, 239, 0.4);
    box-shadow: 0 0 25px rgba(159, 31, 239, 0.1), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.emp-node-head:hover {
    box-shadow: 0 0 35px rgba(159, 31, 239, 0.2), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.emp-node-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    border: 2px solid rgba(159, 31, 239, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), rgba(124, 58, 237, 0.15));
}

.emp-avatar-large {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-width: 3px;
    border-color: var(--primary);
}

.emp-node-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.emp-avatar-initials {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.emp-avatar-large .emp-avatar-initials { font-size: 1.6rem; }

.emp-node-info { flex: 1; min-width: 0; }

.emp-node-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.emp-node-head .emp-node-name { font-size: 1.1rem; }

.emp-node-position {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0.15rem 0 0;
}

.emp-node-dept {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    margin-top: 0.3rem;
}

.emp-node-contact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
}

.emp-node-contact .material-symbols-outlined { font-size: 0.85rem; }

.emp-add-child-btn {
    position: absolute;
    bottom: -12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 2;
}

.emp-add-child-btn .material-symbols-outlined { font-size: 1rem; }

.emp-tree-node:hover .emp-add-child-btn { opacity: 1; }

.emp-add-child-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.emp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.emp-empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(159, 31, 239, 0.1), rgba(124, 58, 237, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-border);
}

.emp-empty-icon .material-symbols-outlined {
    font-size: 3rem;
    color: var(--primary);
}

.emp-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.emp-empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.emp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.emp-modal-overlay.hidden { display: none; }

.emp-modal {
    background: var(--bg-card);
    border: 1px solid var(--primary-border);
    border-radius: 1rem;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: empModalIn 0.3s ease-out;
}

.emp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--primary-border);
}

.emp-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.emp-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.emp-modal-close:hover { color: var(--primary); }

.emp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
}

.emp-form-full { grid-column: 1 / -1; }

.emp-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.emp-form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.emp-form-group input,
.emp-form-group select {
    background: var(--bg-body);
    border: 1px solid var(--primary-border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.emp-form-group input:focus,
.emp-form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 31, 239, 0.1);
}

.emp-photo-section { padding: 0 1.5rem 1rem; }

.emp-photo-section > label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.emp-photo-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.emp-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 2px dashed var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.emp-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--primary-border);
    gap: 0.75rem;
}

.emp-modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

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

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

.emp-org-chart::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(159, 31, 239, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.emp-org-chart::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(159, 31, 239, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

@media (max-width: 768px) {
    .emp-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .emp-tree-level {
        flex-direction: column;
        align-items: center;
    }
    .emp-tree-node {
        min-width: 220px;
        max-width: 100%;
    }
    .emp-form-grid { grid-template-columns: 1fr; }
    .emp-modal { max-width: 100%; }
}


/* ===================================================================
   RECOMMENDATIONS PAGE STYLES
   =================================================================== */

/* Targets dropdown wrapper */
.reco-targets-wrap {
    position: relative;
}

.reco-targets-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(159, 31, 239, 0.1);
    border: 1px solid rgba(159, 31, 239, 0.25);
    border-radius: 0.65rem;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.reco-targets-toggle-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(159, 31, 239, 0.3);
}

.reco-targets-toggle-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

.reco-targets-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: 320px;
    background: rgba(18, 10, 30, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(159, 31, 239, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    z-index: 100;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(159, 31, 239, 0.08);
    animation: recoDropIn 0.2s ease-out;
}

.reco-targets-dropdown.hidden {
    display: none;
}

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

.reco-targets-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reco-targets-header .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.3rem;
}

.reco-targets-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.reco-target-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reco-target-field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
    margin-left: 0.25rem;
}

.reco-target-field input {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.reco-target-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 31, 239, 0.1);
}

.reco-save-targets-btn {
    width: 100%;
    background: rgba(159, 31, 239, 0.1);
    color: var(--primary);
    border: 1px solid rgba(159, 31, 239, 0.2);
    border-radius: 0.65rem;
    padding: 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.25rem;
}

.reco-save-targets-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Header actions row */
.reco-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Inline metric switcher */
.reco-metric-switcher-inline {
    display: flex;
    background: rgba(50, 40, 57, 1);
    padding: 0.25rem;
    border-radius: 0.6rem;
    gap: 0.125rem;
}

.reco-metric-btn {
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.reco-metric-btn:hover { color: var(--text-main); }

.reco-metric-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(159, 31, 239, 0.3);
}

/* Main content */
.reco-main { min-width: 0; }

.reco-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.reco-page-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reco-page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Summary cards */
.reco-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reco-summary-card {
    background: rgba(159, 31, 239, 0.04);
    border: 1px solid rgba(159, 31, 239, 0.12);
    border-radius: 1rem;
    padding: 1.25rem;
}

.reco-summary-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.reco-summary-value { display: flex; align-items: baseline; gap: 0.5rem; }

.reco-big-num { font-size: 1.75rem; font-weight: 900; color: var(--text-main); }
.reco-big-num.reco-red { color: #ef4444; }
.reco-big-num.reco-green { color: #10b981; }

.reco-vs {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.reco-summary-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.reco-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.reco-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.reco-bar-green { background: #10b981; }
.reco-bar-yellow { background: #f59e0b; }
.reco-bar-red { background: #ef4444; }

.reco-status-pills {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.reco-pill {
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.reco-pill-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.reco-pill-yellow { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.reco-pill-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Section titles */
.reco-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 1.5rem 0 1rem;
    color: var(--text-main);
}

.reco-section-title .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.4rem;
}

/* Recommendation columns (4-column kanban layout) */
.reco-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.reco-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reco-column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 3px solid var(--col-color, var(--primary));
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reco-column-icon .material-symbols-outlined {
    font-size: 1.2rem;
}

.reco-column-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    flex: 1;
}

.reco-column-count {
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 1.4rem;
    text-align: center;
}

.reco-column-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    flex: 1;
}

.reco-column-body.reco-column-collapsed {
    padding: 0;
    min-height: 0;
}

.reco-column-empty {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-style: italic;
}

.reco-column-body .reco-card {
    border-left: 3px solid transparent;
    padding: 0.85rem;
    border-radius: 0.75rem;
}

.reco-card-hidden {
    display: none !important;
}

.reco-column-actions {
    padding: 0.5rem 0.75rem 0.75rem;
    display: flex;
    gap: 0.4rem;
    flex-direction: column;
}

.reco-panel-expand-btn,
.reco-panel-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(159, 31, 239, 0.25);
    background: rgba(159, 31, 239, 0.08);
    color: var(--primary);
    width: 100%;
    justify-content: center;
}

.reco-panel-expand-btn:hover,
.reco-panel-collapse-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(159, 31, 239, 0.3);
}

.reco-panel-expand-btn .material-symbols-outlined,
.reco-panel-collapse-btn .material-symbols-outlined {
    font-size: 1rem;
}

/* Sub-tabs (Плохо / Хорошо) */
.reco-subtabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reco-subtab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.reco-subtab .material-symbols-outlined { font-size: 0.9rem; }

.reco-subtab:hover { color: var(--text-main); }

.reco-subtab-bad.active {
    color: #ef4444;
    border-bottom-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.reco-subtab-good.active {
    color: #10b981;
    border-bottom-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.reco-subtab-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.05rem 0.35rem;
    border-radius: 0.3rem;
    font-size: 0.65rem;
    min-width: 1.1rem;
    text-align: center;
}

.reco-device-filters {
    display: flex;
    gap: 0.3rem;
    padding: 0.4rem 0.6rem 0;
}

.reco-devfilter-btn {
    flex: 1;
    padding: 0.3rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.reco-devfilter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.reco-devfilter-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: #c084fc;
}

.reco-tab-content { display: block; }
.reco-tab-hidden { display: none !important; }

/* Tooltip for undefined leads */
.reco-undefined-hint {
    margin-left: auto;
    cursor: help;
    position: relative;
}

.reco-undefined-hint .material-symbols-outlined {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s;
}

.reco-undefined-hint:hover .material-symbols-outlined {
    color: #f59e0b;
}

/* Segment card styles */
.reco-seg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    gap: 0.4rem;
}

.reco-seg-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reco-seg-group {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
}

.reco-seg-metrics {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reco-seg-metric {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.reco-seg-metric-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reco-seg-metric-value {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-main);
}

.reco-seg-rec {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.4rem;
}

.reco-column-empty {
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: var(--text-dim);
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.reco-column-empty .material-symbols-outlined {
    font-size: 1.5rem;
    opacity: 0.4;
}

@media (max-width: 1100px) {
    .reco-columns { grid-template-columns: repeat(2, 1fr); }
}

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

/* Recommendation cards */
.reco-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.reco-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.25rem;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.reco-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.reco-card-critical { border-left-color: #ef4444; }
.reco-card-warning { border-left-color: #f59e0b; }
.reco-card-success {
    border-left-color: var(--primary);
    border-color: rgba(159, 31, 239, 0.2);
    box-shadow: 0 0 10px rgba(159, 31, 239, 0.1);
}
.reco-card-scale { border-left-color: #10b981; }

.reco-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.reco-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.reco-badge .material-symbols-outlined { font-size: 0.85rem; }

.reco-badge-critical { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.reco-badge-warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.reco-badge-success { background: rgba(159, 31, 239, 0.2); color: var(--primary); }
.reco-badge-scale { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.reco-badge-info { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

.reco-card-info {
    border-left-color: #3b82f6;
}

.reco-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}

.reco-card-cat .material-symbols-outlined {
    font-size: 0.85rem;
}

.reco-card-metric {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}

.reco-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.reco-card-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Campaign table */
.reco-table-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    overflow-x: auto;
}

.reco-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.reco-table thead tr {
    background: rgba(255, 255, 255, 0.05);
}

.reco-table th {
    padding: 0.85rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    white-space: nowrap;
}

.reco-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    white-space: nowrap;
}

.reco-table tr:hover { background: rgba(255, 255, 255, 0.02); }

.reco-camp-name {
    font-weight: 600;
    color: var(--text-main);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reco-camp-sub {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.reco-camp-reco {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 200px;
}

.reco-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.reco-dot-green { background: #10b981; }
.reco-dot-yellow { background: #f59e0b; }
.reco-dot-red { background: #ef4444; }
.reco-dot-gray { background: var(--text-dim); }

.reco-green { color: #10b981; font-weight: 600; }
.reco-yellow { color: #f59e0b; font-weight: 600; }
.reco-red { color: #ef4444; font-weight: 600; }

.reco-fact-vs { min-width: 110px; }

.reco-fact-nums {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.reco-target-num { color: var(--text-dim); }

.reco-bar-mini-wrap {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.reco-bar-mini {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .reco-page-header {
        flex-direction: column;
    }
    .reco-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .reco-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .reco-cards-grid {
        grid-template-columns: 1fr;
    }
    .reco-targets-dropdown {
        right: auto;
        left: 0;
        width: 280px;
    }
}

/* ===================================================================
   KPI CALCULATOR
   =================================================================== */

.reco-calc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 0.65rem;
    color: #10b981;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.reco-calc-btn:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.reco-calc-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Modal overlay */
.calc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: calcFadeIn 0.2s ease-out;
}

.calc-modal-overlay.hidden { display: none; }

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

/* Modal */
.calc-modal {
    background: rgba(18, 10, 30, 0.98);
    border: 1px solid rgba(159, 31, 239, 0.2);
    border-radius: 1.25rem;
    width: 780px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(159, 31, 239, 0.08);
    animation: calcSlideIn 0.25s ease-out;
}

@keyframes calcSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.calc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.calc-modal-header h3 .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.4rem;
}

.calc-modal-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.calc-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.4rem;
    transition: all 0.15s;
}

.calc-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Body: two columns */
.calc-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    padding: 1.5rem;
}

.calc-section-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.calc-section-label .material-symbols-outlined {
    font-size: 1rem;
    color: var(--primary);
}

/* Inputs */
.calc-input-group {
    margin-bottom: 0.85rem;
}

.calc-input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.calc-hint {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.65rem;
}

.calc-input-wrap {
    position: relative;
}

.calc-input-wrap input {
    width: 100%;
    background: rgba(27, 16, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.55rem;
    padding: 0.55rem 2.5rem 0.55rem 0.75rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.calc-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(159, 31, 239, 0.1);
}

.calc-input-suffix {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    pointer-events: none;
}

/* Result cards */
.calc-result-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.calc-result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.calc-result-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.calc-card-cpl { border-left-color: #3b82f6; }
.calc-card-qcpl { border-left-color: #f59e0b; }
.calc-card-cps { border-left-color: #10b981; }

.calc-result-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.calc-result-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.calc-result-count {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
}

/* Summary grid */
.calc-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.calc-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
}

.calc-summary-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 500;
}

.calc-summary-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.calc-val-green { color: #10b981; }
.calc-val-red { color: #ef4444; }

/* Profitability note */
.calc-profitability {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 2.2rem;
}

.calc-profitability .material-symbols-outlined {
    font-size: 1rem;
}

.calc-profit-ok {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.calc-profit-warn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Apply button */
.calc-apply-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-apply-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(159, 31, 239, 0.4);
    transform: translateY(-1px);
}

.calc-apply-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .calc-modal-body {
        grid-template-columns: 1fr;
    }
    .calc-modal {
        width: 95vw;
    }
}

/* ========================================
   TIME & DAY ANALYTICS — PREMIUM REDESIGN
   ======================================== */

/* Metric Switcher Cards */
.td-metric-switcher {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.td-metric-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(26,26,26,0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    text-align: left;
}
.td-metric-card:hover {
    background: rgba(40,40,40,0.6);
}
.td-metric-card.active {
    border-bottom-color: var(--primary);
    background: rgba(124,58,237,0.08);
}
.td-metric-icon {
    width: 2.25rem; height: 2.25rem;
    border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.td-metric-icon .material-symbols-outlined { font-size: 1.15rem; }
.td-metric-icon--violet { background: rgba(124,58,237,0.12); color: #c799ff; }
.td-metric-icon--cyan   { background: rgba(74,248,227,0.08); color: #4af8e3; }
.td-metric-icon--amber  { background: rgba(255,200,127,0.08); color: #ffc87f; }
.td-metric-icon--green  { background: rgba(52,211,153,0.08); color: #34d399; }
.td-metric-info { display: flex; flex-direction: column; }
.td-metric-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-family: 'Space Grotesk', sans-serif;
}
.td-metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

/* Bento Grid */
.td-bento-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Glass Panels */
.td-glass-panel {
    position: relative;
    background: rgba(26,26,26,0.45);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    overflow: hidden;
}
.td-panel-glow {
    position: absolute;
    width: 12rem; height: 12rem;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.td-panel-glow--violet {
    top: -4rem; right: -4rem;
    background: rgba(124,58,237,0.06);
}
.td-panel-glow--cyan {
    bottom: -4rem; left: -4rem;
    background: rgba(74,248,227,0.05);
}

/* Panel Header */
.td-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}
.td-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
}
.td-panel-title .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--primary);
}
.td-panel-weekly .td-panel-title .material-symbols-outlined {
    color: #4af8e3;
}
.td-panel-subtitle {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-top: 0.25rem;
    font-family: 'Space Grotesk', sans-serif;
}

/* Heatmap Legend */
.td-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.55rem;
    color: var(--text-dim);
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.td-legend-gradient {
    width: 4.5rem;
    height: 0.4rem;
    border-radius: 99px;
    background: linear-gradient(to right, rgba(88,28,135,0.4), #c799ff, #4af8e3);
}

/* Hourly Bars container */
.td-hourly-bars {
    position: relative;
    z-index: 1;
    min-height: 200px;
}
.td-hourly-bars canvas {
    width: 100% !important;
}

/* Insights Strip (below hourly chart) */
.td-insights-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}
.td-insight-item {
    text-align: center;
}
.td-insight-item--bordered {
    border-left: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.td-insight-label {
    display: block;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 0.3rem;
}
.td-insight-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}
.td-insight-value--primary { color: #c799ff; }
.td-insight-value--muted   { color: #a78bfa; }
.td-insight-value--cyan    { color: #4af8e3; }

/* Day-of-Week bars — custom HTML progress bars */
.td-day-bars {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    position: relative;
    z-index: 1;
    min-height: 200px;
}
.td-day-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.15rem 0;
    border-radius: 0.25rem;
    transition: background 0.2s;
}
.td-day-row:hover {
    background: rgba(255,255,255,0.03);
}
.td-day-row:hover .td-day-label { color: #fff; }
.td-day-label {
    width: 2rem;
    font-size: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
    color: rgba(255,255,255,0.35);
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}
.td-day-track {
    flex: 1;
    height: 0.55rem;
    background: rgba(255,255,255,0.04);
    border-radius: 99px;
    overflow: hidden;
}
.td-day-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease, background 0.3s;
}
.td-day-pct {
    width: 2.5rem;
    text-align: right;
    font-size: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    color: rgba(255,255,255,0.45);
}
.td-day-pct--peak {
    color: #ff6e84;
    font-weight: 700;
}
.td-day-pct--bold {
    color: #fff;
    font-weight: 700;
}

/* Growth Badge */
.td-growth-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 0.75rem;
    border: 1px solid rgba(72,72,71,0.15);
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}
.td-growth-accent {
    width: 3px;
    height: 2rem;
    border-radius: 99px;
    background: #ffc87f;
    flex-shrink: 0;
}
.td-growth-info { flex: 1; }
.td-growth-label {
    display: block;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    font-family: 'Space Grotesk', sans-serif;
}
.td-growth-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}
.td-growth-icon {
    color: #ffc87f;
    font-size: 1.2rem;
}

/* Bottom Insight Cards */
.td-bottom-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.td-bottom-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: rgba(26,26,26,0.45);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(72,72,71,0.15);
    border-radius: 1rem;
}
.td-bottom-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    margin: 0 0 0.2rem 0;
}
.td-bottom-desc {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin: 0;
}

/* Donut SVG */
.td-donut-wrap {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
}
.td-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.td-donut-bg { stroke: rgba(255,255,255,0.05); }
.td-donut-fill { stroke: var(--primary); transition: stroke-dashoffset 0.8s ease; }
.td-donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.td-bottom-icon-wrap {
    width: 3.5rem; height: 3.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

/* Responsive */
@media (max-width: 900px) {
    .td-metric-switcher { grid-template-columns: repeat(2, 1fr); }
    .td-bento-grid { grid-template-columns: 1fr; }
    .td-bottom-insights { grid-template-columns: 1fr; }
}

/* ============================================
   CAMPAIGN OPTIMIZATION
   ============================================ */

/* Header: title left, filter buttons right */
.campopt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Filter Buttons Group */
.campopt-filter-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.campopt-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 2rem;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.04);
    color: rgba(200,195,210,0.55);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    user-select: none;
}

.campopt-filter-btn .material-symbols-outlined {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.campopt-filter-btn:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.campopt-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(255,255,255,0.06);
    color: inherit;
    transition: all 0.25s;
}

/* Red: Необходимы корректировки */
.campopt-filter-btn--bad {
    border-color: rgba(239,68,68,0.15);
}
.campopt-filter-btn--bad:hover {
    border-color: rgba(239,68,68,0.3);
    color: #ef4444;
    background: rgba(239,68,68,0.06);
}
.campopt-filter-btn--bad.active {
    border-color: rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    box-shadow: 0 0 16px rgba(239,68,68,0.15), inset 0 0 12px rgba(239,68,68,0.05);
}
.campopt-filter-btn--bad.active .campopt-filter-count {
    background: rgba(239,68,68,0.25);
    color: #fff;
}

/* Yellow: Требуется внимание */
.campopt-filter-btn--warning {
    border-color: rgba(245,158,11,0.15);
}
.campopt-filter-btn--warning:hover {
    border-color: rgba(245,158,11,0.3);
    color: #f59e0b;
    background: rgba(245,158,11,0.06);
}
.campopt-filter-btn--warning.active {
    border-color: rgba(245,158,11,0.5);
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    box-shadow: 0 0 16px rgba(245,158,11,0.15), inset 0 0 12px rgba(245,158,11,0.05);
}
.campopt-filter-btn--warning.active .campopt-filter-count {
    background: rgba(245,158,11,0.25);
    color: #fff;
}

/* Green: Масштабируем */
.campopt-filter-btn--good {
    border-color: rgba(16,185,129,0.15);
}
.campopt-filter-btn--good:hover {
    border-color: rgba(16,185,129,0.3);
    color: #10b981;
    background: rgba(16,185,129,0.06);
}
.campopt-filter-btn--good.active {
    border-color: rgba(16,185,129,0.5);
    background: rgba(16,185,129,0.12);
    color: #10b981;
    box-shadow: 0 0 16px rgba(16,185,129,0.15), inset 0 0 12px rgba(16,185,129,0.05);
}
.campopt-filter-btn--good.active .campopt-filter-count {
    background: rgba(16,185,129,0.25);
    color: #fff;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .campopt-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .campopt-filter-btns {
        width: 100%;
    }
    .campopt-filter-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
    }
    .campopt-filter-label {
        display: none;
    }
}

.campopt-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: rgba(20,16,32,0.6);
    border: 1px solid rgba(139,92,246,0.1);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}
.campopt-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.campopt-summary-label {
    font-size: 0.68rem;
    color: rgba(200,195,210,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.campopt-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e8e4f0;
}
.campopt-status-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.campopt-pill {
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.68rem;
    font-weight: 600;
}
.campopt-pill-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.campopt-pill-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.campopt-pill-green { background: rgba(16,185,129,0.15); color: #10b981; }

.campopt-list { display: flex; flex-direction: column; gap: 0.5rem; }

.campopt-card {
    background: rgba(20,16,32,0.5);
    border: 1px solid rgba(139,92,246,0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.campopt-card:hover { border-color: rgba(139,92,246,0.2); }
.campopt-status-bad { border-left: 3px solid #ef4444; }
.campopt-status-warning { border-left: 3px solid #f59e0b; }
.campopt-status-good { border-left: 3px solid #10b981; }
.campopt-status-neutral { border-left: 3px solid rgba(139,92,246,0.2); }

.campopt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.campopt-card-header:hover { background: rgba(139,92,246,0.04); }

.campopt-card-left { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex-shrink: 1; }
.campopt-status-icon { font-size: 1.1rem; }
.campopt-status-bad .campopt-status-icon { color: #ef4444; }
.campopt-status-warning .campopt-status-icon { color: #f59e0b; }
.campopt-status-good .campopt-status-icon { color: #10b981; }
.campopt-status-neutral .campopt-status-icon { color: rgba(139,92,246,0.4); }

.campopt-card-info { display: flex; flex-direction: column; min-width: 0; }
.campopt-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e8e4f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.campopt-card-id { font-size: 0.62rem; color: rgba(200,195,210,0.35); }

.campopt-card-metrics {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}
.campopt-metric { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.campopt-metric-label { font-size: 0.6rem; color: rgba(200,195,210,0.4); text-transform: uppercase; }
.campopt-metric-value { font-size: 0.8rem; font-weight: 600; color: #e8e4f0; }
.campopt-expand-icon {
    font-size: 1.2rem;
    color: rgba(139,92,246,0.4);
    transition: transform 0.2s;
    margin-left: 0.5rem;
}

.campopt-card-detail { padding: 0 1rem 1rem; }
.campopt-card-detail.hidden { display: none; }

.campopt-tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0.2rem;
    background: rgba(15,12,25,0.5);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}
.campopt-tab {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: rgba(200,195,210,0.5);
    font-size: 0.7rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.campopt-tab .material-symbols-outlined { font-size: 0.85rem; }
.campopt-tab:hover { color: rgba(200,195,210,0.8); background: rgba(139,92,246,0.06); }
.campopt-tab.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(168,85,247,0.15));
    color: #c799ff;
}

.campopt-tab-content { min-height: 100px; }

.campopt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}
.campopt-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-weight: 600;
    color: rgba(200,195,210,0.5);
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(139,92,246,0.08);
}
.campopt-table td {
    padding: 0.45rem 0.6rem;
    color: #e8e4f0;
    border-bottom: 1px solid rgba(139,92,246,0.04);
}
.campopt-table tr:hover td { background: rgba(139,92,246,0.03); }
.campopt-segment-name { font-weight: 500; color: #c799ff; }
.campopt-table-scroll { overflow-x: auto; max-height: 400px; overflow-y: auto; }

.campopt-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.campopt-queries-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.campopt-audience-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.campopt-audience-block h4 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #c799ff;
    margin-bottom: 0.5rem;
}
.campopt-audience-block h4 .material-symbols-outlined { font-size: 1rem; }

.campopt-positions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.campopt-pos-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem;
    background: rgba(15,12,25,0.5);
    border: 1px solid rgba(139,92,246,0.08);
    border-radius: 0.6rem;
}
.campopt-pos-label {
    font-size: 0.65rem;
    color: rgba(200,195,210,0.5);
    text-transform: uppercase;
}
.campopt-pos-value { font-size: 1.5rem; font-weight: 700; color: #e8e4f0; }
