/* ===================================
   InsightFlow - Dark Theme Dashboard
   Professional Case Study Design
   Enhanced UI/UX Edition
   =================================== */

:root {
    /* Dark Theme Colors */
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --bg-sidebar: #0d1117;
    --bg-input: #21262d;

    --border-color: #30363d;
    --border-light: #21262d;

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    /* Accent Colors */
    --accent-blue: #58a6ff;
    --accent-purple: #a371f7;
    --accent-green: #3fb950;
    --accent-orange: #f0883e;
    --accent-red: #f85149;
    --accent-yellow: #d29922;

    /* Layer Colors */
    --bronze: #cd7f32;
    --silver: #a8a8a8;
    --gold: #fbbf24;

    /* Table Header Colors */
    --header-blue: #2563eb;
    --header-green: #16a34a;
    --header-gold: #ca8a04;
    --header-orange: #ea580c;

    /* Enhanced Shadows */
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.15);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.05);

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    --gradient-green: linear-gradient(135deg, #3fb950 0%, #58a6ff 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f0883e 100%);

    --sidebar-width: 240px;
    --topbar-height: 56px;

    /* Animation Timings */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

code,
pre,
textarea,
.sql-code,
.fp-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===================================
   App Container
   =================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===================================
   Sidebar - PREMIUM STYLING
   =================================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg,
            rgba(13, 17, 23, 0.98) 0%,
            rgba(8, 11, 16, 1) 100%);
    border-right: 1px solid rgba(48, 54, 61, 0.6);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(88, 166, 255, 0.2) 0%,
            rgba(88, 166, 255, 0.05) 50%,
            transparent 100%);
    pointer-events: none;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.6), transparent);
    backdrop-filter: blur(12px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: default;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow:
        0 4px 20px rgba(88, 166, 255, 0.4),
        0 0 30px rgba(163, 113, 247, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {

    0%,
    100% {
        box-shadow:
            0 4px 20px rgba(88, 166, 255, 0.4),
            0 0 30px rgba(163, 113, 247, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }

    50% {
        box-shadow:
            0 6px 28px rgba(88, 166, 255, 0.6),
            0 0 45px rgba(163, 113, 247, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    }
}

.logo:hover .logo-icon {
    box-shadow:
        0 8px 35px rgba(88, 166, 255, 0.7),
        0 0 50px rgba(163, 113, 247, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform: scale(1.08) rotate(-3deg);
    animation: none;
}

.logo-text {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff, #58a6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.3));
    transition: filter 0.4s ease;
}

.logo:hover .logo-text {
    filter: drop-shadow(0 0 15px rgba(88, 166, 255, 0.5));
}

/* Navigation - Enhanced */
.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 28px;
}

.nav-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0 14px;
    margin-bottom: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.08), transparent);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.05));
    color: var(--accent-blue);
    box-shadow:
        0 0 24px rgba(88, 166, 255, 0.1),
        0 0 0 1px rgba(88, 166, 255, 0.15) inset;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item.active i {
    filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.5));
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item .count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(88, 166, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

/* Layer Dots */
.layer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.layer-dot.bronze {
    background: var(--bronze);
}

.layer-dot.silver {
    background: var(--silver);
}

.layer-dot.gold {
    background: var(--gold);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}

.github-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar - PREMIUM STYLING */
.top-bar {
    height: var(--topbar-height);
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.98), rgba(13, 17, 23, 0.95));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.top-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(88, 166, 255, 0.3) 50%,
            transparent 100%);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.breadcrumb i {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.breadcrumb:hover i {
    transform: translateX(3px);
    color: var(--accent-blue);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input {
    width: 260px;
    padding: 10px 14px 10px 40px;
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.8), rgba(22, 27, 34, 0.9));
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 3px rgba(88, 166, 255, 0.15),
        0 4px 16px rgba(88, 166, 255, 0.1);
    width: 300px;
    background: linear-gradient(135deg, rgba(40, 45, 55, 0.9), rgba(28, 33, 40, 0.95));
}

.search-box input:focus+i,
.search-box:focus-within i {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 4px rgba(88, 166, 255, 0.4));
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 38, 45, 0.5);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.icon-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    color: var(--accent-blue);
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.15);
}

.notification .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    animation: pulse-red 2s infinite;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(248, 81, 73, 0.6);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(163, 113, 247, 0.3);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(163, 113, 247, 0.5);
}

/* ===================================
   Page Container
   =================================== */
.page-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.page {
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header - PREMIUM STYLING */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #e6edf3 0%, #c9d1d9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.page-actions {
    display: flex;
    gap: 14px;
}

/* Buttons - PREMIUM STYLING */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::after {
    width: 250px;
    height: 250px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #4c9aff);
    color: white;
    box-shadow:
        0 4px 16px rgba(88, 166, 255, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4c9aff, var(--accent-blue));
    transform: translateY(-3px);
    box-shadow:
        0 8px 28px rgba(88, 166, 255, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.9), rgba(22, 27, 34, 0.95));
    color: var(--text-primary);
    border: 1px solid rgba(48, 54, 61, 0.8);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(40, 45, 55, 0.95), rgba(28, 33, 40, 0.98));
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #56d364);
    color: white;
    box-shadow: 0 4px 16px rgba(63, 185, 80, 0.35);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(63, 185, 80, 0.45);
}

.btn-success:hover {
    background: #46c969;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* ===================================
   Stats Grid
/* Stats Grid - Enhanced */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 26px;
    display: flex;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translateY(-50%);
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.25);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:nth-child(2)::before {
    background: var(--gradient-green);
}

.stat-card:nth-child(2)::after {
    background: radial-gradient(circle, rgba(63, 185, 80, 0.08) 0%, transparent 70%);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(135deg, #a371f7 0%, #58a6ff 100%);
}

.stat-card:nth-child(3)::after {
    background: radial-gradient(circle, rgba(163, 113, 247, 0.08) 0%, transparent 70%);
}

.stat-card:nth-child(4)::before {
    background: var(--gradient-gold);
}

.stat-card:nth-child(4)::after {
    background: radial-gradient(circle, rgba(240, 136, 62, 0.08) 0%, transparent 70%);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-blue);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.2);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.2), rgba(163, 113, 247, 0.1));
    color: var(--accent-purple);
    box-shadow: 0 4px 16px rgba(163, 113, 247, 0.2);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2), rgba(63, 185, 80, 0.1));
    color: var(--accent-green);
    box-shadow: 0 4px 16px rgba(63, 185, 80, 0.2);
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.2), rgba(240, 136, 62, 0.1));
    color: var(--accent-orange);
    box-shadow: 0 4px 16px rgba(240, 136, 62, 0.2);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-unit {
    font-size: 20px;
    font-weight: 500;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.stat-change {
    font-size: 12px;
    margin-top: 8px;
}

.stat-change.positive {
    color: var(--accent-green);
}

.stat-change i {
    margin-right: 4px;
}

/* ===================================
   Two Column Layout
   =================================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Cards - Enhanced */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.card:hover {
    border-color: rgba(88, 166, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), 0 8px 32px rgba(0, 0, 0, 0.2);
}

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

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--accent-blue);
    transition: transform var(--transition-normal);
}

.card:hover .card-header h3 i {
    transform: scale(1.1);
}

.badge-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(63, 185, 80, 0);
    }
}

.link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.link:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.5);
}

/* ===================================
   Architecture Flow
   =================================== */
.architecture-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 24px;
    gap: 8px;
}

.source-systems {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.source-box i {
    color: var(--text-secondary);
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.flow-arrow span {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.arrow-line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    position: relative;
}

.arrow-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    border: 5px solid transparent;
    border-left-color: var(--border-color);
}

.layer-box {
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.layer-box:hover {
    transform: scale(1.05);
}

.bronze-box {
    background: rgba(205, 127, 50, 0.15);
    border: 1px solid var(--bronze);
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.1);
}

.bronze-box:hover {
    box-shadow: 0 8px 32px rgba(205, 127, 50, 0.25);
    border-color: rgba(205, 127, 50, 0.8);
}

.silver-box {
    background: rgba(168, 168, 168, 0.15);
    border: 1px solid var(--silver);
    box-shadow: 0 4px 16px rgba(168, 168, 168, 0.1);
}

.silver-box:hover {
    box-shadow: 0 8px 32px rgba(168, 168, 168, 0.25);
    border-color: rgba(168, 168, 168, 0.8);
}

.gold-box {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid var(--gold);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.1);
}

.gold-box:hover {
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.8);
}

.layer-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: transform var(--transition-normal);
}

.layer-box:hover .layer-icon {
    transform: rotate(10deg) scale(1.1);
}

.bronze-box .layer-icon {
    background: var(--bronze);
    color: white;
}

.silver-box .layer-icon {
    background: var(--silver);
    color: var(--bg-dark);
}

.gold-box .layer-icon {
    background: var(--gold);
    color: var(--bg-dark);
}

.layer-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.layer-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.layer-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===================================
   Quality Content
   =================================== */
.quality-content {
    display: flex;
    gap: 32px;
    padding: 24px;
}

.quality-chart {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-progress {
    transform: rotate(-90deg);
}

.circular-progress .bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.circular-progress .progress {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 8;
    stroke-linecap: round;
}

.quality-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.quality-value span {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-green);
}

.quality-value small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.quality-checks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.check-item.passed i {
    color: var(--accent-green);
}

.check-item.warning i {
    color: var(--accent-orange);
}

/* ===================================
   Activity List
   =================================== */
.activity-list {
    padding: 8px 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    transition: background 0.15s;
}

.activity-item:hover {
    background: var(--bg-card-hover);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.activity-icon.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

.activity-duration {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* ===================================
   Tables List
   =================================== */
.tab-pills {
    display: flex;
    gap: 4px;
}

.pill {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.pill:hover {
    background: var(--bg-input);
}

.pill.active {
    background: var(--accent-blue);
    color: white;
}

.tables-list {
    padding: 8px 0;
}

.table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    transition: background 0.15s;
}

.table-row:hover {
    background: var(--bg-card-hover);
}

.table-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

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

.table-info div {
    display: flex;
    flex-direction: column;
}

.table-name {
    font-size: 14px;
    font-weight: 500;
}

.table-source {
    font-size: 12px;
    color: var(--text-muted);
}

.table-rows,
.table-size {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 100px;
}

/* ===================================
   ERD Section (Pipeline Page)
   =================================== */
.pipeline-layers {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.layer-section {
    flex-shrink: 0;
}

.layer-section.gold-layer {
    flex: 1;
}

.layer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.layer-header.bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #cd7f32;
}

.layer-header.silver {
    background: rgba(192, 192, 192, 0.15);
    color: #c0c0c0;
}

.layer-header.gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.layer-count {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.8;
}

.layer-tables {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-table {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}

.mini-table-name {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.mini-table-rows {
    color: var(--text-muted);
    font-size: 11px;
}

.layer-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    font-size: 18px;
    margin-top: 60px;
}

.gold-tables-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.erd-section {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.erd-table {
    width: 220px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.erd-table-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
}

.erd-table-header.blue {
    background: var(--header-blue);
    color: white;
}

.erd-table-header.gold {
    background: var(--header-gold);
    color: white;
}

.erd-table-header.green {
    background: var(--header-green);
    color: white;
}

.erd-table-header.orange {
    background: var(--header-orange);
    color: white;
}

.erd-table-body {
    padding: 8px 0;
}

.column-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
}

.column-row:hover {
    background: var(--bg-card);
}

.col-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-name i.fa-key {
    color: var(--gold);
    font-size: 11px;
}

.col-name i.fa-link {
    color: var(--accent-purple);
    font-size: 11px;
}

.col-type {
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===================================
   SQL Playground Section
   =================================== */
.sql-playground {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.playground-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.playground-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playground-header h3 i {
    color: var(--text-secondary);
}

.query-tabs {
    display: flex;
    gap: 8px;
}

.query-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.query-tab:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.query-tab.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.playground-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.sql-editor-panel {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sql-editor {
    flex: 1;
    padding: 16px;
    background: var(--bg-dark);
    min-height: 200px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.editor-header span {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.editor-actions .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.sql-code {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

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

.sql-code .keyword {
    color: var(--accent-blue);
    font-weight: 500;
}

.sql-code .function {
    color: var(--accent-purple);
}

.sql-code .number {
    color: var(--accent-orange);
}

.sql-code .string {
    color: var(--accent-green);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.execute-btn {
    padding: 10px 20px;
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
}

.results-table-wrapper {
    overflow: auto;
    max-height: 350px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.results-header span {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    transition: background var(--transition-fast);
}

.results-table th:hover {
    background: var(--bg-card);
    color: var(--accent-blue);
}

.results-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.results-table tbody tr {
    transition: all var(--transition-fast);
}

.results-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.08);
    transform: scale(1.002);
}

.results-table tbody tr:hover td {
    color: var(--text-primary);
}

/* Alternating row colors */
.results-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.results-table tbody tr:nth-child(even):hover {
    background: rgba(88, 166, 255, 0.08);
}

/* ===================================
   Data Model Page
   =================================== */
.datamodel-layout {
    display: flex;
    height: calc(100vh - var(--topbar-height) - 48px);
    margin: -24px;
}

.dm-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.dm-search {
    padding: 12px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.dm-search i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
}

.dm-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

.dm-search .shortcut {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
}

.dm-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.tree-section {
    margin-bottom: 4px;
}

.tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
}

.tree-header:hover {
    background: var(--bg-card);
}

.tree-header i:first-child {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.tree-section:not(.expanded) .tree-header i:first-child {
    transform: rotate(-90deg);
}

.tree-body {
    display: none;
    padding-left: 16px;
}

.tree-section.expanded .tree-body {
    display: block;
}

.tree-group {
    margin-bottom: 4px;
}

.tree-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
}

.tree-group-header:hover {
    background: var(--bg-card);
}

.tree-group-header .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 1px 6px;
    border-radius: 8px;
}

.tree-items {
    display: none;
    padding-left: 16px;
}

.tree-group.expanded .tree-items {
    display: block;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
}

.tree-item:hover {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.tree-item.active {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-blue);
}

.tree-item i {
    font-size: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.bronze {
    background: var(--bronze);
}

.dot.silver {
    background: var(--silver);
}

.dot.gold {
    background: var(--gold);
}

/* DM Main */
.dm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dm-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.dm-path {
    font-size: 14px;
    color: var(--text-secondary);
}

.dm-path span {
    color: var(--text-primary);
}

.dm-tabs {
    display: flex;
    gap: 4px;
    margin-left: 20px;
}

.dm-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.dm-tab:hover {
    background: var(--bg-input);
}

.dm-tab.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.dm-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.dm-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.zoom {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
}

.tool-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
}

.tool-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.dm-canvas {
    flex: 1;
    background: var(--bg-dark);
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: auto;
    padding: 20px;
}

.dm-table {
    position: absolute;
    width: 260px;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.dm-table.blue .dm-table-header {
    background: var(--header-blue);
}

.dm-table.green .dm-table-header {
    background: var(--header-green);
}

.dm-table.orange .dm-table-header {
    background: var(--header-orange);
}

.dm-table-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.dm-table-header button {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.dm-table-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.dm-table-tabs span {
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
}

.dm-table-tabs span.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.dm-table-body {
    padding: 8px 0;
    max-height: 260px;
    overflow-y: auto;
}

.dm-table-body .row {
    display: flex;
    justify-content: space-between;
    padding: 6px 16px;
    font-size: 13px;
}

.dm-table-body .row:hover {
    background: var(--bg-card-hover);
}

.dm-table-body .row span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dm-table-body .row span:first-child i {
    font-size: 11px;
}

.dm-table-body .row span:first-child i.fa-key {
    color: var(--gold);
}

.dm-table-body .row span:first-child i.fa-link {
    color: var(--accent-purple);
}

.dm-table-body .row span:last-child {
    color: var(--text-muted);
    font-size: 12px;
}

.dm-table-footer {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

/* DM Console */
.dm-console {
    display: flex;
    height: 220px;
    border-top: 1px solid var(--border-color);
}

/* Split Layout for Data Model */
.dm-content-split {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.dm-erd-half {
    width: 50%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.dm-erd-half .dm-toolbar {
    border-bottom: 1px solid var(--border-color);
}

.dm-erd-half .dm-canvas {
    flex: 1;
    overflow: auto;
    position: relative;
}

.dm-sql-half {
    width: 50%;
    display: flex;
    flex-direction: column;
}

.dm-console-full {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.console-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.console-top .console-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.console-top .console-code {
    flex: 1;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg-dark);
    overflow: auto;
    color: var(--text-primary);
    margin: 0;
}

.console-bottom {
    height: 200px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
}

.console-table-wrapper {
    flex: 1;
    overflow: auto;
}

.console-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.console-header {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.console-code {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg-dark);
    overflow: auto;
    color: var(--text-primary);
}

.console-code .kw {
    color: var(--accent-blue);
}

.console-code .fn {
    color: var(--accent-purple);
}

.console-code .str {
    color: var(--accent-green);
}

.console-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.console-footer .shortcut {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
}

.console-footer .status {
    margin-left: auto;
    font-size: 12px;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.console-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.console-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.console-tabs span {
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
}

.console-tabs span.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.console-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.console-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.console-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
}

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

/* ===================================
   Full SQL Playground Page
   =================================== */
.full-playground {
    height: calc(100vh - var(--topbar-height) - 48px);
    margin: -24px;
    display: flex;
    flex-direction: column;
}

.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.fp-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fp-header h2 i {
    color: var(--text-secondary);
}

.fp-tabs {
    display: flex;
    gap: 4px;
}

.fp-tab {
    padding: 8px 16px;
    background: var(--bg-input);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.fp-tab.active {
    background: var(--accent-blue);
    color: white;
}

.fp-tab-add {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

.fp-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.fp-editor {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.fp-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.fp-editor-header span {
    font-size: 13px;
    color: var(--text-secondary);
}

.fp-editor-actions {
    display: flex;
    gap: 8px;
}

.fp-editor-actions button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
}

.fp-editor-actions button:hover {
    color: var(--text-primary);
}

.fp-textarea {
    flex: 1;
    padding: 20px;
    background: var(--bg-dark);
    border: none;
    resize: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.fp-textarea:focus {
    outline: none;
}

.fp-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.fp-info {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.fp-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fp-results {
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}

.fp-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.fp-results-header>span {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-results-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.fp-results-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.fp-results-actions button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
}

.fp-results-table {
    flex: 1;
    overflow: auto;
}

.fp-results-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fp-results-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
}

.fp-results-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
}

.fp-results-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .playground-content {
        grid-template-columns: 1fr;
    }

    .sql-editor-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .logo-text,
    .sidebar .nav-item span,
    .sidebar .nav-label,
    .sidebar .github-btn span {
        display: none;
    }

    .main-content {
        margin-left: 60px;
    }

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

    .top-bar {
        padding: 0 16px;
    }

    .search-box {
        display: none;
    }
}

/* ===================================
   Data Quality Page
   =================================== */
.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px;
}

.quality-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.quality-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quality-card-header h4 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-card-header h4 i {
    color: var(--accent-blue);
}

.quality-card-body {
    padding: 20px;
}

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

.qs {
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.qs .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.qs .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.qs.success .value {
    color: var(--accent-green);
}

.qs.warning .value {
    color: var(--accent-orange);
}

.qs.error .value {
    color: var(--accent-red);
}

/* ===================================
   ETL Logs Page
   =================================== */
.logs-container {
    padding: 24px;
    max-width: 1200px;
}

.log-entry {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.log-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    min-width: 140px;
}

.log-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 70px;
    text-align: center;
}

.log-badge.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.log-badge.info {
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
}

.log-badge.warning {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-orange);
}

.log-badge.error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.log-content {
    flex: 1;
}

.log-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.log-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.log-duration {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ===================================
   Silver Layer Transforms
   =================================== */
.transform-list {
    padding: 16px 20px;
}

.transform-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.transform-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
    flex-shrink: 0;
}

.transform-icon.bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #cd7f32;
}

.transform-icon.silver {
    background: rgba(192, 192, 192, 0.15);
    color: #c0c0c0;
}

.transform-icon.gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.transform-content {
    flex: 1;
}

.transform-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transform-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.badge-info {
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #cd7f32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-silver {
    background: rgba(192, 192, 192, 0.15);
    color: #c0c0c0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Tree item active state */
.tree-item.active {
    background: rgba(56, 139, 253, 0.15);
    border-radius: 4px;
}

.tree-item.active span {
    color: var(--accent-blue);
}

/* ===================================
   Tech Stack & Features (Overview)
   =================================== */
.tech-stack-list {
    padding: 16px 20px;
}

.tech-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    border-radius: 8px;
    margin: 0 -12px;
    transition: all var(--transition-normal);
}

.tech-item:hover {
    background: rgba(88, 166, 255, 0.05);
    transform: translateX(8px);
    border-color: transparent;
}

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

.tech-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.tech-item:hover .tech-icon {
    transform: scale(1.1) rotate(5deg);
}

.tech-icon.postgres {
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
}

.tech-icon.sql {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.tech-icon.git {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.tech-icon.draw {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.tech-content {
    flex: 1;
}

.tech-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    transition: color var(--transition-fast);
}

.tech-item:hover .tech-name {
    color: var(--accent-blue);
}

.tech-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.features-list {
    padding: 16px 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    border-radius: 8px;
    margin: 0 -12px;
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: rgba(63, 185, 80, 0.05);
    transform: translateX(4px);
}

.feature-item i {
    color: var(--accent-green);
    font-size: 14px;
    transition: transform var(--transition-normal);
}

.feature-item:hover i {
    transform: scale(1.3);
}

/* ===================================
   Test Section (Data Quality)
   =================================== */
.tests-section {
    margin-top: 24px;
}

.test-list {
    padding: 12px 20px;
}

.test-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

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

.test-item.passed i {
    color: var(--accent-green);
    font-size: 16px;
    margin-top: 2px;
}

.test-content {
    flex: 1;
}

.test-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.test-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Neutral stat change */
.stat-change.neutral {
    color: var(--text-secondary);
}

/* ===================================
   Pipeline Summary (Overview)
   =================================== */
.pipeline-summary {
    padding: 20px;
}

.pipeline-flow-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 20px;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.flow-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.flow-icon.bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
}

.flow-icon.silver {
    background: rgba(192, 192, 192, 0.2);
    color: #e0e0e0;
}

.flow-icon.gold {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.flow-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.flow-value {
    font-size: 11px;
    color: var(--text-muted);
}

.flow-connector {
    color: var(--text-muted);
    font-size: 14px;
}

.pipeline-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-input);
    border-radius: 10px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
    font-size: 16px;
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===================================
   Notification Toast
   =================================== */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-toast.success {
    border-color: var(--accent-green);
}

.notification-toast.success i {
    color: var(--accent-green);
}

.notification-toast i {
    font-size: 20px;
}

.notification-toast span {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===================================
   ETL Methods Diagram Section
   =================================== */
.etl-methods-card {
    margin-top: 24px;
}

.etl-methods-content {
    padding: 20px;
}

.etl-diagram-container {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.etl-diagram-container.dark-diagram {
    background: #0d0d0d;
}

.etl-diagram-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.etl-methods-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.legend-section {
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.legend-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-section.extraction h4 {
    color: #7cc576;
}

.legend-section.extraction {
    border-left: 3px solid #7cc576;
}

.legend-section.transformation h4 {
    color: #e07b53;
}

.legend-section.transformation {
    border-left: 3px solid #e07b53;
}

.legend-section.loading h4 {
    color: #6b9bd1;
}

.legend-section.loading {
    border-left: 3px solid #6b9bd1;
}

.legend-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legend-section ul li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.legend-section ul li:last-child {
    border-bottom: none;
}

.legend-section ul li strong {
    color: var(--text-primary);
}

.badge-info {
    background: rgba(56, 139, 253, 0.15);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

/* ===================================
   Enhanced Animations & Effects
   =================================== */

/* Page fade-in animation */
.page {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animations */
@keyframes pulse-red {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(248, 81, 73, 0);
    }
}

/* Glow effects for important elements */
.logo-icon {
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(163, 113, 247, 0.4);
    }
}

/* Stat cards enhancement */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

/* Tech stack items enhancement */
.tech-item {
    transition: all var(--transition-normal);
    border-radius: 8px;
    padding: 12px;
    margin: -12px;
    margin-bottom: 4px;
}

.tech-item:hover {
    background: rgba(88, 166, 255, 0.05);
    transform: translateX(8px);
}

/* Feature list items */
.feature-item {
    transition: all var(--transition-normal);
}

.feature-item:hover {
    transform: translateX(4px);
}

.feature-item i {
    transition: transform var(--transition-normal);
}

.feature-item:hover i {
    transform: scale(1.2);
}

/* Quality cards */
.quality-card {
    transition: all var(--transition-normal);
}

.quality-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Data Model tables */
.dm-table {
    transition: all var(--transition-normal);
}

.dm-table:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* ERD relationship lines glow */
.dm-canvas {
    position: relative;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
.nav-item,
.tree-item,
.layer-item {
    transition: all var(--transition-normal);
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(88, 166, 255, 0.3);
    color: var(--text-primary);
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            var(--bg-card-hover) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Floating animation for icons */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Connection line animation */
.arrow-container i {
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Tooltip enhancement */
[title] {
    position: relative;
}

/* ===================================
   Analytics Dashboard Styles
   =================================== */

/* Analytics KPI Grid */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1400px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.analytics-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.analytics-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.analytics-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(88, 166, 255, 0.3);
}

.analytics-kpi-card:hover::before {
    transform: scaleX(1);
}

/* KPI Icon Colors */
.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all var(--transition-normal);
}

.analytics-kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(5deg);
}

.kpi-icon.sales {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.2), rgba(63, 185, 80, 0.1));
    color: var(--accent-green);
}

.analytics-kpi-card:nth-child(1)::before {
    background: linear-gradient(90deg, var(--accent-green), #58a6ff);
}

.kpi-icon.orders {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.2), rgba(163, 113, 247, 0.1));
    color: var(--accent-purple);
}

.analytics-kpi-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--accent-purple), #58a6ff);
}

.kpi-icon.customers {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-blue);
}

.analytics-kpi-card:nth-child(3)::before {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

.kpi-icon.products {
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.2), rgba(240, 136, 62, 0.1));
    color: var(--accent-orange);
}

.analytics-kpi-card:nth-child(4)::before {
    background: linear-gradient(90deg, var(--accent-orange), var(--gold));
}

.kpi-icon.avg {
    background: linear-gradient(135deg, rgba(210, 153, 34, 0.2), rgba(210, 153, 34, 0.1));
    color: var(--accent-yellow);
}

.analytics-kpi-card:nth-child(5)::before {
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
}

.kpi-icon.quantity {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.2), rgba(248, 81, 73, 0.1));
    color: var(--accent-red);
}

.analytics-kpi-card:nth-child(6)::before {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-purple));
}

.kpi-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.kpi-change {
    font-size: 11px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-change.positive {
    color: var(--accent-green);
}

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

.kpi-change i {
    font-size: 10px;
}

/* Analytics Section - PREMIUM STYLING */
.analytics-section {
    margin-bottom: 32px;
}

.section-header {
    margin-bottom: 20px;
    position: relative;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.section-header h2 i {
    color: var(--accent-blue);
    font-size: 18px;
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.5));
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 30px;
}

/* Charts Row - Enhanced */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1100px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.chart-card:hover {
    border-color: rgba(88, 166, 255, 0.3);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 60px rgba(88, 166, 255, 0.05);
    transform: translateY(-4px);
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.chart-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    border-radius: 2px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: rgba(33, 38, 45, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(40, 45, 55, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.legend-item .dot.blue {
    background: var(--accent-blue);
    color: var(--accent-blue);
}

.legend-item .dot.purple {
    background: var(--accent-purple);
    color: var(--accent-purple);
}

.legend-item .dot.green {
    background: var(--accent-green);
    color: var(--accent-green);
}

.legend-item .dot.orange {
    background: var(--accent-orange);
    color: var(--accent-orange);
}

.chart-container {
    padding: 24px;
    height: 300px;
    position: relative;
}

.chart-container::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.2), transparent);
}

.chart-container-small {
    height: 180px;
    padding: 20px;
}

.chart-container-large {
    height: 220px;
    padding: 20px;
}

/* Analytics Card */
.analytics-card .analytics-card-body {
    padding: 20px;
}

.mini-chart-container {
    height: 160px;
    margin-bottom: 16px;
}

/* Analytics Stats */
.analytics-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.analytics-stat:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.analytics-stat .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.analytics-stat.vip .stat-icon {
    background: rgba(251, 191, 36, 0.15);
    color: var(--gold);
}

.analytics-stat.regular .stat-icon {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-blue);
}

.analytics-stat.new .stat-icon {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 16px;
    font-weight: 600;
}

.stat-details .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Performance Section */
.performance-section {
    margin-bottom: 16px;
}

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

.performance-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.performance-section h4 i {
    font-size: 10px;
}

.performance-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.performance-item:hover {
    background: var(--bg-card-hover);
}

.performance-item .rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.performance-item.top .rank {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.performance-item.bottom .rank {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.performance-item .name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.performance-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

.performance-item.top .value {
    color: var(--accent-green);
}

.performance-item.bottom .value {
    color: var(--accent-red);
}

/* Geographic Stats */
.geo-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.geo-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.geo-stat:hover {
    background: var(--bg-card-hover);
}

.country-flag {
    font-size: 18px;
}

.country-name {
    flex: 1;
    font-size: 13px;
}

.country-value {
    font-weight: 600;
    font-size: 13px;
}

.country-pct {
    font-size: 11px;
    color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Category Stats */
.category-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.category-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.category-stat:hover {
    background: var(--bg-card-hover);
}

.cat-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.cat-color.bikes {
    background: #58a6ff;
}

.cat-color.accessories {
    background: #a371f7;
}

.cat-color.clothing {
    background: #3fb950;
}

.cat-color.components {
    background: #f0883e;
}

.cat-name {
    flex: 1;
    font-size: 12px;
}

.cat-value {
    font-size: 12px;
    font-weight: 600;
}

.cat-pct {
    font-size: 10px;
    color: var(--text-muted);
}

/* Badge Info */
.badge-info {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-info i {
    font-size: 10px;
}

/* ===================================
   Product Insights - Category Breakdown
   =================================== */
.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.category-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cat-icon.components {
    background: rgba(240, 136, 62, 0.15);
    color: var(--accent-orange);
}

.cat-icon.bikes {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-blue);
}

.cat-icon.clothing {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.cat-icon.accessories {
    background: rgba(163, 113, 247, 0.15);
    color: var(--accent-purple);
}

.cat-icon.other {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-muted);
}

.cat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-info .cat-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.cat-bar {
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
}

.cat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* ===================================
   Cost Analysis Cards
   =================================== */
.cost-analysis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cost-card {
    background: var(--bg-input);
    border-radius: 10px;
    padding: 16px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.cost-card:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 166, 255, 0.3);
}

.cost-card.premium {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(163, 113, 247, 0.1));
    border-color: rgba(88, 166, 255, 0.2);
}

.cost-card.mid {
    background: rgba(240, 136, 62, 0.08);
}

.cost-card.low {
    background: rgba(63, 185, 80, 0.08);
}

.cost-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cost-header i {
    color: var(--accent-blue);
    font-size: 14px;
}

.cost-header span {
    font-size: 13px;
    color: var(--text-secondary);
}

.cost-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cost-card.premium .cost-value {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cost-bar {
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cost-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cost-card.premium .cost-fill {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

.cost-card.mid .cost-fill {
    background: var(--accent-orange);
}

.cost-card.low .cost-fill {
    background: var(--accent-green);
}

.cost-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* KPI Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-value.animated {
    animation: countUp 0.5s ease-out;
}

/* ===================================
   Global Filters Bar - PREMIUM STYLING
   =================================== */
.global-filters {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
    border: 1px solid rgba(88, 166, 255, 0.15);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    position: sticky;
    top: calc(var(--topbar-height) + 10px);
    z-index: 40;
    backdrop-filter: blur(20px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 60px rgba(88, 166, 255, 0.05);
    transition: all 0.3s ease;
}

.global-filters:hover {
    border-color: rgba(88, 166, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 80px rgba(88, 166, 255, 0.08);
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filters-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.filters-title i {
    color: var(--accent-blue);
    font-size: 16px;
    filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.4));
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(163, 113, 247, 0.15));
    border: 1px solid rgba(88, 166, 255, 0.4);
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    color: #58a6ff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.15);
}

.filter-chip:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.35), rgba(163, 113, 247, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.25);
}

.filter-chip .remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    font-size: 9px;
    transition: all 0.2s ease;
}

.filter-chip .remove:hover {
    background: var(--accent-red);
    color: white;
    transform: scale(1.1);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

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

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    font-size: 11px;
    color: var(--accent-blue);
    opacity: 0.7;
}

.filter-select {
    padding: 10px 36px 10px 14px;
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.9), rgba(22, 27, 34, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-select:hover {
    border-color: rgba(88, 166, 255, 0.4);
    background: linear-gradient(135deg, rgba(40, 45, 55, 0.95), rgba(28, 33, 40, 0.98));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 3px rgba(88, 166, 255, 0.2),
        0 4px 16px rgba(88, 166, 255, 0.15);
}

.filter-select.active {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(33, 38, 45, 0.95));
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.3) inset;
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.12), rgba(63, 185, 80, 0.08));
    border: 1px solid rgba(88, 166, 255, 0.25);
    border-radius: 10px;
    font-size: 13px;
    color: var(--accent-blue);
    animation: filterInfoPulse 2s ease-in-out infinite;
}

@keyframes filterInfoPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

.filter-info i {
    font-size: 15px;
    filter: drop-shadow(0 0 4px rgba(88, 166, 255, 0.4));
}

.filter-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================
   Clickable Chart Elements (Drill-down)
   =================================== */
.chart-container canvas,
.chart-container-small canvas,
.chart-container-large canvas,
.mini-chart-container canvas {
    cursor: pointer;
}

.clickable-stat {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clickable-stat:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 2px var(--accent-blue);
}

.geo-stat.clickable:hover,
.category-stat.clickable:hover,
.category-item.clickable:hover,
.cost-card.clickable:hover {
    transform: translateX(8px);
    border-left: 3px solid var(--accent-blue);
    cursor: pointer;
}

/* Drill-down indicator */
.drill-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.clickable-stat:hover .drill-indicator,
.geo-stat.clickable:hover .drill-indicator,
.category-item:hover .drill-indicator {
    opacity: 1;
}

/* Filtered state visual indicator */
.analytics-kpi-card.filtered {
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.15);
}

.analytics-kpi-card.filtered::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}

/* Filter loading animation */
@keyframes filterPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-data {
    animation: filterPulse 1s ease infinite;
}

/* ===================================
   Growth Metrics Cards - PREMIUM STYLING
   =================================== */
.growth-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.growth-card {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.growth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green), #56d364);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.growth-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.growth-card:hover::before {
    opacity: 1;
}

.growth-card.positive {
    border-top: 4px solid transparent;
    background:
        linear-gradient(145deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.95)) padding-box,
        linear-gradient(135deg, #3fb950, #56d364) border-box;
    border-top: 4px solid var(--accent-green);
}

.growth-card.positive::before {
    display: none;
}

.growth-card.negative {
    border-top: 4px solid var(--accent-red);
}

.growth-card.negative::before {
    background: linear-gradient(90deg, var(--accent-red), #ff7b72);
    display: none;
}

.growth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.growth-period {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.growth-badge {
    font-size: 11px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(163, 113, 247, 0.15));
    color: var(--accent-blue);
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* Year Comparison Selector - Enhanced */
.year-comparison-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-select {
    padding: 8px 28px 8px 12px;
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.95), rgba(22, 27, 34, 0.98));
    border: 1px solid rgba(88, 166, 255, 0.25);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.year-select:hover {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, rgba(40, 45, 55, 0.95), rgba(28, 33, 40, 0.98));
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
}

.year-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow:
        0 0 0 3px rgba(88, 166, 255, 0.2),
        0 4px 12px rgba(88, 166, 255, 0.15);
}

.vs-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.growth-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.growth-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.growth-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.growth-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.growth-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-green);
}

.growth-value:first-child:not(:only-child) {
    color: var(--accent-green);
}

.growth-card .growth-metric:has(.negative) .growth-value {
    color: var(--accent-red);
}

.growth-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
    border-radius: 50%;
    font-size: 12px;
}

.growth-arrow.negative {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.growth-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===================================
   Profitability Analysis - PREMIUM STYLING
   =================================== */
.profitability-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.profit-card {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 28px;
    display: flex;
    gap: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.profit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 0% 0%, rgba(63, 185, 80, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.profit-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(63, 185, 80, 0.3);
}

.profit-card:hover::before {
    opacity: 1;
}

.profit-card.highlight {
    background: linear-gradient(145deg,
            rgba(63, 185, 80, 0.12),
            rgba(22, 27, 34, 0.95),
            rgba(88, 166, 255, 0.08));
    border-color: rgba(63, 185, 80, 0.4);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(63, 185, 80, 0.1);
}

.profit-card.highlight:hover {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(63, 185, 80, 0.15);
}

.profit-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.25), rgba(63, 185, 80, 0.1));
    color: var(--accent-green);
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(63, 185, 80, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profit-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.profit-card:hover .profit-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 24px rgba(63, 185, 80, 0.35);
}

.profit-card:hover .profit-icon::after {
    opacity: 1;
}

.profit-icon.margin {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.25), rgba(88, 166, 255, 0.1));
    color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.25);
}

.profit-icon.margin::after {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.4), transparent);
}

.profit-card:hover .profit-icon.margin {
    box-shadow: 0 6px 24px rgba(88, 166, 255, 0.35);
}

.profit-icon.cogs {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.25), rgba(248, 81, 73, 0.1));
    color: var(--accent-red);
    box-shadow: 0 4px 20px rgba(248, 81, 73, 0.25);
}

.profit-icon.cogs::after {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.4), transparent);
}

.profit-card:hover .profit-icon.cogs {
    box-shadow: 0 6px 24px rgba(248, 81, 73, 0.35);
}

.profit-icon.unit {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.25), rgba(163, 113, 247, 0.1));
    color: var(--accent-purple);
    box-shadow: 0 4px 20px rgba(163, 113, 247, 0.25);
}

.profit-icon.unit::after {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.4), transparent);
}

.profit-card:hover .profit-icon.unit {
    box-shadow: 0 6px 24px rgba(163, 113, 247, 0.35);
}

.profit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profit-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.profit-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.profit-card.highlight .profit-value {
    background: linear-gradient(135deg, var(--accent-green), #56d364, var(--accent-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.profit-formula {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.8), rgba(22, 27, 34, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    width: fit-content;
}

.profit-bar {
    height: 8px;
    background: rgba(13, 17, 23, 0.8);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

.profit-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: barShimmer 2s infinite;
}

@keyframes barShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.profit-bar .profit-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), #56d364, #3fb950);
    background-size: 200% auto;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(63, 185, 80, 0.4);
    position: relative;
}

.profit-bar .profit-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 12px;
    background: white;
    border-radius: 2px;
    opacity: 0.8;
}

.profit-bar.negative .profit-fill {
    background: linear-gradient(90deg, #f85149, #ff7b72, #f85149);
    background-size: 200% auto;
    box-shadow: 0 0 12px rgba(248, 81, 73, 0.4);
}

.profit-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profit-comparison {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(33, 38, 45, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vs-label {
    font-size: 12px;
    color: var(--text-muted);
}

.vs-value {
    font-size: 15px;
    font-weight: 700;
}

.vs-value.positive {
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(63, 185, 80, 0.4);
}

.profit-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(33, 38, 45, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

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

.breakdown-item:hover {
    color: var(--text-primary);
    padding-left: 4px;
}

.breakdown-item .positive {
    color: var(--accent-green);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(63, 185, 80, 0.3);
}

/* ===================================
   Customer Segmentation - PREMIUM STYLING
   =================================== */
.segmentation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.segment-card {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}

.segment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.segment-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.2);
}

.segment-card:hover::before {
    opacity: 1;
}

.segment-card.wide {
    grid-column: span 2;
}

.segment-header {
    padding: 18px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.segment-header h4 {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.segment-header h4 i {
    color: var(--accent-blue);
    font-size: 16px;
    filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.4));
}

.segment-body {
    padding: 24px;
}

.segment-chart-container {
    height: 140px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.segment-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.segment-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(33, 38, 45, 0.8), rgba(22, 27, 34, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.segment-stat:hover {
    background: linear-gradient(135deg, rgba(40, 45, 55, 0.9), rgba(28, 33, 40, 0.95));
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.segment-stat .stat-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 12px currentColor;
    position: relative;
}

.segment-stat .stat-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.3;
}

.segment-stat.new .stat-dot {
    background: var(--accent-green);
    color: var(--accent-green);
}

.segment-stat.returning .stat-dot {
    background: var(--accent-purple);
    color: var(--accent-purple);
}

.segment-stat .stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.segment-stat .stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.segment-stat .stat-lbl {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.segment-stat .stat-pct {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.segment-stat.new .stat-pct {
    color: var(--accent-green);
    background: rgba(63, 185, 80, 0.1);
}

.segment-stat.returning .stat-pct {
    color: var(--accent-purple);
    background: rgba(163, 113, 247, 0.1);
}

/* Loyalty Ring Metrics - ENHANCED */
.segment-body.metrics-grid {
    display: flex;
    justify-content: space-around;
    gap: 32px;
    padding: 48px 24px;
}

.loyalty-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    transition: all 0.3s ease;
}

.loyalty-metric:hover {
    transform: scale(1.03);
}

.metric-ring {
    width: 150px;
    height: 150px;
    position: relative;
}

/* Removed the ::before pseudo-element that created the square glow */

.metric-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(48, 54, 61, 0.4);
    stroke-width: 3;
}

.ring-fill {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    /* No filter to avoid square box effect */
}

.ring-fill.purple {
    stroke: var(--accent-purple);
}

.ring-fill.orange {
    stroke: var(--accent-orange);
}

.ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.metric-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Customer Value Metrics - ENHANCED */
.segment-body.value-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.value-metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: linear-gradient(145deg, rgba(33, 38, 45, 0.8), rgba(22, 27, 34, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.value-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-metric-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(145deg, rgba(40, 45, 55, 0.9), rgba(28, 33, 40, 0.95));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(88, 166, 255, 0.2);
}

.value-metric-card:hover::before {
    opacity: 1;
}

.value-metric-card.highlight {
    background: linear-gradient(145deg,
            rgba(88, 166, 255, 0.15),
            rgba(163, 113, 247, 0.1),
            rgba(22, 27, 34, 0.95));
    border: 1px solid rgba(88, 166, 255, 0.35);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(88, 166, 255, 0.1);
}

.value-metric-card.highlight:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(88, 166, 255, 0.15);
}

.value-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
    color: var(--accent-blue);
    font-size: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.2);
    transition: all 0.4s ease;
}

.value-metric-card:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 24px rgba(88, 166, 255, 0.3);
}

.value-metric-card.highlight .value-icon {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.4);
}

.value-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.value-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.value-metric-card.highlight .value-number {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

.value-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

.value-calc {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(33, 38, 45, 0.6);
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .growth-cards-grid {
        grid-template-columns: 1fr;
    }

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

    .segment-body.value-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print styles */
@media print {

    .sidebar,
    .top-bar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }
}

/* ===================================
   Data Model Page - Redesign
   =================================== */

/* Model Stats Grid */
.model-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.model-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-normal);
}

.model-stat-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.model-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.model-stat-icon.tables {
    background: linear-gradient(135deg, #58a6ff33, #58a6ff11);
    color: var(--accent-blue);
}

.model-stat-icon.columns {
    background: linear-gradient(135deg, #a371f733, #a371f711);
    color: var(--accent-purple);
}

.model-stat-icon.relationships {
    background: linear-gradient(135deg, #3fb95033, #3fb95011);
    color: var(--accent-green);
}

.model-stat-icon.rows {
    background: linear-gradient(135deg, #f0883e33, #f0883e11);
    color: var(--accent-orange);
}

.model-stat-icon.schema {
    background: linear-gradient(135deg, #fbbf2433, #fbbf2411);
    color: var(--gold);
}

.model-stat-content {
    display: flex;
    flex-direction: column;
}

.model-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.model-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Star Schema Card */
.star-schema-card {
    margin-bottom: 24px;
}

.star-schema-container {
    padding: 32px;
    background: linear-gradient(180deg, var(--bg-card) 0%, #0d111799 100%);
    min-height: 400px;
}

.star-schema {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.schema-table {
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    min-width: 220px;
    max-width: 280px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.schema-table:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.schema-table.dimension.customers {
    border-color: var(--accent-blue);
}

.schema-table.dimension.products {
    border-color: var(--accent-green);
}

.schema-table.fact.sales {
    border-color: var(--accent-orange);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(240, 136, 62, 0.2);
}

.schema-table-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.schema-table.dimension.customers .schema-table-header {
    background: linear-gradient(135deg, #58a6ff22, #58a6ff11);
    color: var(--accent-blue);
}

.schema-table.dimension.products .schema-table-header {
    background: linear-gradient(135deg, #3fb95022, #3fb95011);
    color: var(--accent-green);
}

.schema-table.fact.sales .schema-table-header {
    background: linear-gradient(135deg, #f0883e33, #f0883e11);
    color: var(--accent-orange);
}

.schema-table-header .table-type {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schema-table-body {
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.schema-column {
    padding: 6px 16px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.schema-column i {
    margin-right: 6px;
}

.schema-column.pk {
    color: var(--gold);
}

.schema-column.fk {
    color: var(--accent-purple);
}

.schema-column.measure {
    color: var(--accent-green);
}

.schema-column span {
    color: var(--text-muted);
    font-size: 11px;
}

.schema-table-footer {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.schema-table-footer i {
    margin-right: 4px;
}

/* Table Details Grid */
.table-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.table-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.table-detail-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.table-detail-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-detail-header.customers {
    background: linear-gradient(135deg, #58a6ff15, transparent);
    border-bottom: 1px solid #58a6ff33;
}

.table-detail-header.sales {
    background: linear-gradient(135deg, #f0883e15, transparent);
    border-bottom: 1px solid #f0883e33;
}

.table-detail-header.products {
    background: linear-gradient(135deg, #3fb95015, transparent);
    border-bottom: 1px solid #3fb95033;
}

.table-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.table-detail-header.customers .table-icon {
    background: #58a6ff22;
    color: var(--accent-blue);
}

.table-detail-header.sales .table-icon {
    background: #f0883e22;
    color: var(--accent-orange);
}

.table-detail-header.products .table-icon {
    background: #3fb95022;
    color: var(--accent-green);
}

.table-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.table-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.table-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table-badge.dimension {
    background: #58a6ff22;
    color: var(--accent-blue);
}

.table-badge.fact {
    background: #f0883e22;
    color: var(--accent-orange);
}

.table-detail-body {
    padding: 16px 20px;
}

.table-description {
    margin-bottom: 16px;
}

.table-description p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.table-metrics {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
}

.table-metrics .metric {
    flex: 1;
    text-align: center;
}

.table-metrics .metric-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.table-metrics .metric-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.table-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.source-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 6px;
    color: var(--text-secondary);
}

.source-tag i {
    margin-right: 4px;
    color: var(--accent-purple);
}

/* Data Lineage */
.lineage-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding: 32px;
    flex-wrap: wrap;
}

.lineage-stage {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.lineage-header {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 12px;
}

.lineage-header.bronze {
    background: linear-gradient(135deg, #cd7f3233, #cd7f3211);
    color: var(--bronze);
}

.lineage-header.silver {
    background: linear-gradient(135deg, #a8a8a833, #a8a8a811);
    color: var(--silver);
}

.lineage-header.gold {
    background: linear-gradient(135deg, #fbbf2433, #fbbf2411);
    color: var(--gold);
}

.lineage-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lineage-item {
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.lineage-item.highlight {
    background: linear-gradient(135deg, #fbbf2411, transparent);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 500;
}

.lineage-arrow {
    display: flex;
    align-items: center;
    padding-top: 40px;
    font-size: 24px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .model-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .table-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .star-schema {
        gap: 24px;
    }
}

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

    .table-details-grid {
        grid-template-columns: 1fr;
    }

    .lineage-container {
        flex-direction: column;
        align-items: stretch;
    }

    .lineage-arrow {
        transform: rotate(90deg);
        padding: 8px 0;
        justify-content: center;
    }

    .lineage-stage {
        max-width: none;
    }
}

/* ===================================
   Featured Nav Item & Creator Profile
   =================================== */

/* Featured Navigation Item */
.nav-item.featured {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(163, 113, 247, 0.1));
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 8px;
    position: relative;
}

.nav-item.featured:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.25), rgba(163, 113, 247, 0.15));
    border-color: var(--accent-blue);
}

.nav-item.featured i:first-child {
    color: var(--accent-blue);
}

/* Nav Badge */
.nav-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--gradient-gold);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.nav-badge.pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 4px rgba(251, 191, 36, 0.2);
    }
}

/* Creator Profile Section */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent, rgba(88, 166, 255, 0.03));
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.creator-info:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.15);
}

.creator-link-icon {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0;
    transition: var(--transition-fast);
}

.creator-info:hover .creator-link-icon {
    opacity: 1;
    color: var(--accent-blue);
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.creator-details {
    display: flex;
    flex-direction: column;
}

.creator-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.creator-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.creator-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.creator-links a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition-normal);
}

.creator-links a:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    transform: translateY(-2px);
}

.creator-links a[href*="linkedin"]:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.creator-links a[href*="mailto"]:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.creator-links a[title="Portfolio"]:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ===================================
   Quick Search & GitHub Star Button
   =================================== */

/* Search Box Enhanced */
.search-box {
    position: relative;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    width: 100%;
    background: rgba(22, 27, 34, 0.98);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 9999;
}

.search-box:focus-within .search-dropdown,
.search-dropdown.active {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

.search-item:hover,
.search-item.highlighted {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.search-item i {
    width: 16px;
    color: var(--text-muted);
}

.search-item:hover i {
    color: var(--accent-blue);
}

/* GitHub Star Button */
.github-star {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.github-star:hover {
    background: #238636 !important;
    border-color: #238636 !important;
}

.star-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #000;
    animation: starPulse 1.5s ease-in-out infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ===================================
   Site Footer
   =================================== */

.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    margin-left: var(--sidebar-width);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-content .heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

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

@media (max-width: 768px) {
    .site-footer {
        margin-left: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ===================================
   Premium Utilities & Animations
   =================================== */

/* Smooth scroll for entire dashboard */
html {
    scroll-behavior: smooth;
}

/* Focus outline for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Subtle shimmer animation for loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Fade in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analytics-section {
    animation: fadeInUp 0.5s ease-out forwards;
}

.analytics-section:nth-child(1) {
    animation-delay: 0.1s;
}

.analytics-section:nth-child(2) {
    animation-delay: 0.2s;
}

.analytics-section:nth-child(3) {
    animation-delay: 0.3s;
}

.analytics-section:nth-child(4) {
    animation-delay: 0.4s;
}

.analytics-section:nth-child(5) {
    animation-delay: 0.5s;
}

/* Pulse animation for important metrics */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Glow effect on hover */
.glow-hover:hover {
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.2);
}

/* Better scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 17, 23, 0.8);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #30363d, #21262d);
    border-radius: 5px;
    border: 2px solid rgba(13, 17, 23, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3d444d, #30363d);
}

/* Selection highlight */
::selection {
    background: rgba(88, 166, 255, 0.3);
    color: var(--text-primary);
}

/* Responsive filter adjustments */
@media (max-width: 900px) {
    .global-filters {
        position: relative;
        top: 0;
    }

    .filters-row {
        gap: 12px;
    }

    .filter-group {
        min-width: 120px;
        flex: 1;
    }

    .growth-cards-grid {
        grid-template-columns: 1fr;
    }
}