/* ─── UI/UX Pro Max Design System & Variables ──────────────────────────────── */
:root {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.9);
    --glass-shadow: rgba(15, 23, 42, 0.05);
    --card-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --card-hover-shadow: 0 12px 28px -4px rgba(14, 165, 233, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
    
    /* Branding & Accent Colors */
    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --accent-blue-light: #e0f2fe;
    --accent-purple: #7c3aed;
    --accent-purple-light: #ede9fe;
    --accent-green: #059669;
    --accent-green-light: #d1fae5;
    --accent-red: #dc2626;
    --accent-red-light: #fee2e2;
    --accent-amber: #d97706;
    --accent-amber-light: #fef3c7;
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Global Reset & Body Styles ────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, .logo-text h2, .kpi-value {
    font-family: var(--font-heading);
}

/* ─── Animated Ambient Background Glows ──────────────────────────────────────── */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
    animation: floatGlow 18s infinite alternate ease-in-out;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: #bae6fd;
}

.glow-2 {
    bottom: -15%;
    right: 5%;
    width: 45vw;
    height: 45vw;
    background: #c7d2fe;
    animation-delay: -5s;
}

.glow-3 {
    top: 35%;
    left: 25%;
    width: 35vw;
    height: 35vw;
    background: #99f6e4;
    animation-delay: -9s;
}

@keyframes floatGlow {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(50px) scale(1.08); }
}

/* ─── Glassmorphism Panels ────────────────────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 12px 36px var(--glass-shadow);
}

/* ─── Main Application Layout ─────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar Navigation ──────────────────────────────────────────────────── */
.sidebar {
    width: 280px;
    margin: 24px 0 24px 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

.logo-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    background: rgba(14, 165, 233, 0.05);
    border: 1px solid rgba(14, 165, 233, 0.12);
    transition: all 0.25s ease;
}

.nav-parent:hover, .nav-parent.active {
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-blue);
}

.arrow-toggle {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.nav-group.open .arrow-toggle {
    transform: rotate(0deg);
}

.nav-group:not(.open) .arrow-toggle {
    transform: rotate(-90deg);
}

.nav-group:not(.open) .nav-sub-menu {
    display: none;
}

.nav-sub-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    margin-top: 4px;
    border-left: 2px solid rgba(14, 165, 233, 0.2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.nav-parent-item {
    padding: 14px 18px;
    font-size: 0.98rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-item .icon {
    font-size: 1.1rem;
}

.nav-item:hover, .nav-item.active {
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-blue);
}

.nav-item.active {
    border-left: 3.5px solid var(--accent-blue);
    font-weight: 700;
}

/* Project Placeholder Cards */
.project-placeholder-body {
    padding: 32px 24px;
    text-align: center;
}

.project-banner {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px dashed rgba(14, 165, 233, 0.3);
    border-radius: 16px;
    padding: 40px 24px;
    max-width: 700px;
    margin: 0 auto;
}

.project-banner h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
}

.project-banner p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.sidebar-footer {
    margin-top: auto;
}

.print-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), #0284c7);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: all 0.2s ease;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

/* ─── Main Content Area ─────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.hamburger-btn {
    display: none; /* Hidden on Desktop */
}

.mobile-brand-tag {
    display: none; /* Hidden on Desktop */
}

.header-titles {
    flex: 1;
}

.header-titles h1,
.header-left h1 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.header-titles p,
.header-left p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.lang-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 3px;
}

.lang-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
}

/* ─── Filters Bar ───────────────────────────────────────────────────────── */
.filters-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    position: relative;
    z-index: 50;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

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

.select-wrapper::after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--text-secondary);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-55%);
    pointer-events: none;
}

.glass-select {
    width: 100%;
    appearance: none;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}

.glass-select:hover, .glass-select:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(14, 165, 233, 0.3);
}

.glass-select option {
    background: #ffffff;
    color: var(--text-primary);
}

/* ─── KPI Metrics (UI/UX Pro Max Architecture) ───────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    padding: 22px 24px;
    border-radius: 16px;
    border-left: 5px solid var(--accent-blue);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

.kpi-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.kpi-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.kpi-icon-pill.icon-blue {
    background: var(--accent-blue-light);
}

.kpi-icon-pill.icon-purple {
    background: var(--accent-purple-light);
}

.kpi-icon-pill.icon-green {
    background: var(--accent-green-light);
}

.kpi-card h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.3;
    margin: 0;
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.kpi-trend {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── Section Layouts ─────────────────────────────────────────────────────── */
.section-container {
    margin-bottom: 36px;
}

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

.section-title h2 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.section-title p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    padding: 24px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.chart-card:hover {
    box-shadow: var(--card-hover-shadow);
}

.massive-chart {
    min-height: 380px;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-title-tag {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title-tag::before {
    content: "";
    display: block;
    width: 3.5px;
    height: 15px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}

/* ─── Mobile Navigation & Drawer Base Styles ─────────────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

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

.mobile-sidebar-close {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    margin-top: -30px;
}

.mobile-nav-trigger {
    display: none;
    align-items: center;
    gap: 12px;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s;
}

.hamburger-btn:hover {
    background: #ffffff;
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.mobile-brand-tag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon.sm {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.mobile-brand-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.sidebar-user-card {
    display: none;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.sidebar-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-user-actions {
    display: flex;
    gap: 8px;
}

.sidebar-user-actions .user-action-btn {
    flex: 1;
    justify-content: center;
}



/* ─── Tabs & Toggle ───────────────────────────────────────────────────────── */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

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

.metric-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.toggle-group {
    display: inline-flex;
    padding: 5px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.toggle-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.toggle-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* ─── Data Actions Toolbar (Import & Export) ─────────────────────────────────── */
.data-actions-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
}

.import-action-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.import-action-btn:hover {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.export-action-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.3);
}

.export-action-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.dropdown-wrapper {
    position: relative;
}

.arrow-tiny {
    font-size: 0.65rem;
    margin-left: 2px;
    transition: transform 0.25s ease;
}

.dropdown-wrapper.open .arrow-tiny {
    transform: rotate(180deg);
}

.dropdown-menu-export {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

.dropdown-wrapper.open .dropdown-menu-export {
    display: flex;
    animation: fadeInDown 0.2s ease-out;
}

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

.dropdown-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 12px 4px 12px;
    letter-spacing: 0.5px;
}

.export-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.export-item:hover {
    background: rgba(14, 165, 233, 0.08);
}

.item-icon {
    font-size: 1.2rem;
}

.item-desc {
    display: flex;
    flex-direction: column;
}

.item-desc strong {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.item-desc span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropdown-sep {
    height: 1px;
    background: rgba(226, 232, 240, 0.8);
    margin: 4px 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--accent-blue);
}

.toast.success { border-left-color: var(--accent-green); }
.toast.error { border-left-color: var(--accent-red); }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── YoY Metrics ─────────────────────────────────────────────────────────── */
.yoy-val.positive {
    color: var(--accent-green);
}
.yoy-val.negative {
    color: var(--accent-red);
}
.yoy-val.neutral {
    color: var(--text-secondary);
}

/* ─── Data Table (UI/UX Pro Max Architecture) ────────────────────────────── */
.table-container {
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    max-height: 620px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table th, .data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.data-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 0.74rem;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.data-table th:nth-child(1),
.data-table th:nth-child(2),
.data-table th:nth-child(3),
.data-table th:nth-child(4) {
    text-align: left;
}

.data-table td:nth-child(1),
.data-table td:nth-child(2),
.data-table td:nth-child(3),
.data-table td:nth-child(4) {
    text-align: left;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(2, 132, 199, 0.05);
}

.data-table td.col-total {
    font-weight: 750;
    color: var(--accent-blue);
    background: rgba(2, 132, 199, 0.04);
}

.data-table td.col-model {
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Custom Multi-Select Dropdown ────────────────────────────────────────── */
.custom-multi-select {
    position: relative;
    width: 100%;
    min-width: 160px;
}

.custom-multi-select .select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-multi-select.open {
    z-index: 100;
}

.custom-multi-select.open .select-btn {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.6);
}

.custom-multi-select .select-btn .arrow-dwn {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.custom-multi-select.open .select-btn .arrow-dwn {
    transform: rotate(-180deg);
}

.custom-multi-select .list-items {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    display: none;
    z-index: 100;
    list-style: none;
}

.custom-multi-select.open .list-items {
    display: block;
    animation: fadeInDown 0.2s ease forwards;
}

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

.custom-multi-select .list-items .item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.custom-multi-select .list-items .item:hover {
    background: rgba(14, 165, 233, 0.05);
    color: var(--accent-blue);
}

.custom-multi-select .list-items .item.checked {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
}

.custom-multi-select .list-items .item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

/* ─── AI Chat Assistant ──────────────────────────────────────────────────── */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    font-size: 1.8rem;
    border: none;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-chat-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.6);
}

.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-chat-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--glass-border);
}

.user-message {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 16px;
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
}

.send-btn {
    padding: 0 18px;
    border-radius: 20px;
    border: none;
    background: var(--accent-purple);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #7c3aed;
}

.api-key-setup {
    padding: 15px;
    background: #fee2e2;
    border-bottom: 1px solid #fca5a5;
    font-size: 0.85rem;
    color: #991b1b;
}

.api-key-setup input {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    border: 1px solid #f87171;
    border-radius: 4px;
}
.api-key-setup button {
    background: #ef4444; color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer;
}

/* ─── Modal Styles ────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
    border-radius: 18px;
    width: 520px;
    max-width: 92vw;
    padding: 24px;
    color: #0f172a;
    transform: translateY(16px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    font-size: 1.4rem;
}

.modal-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
}

.modal-close-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.modal-instruction {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 18px;
    line-height: 1.5;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s;
    outline: none;
}

.modal-input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal-tips {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tip-item {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.modal-btn {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-btn.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.modal-btn.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-btn.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.modal-btn.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ─── User Profile & Auth Controls in Header ─────────────────────────────────── */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 9999px;
    padding: 4px 14px 4px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.user-role-tag {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    padding: 1px 5px;
    display: inline-block;
    width: fit-content;
}

.role-admin {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.role-guest {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.user-action-btn {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-action-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.user-action-btn.logout-btn {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}

.user-action-btn.logout-btn:hover {
    background: #ffe4e6;
    color: #be123c;
    border-color: #fda4af;
}

/* ─── Fullscreen Glassmorphism Auth Overlay ─────────────────────────────────── */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 440px;
    padding: 32px 28px;
    position: relative;
    animation: authCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

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

.auth-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-title-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.auth-title-text p {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

.auth-lang-selector {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.auth-lang-btn {
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.auth-lang-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Quick Select Account Pills */
.quick-acc-section {
    margin-bottom: 18px;
}

.quick-acc-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-acc-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-acc-btn {
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-acc-btn:hover, .quick-acc-btn.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.quick-acc-btn .pill-icon {
    font-size: 1.1rem;
}

.quick-acc-btn .pill-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.quick-acc-btn .pill-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.quick-acc-btn .pill-desc {
    font-size: 0.68rem;
    color: #64748b;
}

/* Auth Inputs */
.auth-input-group {
    margin-bottom: 16px;
}

.auth-input-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

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

.auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.92rem;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s;
    outline: none;
}

.auth-input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: #64748b;
}

/* Auth Error Alert */
.auth-error-banner {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

/* Login Button */
.auth-submit-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.auth-card-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Password Modal Status Alert */
.pwd-status-banner {
    display: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 14px;
}
.pwd-status-banner.success {
    display: block;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
}
.pwd-status-banner.error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

/* ─── News & Social Intelligence Module (ui-ux-pro-max) ───────────────────── */
.news-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.news-header-titles h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.news-header-titles p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.news-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-ai-briefing {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
}
.btn-ai-briefing:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-add-news {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
}
.btn-add-news:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.btn-crawler-now {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #ffffff;
}
.btn-crawler-now:hover {
    background: linear-gradient(135deg, #c2410c 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.btn-crawler-sources {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
}
.btn-crawler-sources:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* AI Daily Executive Briefing Card */
.news-digest-card {
    border-left: 5px solid #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.digest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.5);
}

.digest-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.digest-icon-pulse {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
    animation: aiPulse 2.5s infinite ease-in-out;
}

@keyframes aiPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 5px 16px rgba(168, 85, 247, 0.5); }
}

.digest-title-box h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 2px;
}

.digest-timestamp {
    font-size: 0.78rem;
    color: #6366f1;
    font-weight: 500;
}

.btn-refresh-digest {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4f46e5;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-refresh-digest:hover {
    background: #f5f3ff;
    border-color: #c7d2fe;
}
.btn-refresh-digest .refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
}
.btn-refresh-digest:hover .refresh-icon {
    transform: rotate(180deg);
}

.digest-card-body {
    padding: 20px 22px;
}

.digest-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    color: #6366f1;
    font-weight: 500;
    font-size: 14px;
}

.spinner-ai {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.digest-bullets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.digest-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 3px solid #818cf8;
}

.digest-bullet-tag {
    font-weight: 700;
    color: #4f46e5;
    background: #e0e7ff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    white-space: nowrap;
    margin-top: 1px;
}

/* News Filter Bar */
.news-filters-bar {
    padding: 18px 22px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

.filter-platform-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.platform-pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.platform-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}
.platform-pill.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.platform-pill.pill-press.active {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.platform-pill.pill-youtube.active {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}
.platform-pill.pill-tiktok.active {
    background: #09090b;
    border-color: #09090b;
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.platform-pill.pill-rednote.active {
    background: #e11d48;
    border-color: #e11d48;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

.news-filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.news-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-select-wrapper label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.news-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 13px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}
.news-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.news-search-wrapper {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.news-search-input {
    width: 100%;
    padding: 9px 36px 9px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}
.news-search-input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}
.btn-clear-search:hover {
    color: #475569;
}

/* News Stats Row */
.news-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.news-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-sort-select {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 12.5px;
    color: #334155;
    outline: none;
}

/* News Grid & Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}

.news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.08);
}

.news-thumb-wrapper {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #f1f5f9;
}

.news-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.news-card:hover .news-thumb-img {
    transform: scale(1.04);
}

.news-platform-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-press {
    background: #2563eb;
    color: #ffffff;
}
.badge-youtube {
    background: #ef4444;
    color: #ffffff;
}
.badge-tiktok {
    background: #09090b;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.badge-rednote {
    background: #e11d48;
    color: #ffffff;
}

.news-sentiment-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.sentiment-positive {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}
.sentiment-neutral {
    background: rgba(100, 116, 139, 0.9);
    color: #ffffff;
}
.sentiment-hot {
    background: rgba(245, 158, 11, 0.95);
    color: #ffffff;
}

.news-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.news-brand-tag {
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 6px;
}

.news-date {
    font-size: 11.5px;
    color: #94a3b8;
}

.news-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-ai-box {
    background: linear-gradient(135deg, rgba(245, 247, 255, 0.8) 0%, rgba(250, 245, 255, 0.8) 100%);
    border: 1px solid rgba(199, 210, 254, 0.6);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.news-ai-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.news-ai-summary {
    font-size: 12.5px;
    line-height: 1.55;
    color: #334155;
}

.news-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.news-source-author {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.btn-read-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-read-source:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.news-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-delete-news {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-delete-news:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.news-empty-state {
    padding: 48px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    margin-bottom: 30px;
}
.news-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.news-empty-state h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.news-empty-state p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
}
.news-btn-reset {
    padding: 8px 18px;
    border-radius: 8px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* ─── Responsive Styles (Tablets & Mobile) ────────────────────────────────── */
@media (max-width: 1024px) {
    .app-container {
        display: block;
        position: relative;
    }

    /* Off-canvas Sliding Drawer Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 84vw;
        height: 100vh;
        margin: 0;
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.18);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 20px 20px 0;
        background: rgba(255, 255, 255, 0.96);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-sidebar-close {
        display: block;
    }

    .sidebar-user-card {
        display: block;
    }

    /* Main Content Spacing */
    .main-content {
        padding: 18px 20px;
        max-width: 100%;
    }

    .header {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "hamburger right"
            "titles titles";
        row-gap: 12px;
        column-gap: 12px;
        align-items: center;
        margin-bottom: 20px;
    }

    .hamburger-btn {
        grid-area: hamburger;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 9px;
        border-radius: 12px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        box-shadow: 0 4px 12px var(--glass-shadow);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .hamburger-btn:active {
        transform: scale(0.95);
        background: rgba(14, 165, 233, 0.15);
    }

    .hamburger-btn span {
        display: block;
        width: 22px;
        height: 2.5px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.25s ease;
    }

    .header-right {
        grid-area: right;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
    }

    .header-titles {
        grid-area: titles;
        width: 100%;
    }

    .mobile-brand-tag {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
    }

    .mobile-brand-tag .logo-icon.sm {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .mobile-brand-title {
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--accent-blue);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .header-titles h1,
    .header-left h1 {
        font-size: 1.5rem;
        line-height: 1.25;
        margin-bottom: 4px;
    }

    .header-titles p,
    .header-left p {
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .filters-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: 18px;
    }

    .charts-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ─── Mobile Specific Styles (Phones <= 768px) ───────────────────────────── */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .main-content {
        padding: 12px 10px 60px 10px;
    }

    /* Mobile Header Layout */
    .header {
        row-gap: 10px;
        column-gap: 8px;
        margin-bottom: 14px;
    }

    .hamburger-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .hamburger-btn span {
        width: 20px;
        height: 2.5px;
    }

    .header-titles h1,
    .header-left h1 {
        font-size: 1.25rem;
        line-height: 1.25;
        margin-top: 2px;
    }

    .header-titles p,
    .header-left p {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    /* Compact Header User Badge */
    .user-profile-badge {
        padding: 3px 8px 3px 4px;
        gap: 6px;
    }

    .user-profile-badge .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .user-profile-badge .user-name {
        font-size: 0.75rem;
        max-width: 65px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-profile-badge .user-role-tag {
        display: none; /* Saved for drawer */
    }

    .user-profile-badge .user-action-btn {
        display: none; /* Full action buttons available in sidebar menu */
    }

    .lang-btn {
        padding: 5px 8px;
        font-size: 0.72rem;
    }

    /* Touch-Friendly Filters Bar */
    .filters-bar {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 12px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .filter-group label {
        font-size: 0.74rem;
    }

    .custom-multi-select .select-btn {
        min-height: 44px;
        padding: 0 12px;
        font-size: 0.85rem;
    }

    .custom-multi-select .list-items {
        max-height: 210px;
    }

    /* Metric & Action Toolbar */
    .metric-toggle-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
        width: 100%;
    }

    .toggle-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 4px;
        gap: 4px;
        box-sizing: border-box;
    }

    .toggle-btn {
        width: 100%;
        padding: 9px 2px;
        font-size: 0.76rem;
        font-weight: 700;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .data-actions-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .data-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .dropdown-menu-export {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 75vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
        z-index: 99999;
        padding: 16px;
    }

    /* KPI Cards Grid on Phones */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 14px;
    }

    .kpi-grid .kpi-card:nth-child(3) {
        grid-column: 1 / -1; /* Spans full width across bottom */
    }

    .kpi-card {
        padding: 12px 10px;
        border-radius: 12px;
        border-left-width: 3.5px;
    }

    .kpi-card-header {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 6px;
    }

    .kpi-icon-pill {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        font-size: 0.75rem;
    }

    .kpi-card h3 {
        font-size: 0.68rem;
        margin-bottom: 0;
        letter-spacing: 0.3px;
        line-height: 1.2;
    }

    .kpi-value {
        font-size: 1.35rem;
        margin-bottom: 2px;
    }

    .kpi-trend {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    /* Charts on Mobile */
    .chart-card {
        padding: 14px 10px;
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .chart-container {
        height: 240px;
        min-height: 210px;
        width: 100%;
        touch-action: pan-y;
    }

    .massive-chart {
        min-height: auto;
    }

    .section-title h2 {
        font-size: 1.15rem;
    }

    .section-title p {
        font-size: 0.78rem;
    }

    /* Detailed Model Table with Touch Swipe */
    .table-container {
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-height: 480px;
    }

    .data-table {
        min-width: 820px; /* Guarantees clean 12-month column alignment */
    }

    .data-table th, .data-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Modals & Login Card on Mobile */
    .auth-card {
        width: 100%;
        max-width: 350px;
        padding: 20px 16px;
        margin: 10px;
        border-radius: 16px;
    }

    .auth-title-text h2 {
        font-size: 1.1rem;
    }

    .auth-input {
        font-size: 16px; /* Prevents auto-zoom in iOS Safari */
        padding: 10px 12px;
    }

    .modal-content {
        width: 95%;
        max-width: 380px;
        padding: 18px 14px;
        margin: 8px;
        border-radius: 16px;
    }

    .modal-input {
        font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    }

    /* Floating AI Chat Button */
    .floating-chat-btn {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .chat-container {
        right: 10px;
        left: 10px;
        bottom: 70px;
        width: auto;
        max-width: none;
        height: 70vh;
    }

    /* News Responsive Mobile */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .news-header-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .news-header-actions .news-action-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
        min-height: 44px;
    }
    .filter-platform-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        margin-left: -6px;
        margin-right: -6px;
        padding-left: 6px;
        padding-right: 6px;
    }
    .platform-pill {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 6px 14px;
        font-size: 12.5px;
    }
    .news-filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .news-select-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    .news-select {
        flex: 1;
        min-height: 40px;
    }
    .news-search-wrapper {
        width: 100%;
        min-width: unset;
    }
    .news-search-input {
        min-height: 42px;
    }
    .news-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .news-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .news-source-author {
        max-width: none;
    }
    .news-card-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .btn-delete-news {
        flex: 1;
        justify-content: center;
        min-height: 42px;
    }
    .btn-read-source {
        flex: 2;
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }
    .digest-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .btn-refresh-digest {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }
}

/* ─── Extra Small Mobile Screens (<= 380px) ──────────────────────────────── */
@media (max-width: 380px) {
    .header-left h1 {
        font-size: 1.15rem;
    }

    .kpi-value {
        font-size: 1.2rem;
    }

    .quick-acc-pills {
        grid-template-columns: 1fr;
    }
}

/* ─── Print & PDF Styles ─────────────────────────────────────────────────── */
@media print {
    @page {
        size: landscape;
        margin: 12mm 10mm;
    }

    body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 10pt;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .background-elements, 
    .sidebar, 
    .filters-bar, 
    .data-actions-toolbar, 
    .metric-unit-selector, 
    .lang-selector, 
    .table-controls, 
    .table-pagination, 
    #chat-bubble, 
    .chat-window-container, 
    #toast-container,
    .dropdown-wrapper,
    .btn-icon,
    .arrow-tiny {
        display: none !important;
    }
    
    .app-container {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Print only active tab */
    .tab-content:not(.active) {
        display: none !important;
    }
    
    .section-title {
        border-bottom: 2px solid #0f172a;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }

    .section-title h2 {
        color: #0f172a !important;
        font-size: 16pt !important;
    }

    .section-title p {
        color: #475569 !important;
        font-size: 10pt !important;
    }

    .kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .kpi-card {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-left: 4px solid #2563eb !important;
        border-radius: 6px !important;
        padding: 12px !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .kpi-value {
        color: #0f172a !important;
        font-size: 18pt !important;
        font-weight: 700 !important;
    }

    .kpi-card h3 {
        color: #64748b !important;
        font-size: 9pt !important;
        text-transform: uppercase;
    }

    .kpi-trend {
        font-size: 8.5pt !important;
    }
    
    .charts-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .chart-card {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        padding: 14px !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .chart-card h3, .chart-title-tag {
        color: #0f172a !important;
    }
    
    .chart-container {
        height: 250px !important;
        max-height: 250px !important;
    }

    .table-container {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        page-break-inside: auto;
    }

    .customs-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 8.5pt !important;
    }

    .customs-table th {
        background: #1e293b !important;
        color: #ffffff !important;
        border: 1px solid #0f172a !important;
        padding: 6px 8px !important;
    }

    .customs-table td {
        border: 1px solid #e2e8f0 !important;
        color: #1e293b !important;
        padding: 5px 8px !important;
    }

    .customs-table tr:nth-child(even) td {
        background: #f8fafc !important;
    }
}

/* Crawler Sources Table & Management Modal */
.crawler-sources-table th,
.crawler-sources-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    vertical-align: middle;
}

.crawler-sources-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.crawler-source-name {
    font-weight: 600;
    color: var(--text-color, #1e293b);
    display: flex;
    align-items: center;
    gap: 6px;
}

.crawler-source-url {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    color: #4f46e5;
    text-decoration: none;
    font-size: 11.5px;
}
.crawler-source-url:hover {
    text-decoration: underline;
}

.crawler-badge-enabled {
    background: #dcfce7;
    color: #166534;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.crawler-badge-disabled {
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-delete-crawler-source {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-delete-crawler-source:hover {
    background: #fca5a5;
}

@media (max-width: 768px) {
    .news-header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .news-action-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 12px;
    }
    .btn-crawler-instant {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }
}


