/* 
   House Transfer Dashboard CSS
   Design System: Premium Glassmorphism & Cyberpunk-inspired Theme
   Fonts: Plus Jakarta Sans (English) & Prompt (Thai)
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Prompt:wght@200;300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-base: #060814;
    --bg-gradient: radial-gradient(circle at 50% 0%, #151636 0%, #060814 100%);
    --card-bg: rgba(20, 22, 53, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-border-glow: rgba(139, 92, 246, 0.18);
    
    --text-primary: #f1f3f9;
    --text-secondary: #a2a6cc;
    --text-muted: #676b94;
    
    /* Brand Colors */
    --primary: #8b5cf6; /* Royal Purple */
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #ec4899; /* Hot Pink/Magenta */
    --secondary-glow: rgba(236, 72, 153, 0.5);
    
    /* Accent Colors */
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.3);
    --accent-gold: #e2b865; /* Champagne Gold */
    --accent-gold-glow: rgba(226, 184, 101, 0.3);
    --accent-rose: #f43f5e;
    --accent-rose-glow: rgba(244, 63, 94, 0.3);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.3);

    /* Fonts */
    --font-main: 'Plus Jakarta Sans', 'Prompt', sans-serif;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-base);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45), 0 0 15px var(--card-border-glow);
}

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

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--card-border);
    background: rgba(10, 14, 28, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-item.active a, .nav-item a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: var(--transition-smooth);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

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

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    min-height: 100vh;
}

/* Header Action Bar */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.btn-group {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-accent {
    background: rgba(226, 184, 101, 0.12);
    border-color: rgba(226, 184, 101, 0.25);
    color: #fef3c7;
    box-shadow: 0 4px 12px rgba(226, 184, 101, 0.08);
}

.btn-accent:hover {
    background: rgba(226, 184, 101, 0.22);
    transform: translateY(-2px);
    border-color: rgba(226, 184, 101, 0.45);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* Left Panel: Glass Goal Tube */
.tube-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    height: 100%;
}

.tube-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

/* Circular Gauge Container */
.circular-gauge-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 1.5rem auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-gauge-body {
    position: relative;
    width: 200px;
    height: 200px;
    background: radial-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05),
                0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.circular-gauge-body:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.08),
                0 15px 40px rgba(0, 0, 0, 0.55),
                0 0 25px var(--card-border-glow);
}

/* Glass Reflection Overlays */
.glass-reflection-top {
    position: absolute;
    top: 5%;
    left: 15%;
    width: 70%;
    height: 35%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 100px 100px 0 0 / 50px 50px 0 0;
    pointer-events: none;
    z-index: 10;
}

.glass-reflection-bottom {
    position: absolute;
    bottom: 8%;
    left: 25%;
    width: 50%;
    height: 12%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 0 0 100px 100px / 0 0 20px 20px;
    pointer-events: none;
    z-index: 10;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start progress at top center */
    z-index: 5;
    overflow: visible;
}

.gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 10;
}

.gauge-progress {
    fill: none;
    stroke: url(#gauge-grad-normal);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.19, 1, 0.22, 1), stroke 0.5s;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.gauge-ticks {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 4;
    stroke-dasharray: 1.5px 7.92px; /* 60 divisions around radius 90 */
    transition: var(--transition-smooth);
}

/* Gauge Info Center */
.gauge-info {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 8;
}

.gauge-icon {
    color: var(--text-muted);
    margin-bottom: 4px;
    transition: var(--transition-smooth);
}

.gauge-value {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
    transition: var(--transition-smooth);
}

.gauge-target-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.gauge-percent {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Success / Gold State Outlines */
.circular-gauge-body.success .gauge-progress {
    stroke: url(#gauge-grad-success);
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6));
}

.circular-gauge-body.success .gauge-icon {
    color: var(--accent-emerald);
}

.circular-gauge-body.success .gauge-value {
    background: linear-gradient(135deg, #ffffff 20%, var(--accent-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.circular-gauge-body.success .gauge-percent {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.circular-gauge-body.gold .gauge-progress {
    stroke: url(#gauge-grad-gold);
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8));
    animation: gold-glow-pulse 2s infinite alternate;
}

.circular-gauge-body.gold .gauge-icon {
    color: var(--accent-gold);
}

.circular-gauge-body.gold .gauge-value {
    background: linear-gradient(135deg, #ffffff 10%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gold-text-pulse 2s infinite alternate;
}

.circular-gauge-body.gold .gauge-percent {
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

@keyframes gold-glow-pulse {
    0% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)); }
    100% { filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.9)); }
}

@keyframes gold-text-pulse {
    0% { filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.1)); }
    100% { filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.5)); }
}

/* Floating Particle Sparks */
.gauge-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 6;
}

.gauge-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
    bottom: 0;
    opacity: 0;
    animation: float-spark 4s infinite ease-in-out;
}

@keyframes float-spark {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120px) scale(1.2);
        opacity: 0;
    }
}

.gauge-status-msg {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 10px;
    letter-spacing: 0.2px;
}

.overflow-badge {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    background: rgba(226, 184, 101, 0.12);
    border: 1px solid rgba(226, 184, 101, 0.25);
    color: var(--accent-gold);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 8px rgba(226, 184, 101, 0.15);
    animation: slide-up-fade 0.5s ease-out;
}

/* Right Panel: Content Dashboards */
.dashboard-main-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Summary Cards Row */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-item-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-item-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item-icon.purple-icon {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.stat-item-icon.amber-icon {
    background: rgba(226, 184, 101, 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(226, 184, 101, 0.25);
}

.stat-item-icon.emerald-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

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

.stat-item-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-item-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Project Transfers Section */
.section-card {
    padding: 2rem;
}

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

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    stroke-width: 2;
    fill: none;
}

/* Project bars list */
.projects-progress-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-progress-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-name {
    color: var(--text-primary);
}

.project-count-text {
    font-weight: 700;
}

.project-count-text span {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    transition: width 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Sales Team Section */
.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.sales-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.sales-card-bg-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.sales-avatar-wrapper {
    position: relative;
}

.sales-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.rank-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

.rank-badge.rank-1 {
    background: none;
    border: none;
    font-size: 1.3rem;
    width: auto;
    height: auto;
    bottom: -6px;
    right: -6px;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}
.rank-badge.rank-2 {
    background: none;
    border: none;
    font-size: 1.3rem;
    width: auto;
    height: auto;
    bottom: -6px;
    right: -6px;
    filter: drop-shadow(0 0 4px rgba(203, 213, 225, 0.6));
}
.rank-badge.rank-3 {
    background: none;
    border: none;
    font-size: 1.3rem;
    width: auto;
    height: auto;
    bottom: -6px;
    right: -6px;
    filter: drop-shadow(0 0 4px rgba(217, 119, 6, 0.6));
}

.sales-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sales-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.sales-count {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.sales-count span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sales-quick-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.sales-quick-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary-glow);
    border-color: transparent;
}

.sales-quick-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

/* Secondary Panels Layout (Tabs/Subsections) */
.data-tabs-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--card-border);
    gap: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 4px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 10px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

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

/* Premium Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.premium-table th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.premium-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.premium-table tbody tr {
    transition: var(--transition-smooth);
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 6px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge-pending-3 {
    background: rgba(226, 184, 101, 0.1);
    color: #fde047;
    border: 1px solid rgba(226, 184, 101, 0.2);
}
.badge-pending-3::before {
    background: var(--accent-gold);
    box-shadow: 0 0 6px var(--accent-gold-glow);
}

.badge-pending-6 {
    background: rgba(236, 72, 153, 0.1);
    color: #fbcfe8;
    border: 1px solid rgba(236, 72, 153, 0.2);
}
.badge-pending-6::before {
    background: var(--secondary);
    box-shadow: 0 0 6px var(--secondary-glow);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-success::before {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Empty State Styling */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    margin-bottom: 12px;
    fill: none;
}

.empty-state p {
    font-size: 0.95rem;
}

/* Modals & Dialog System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 6, 14, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    background: #0f1322;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.15);
    padding: 2rem;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

select.form-control option {
    background: #0f1322;
    color: var(--text-primary);
}

/* Custom Selector for Salesperson with Avatar */
.avatar-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.avatar-select-item {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
}

.avatar-select-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-select-item.selected {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.avatar-select-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 4px;
}

.avatar-select-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Actions Buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2rem;
}

/* Form Helper Classes */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Helper Animation class */
@keyframes slide-up-fade {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .circular-gauge-wrapper {
        margin: 1rem auto;
    }
    
    .tube-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 1.5rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-grow: 0;
    }
    
    .nav-item a {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .nav-item.active a {
        border-left: none;
        border-bottom: 2px solid var(--primary);
        padding-left: 12px;
        padding-bottom: 6px;
    }
    
    .sidebar-footer {
        display: none; /* Hide user profile on mobile sidebar */
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn {
        flex-grow: 1;
        justify-content: center;
    }
}
