/* =====================================================
   VB LOGISTICS ADMIN DASHBOARD
   Colorful Premium Design - Inspired by Alps Dashboard
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Background Colors - Premium Dark Dev Theme */
    --bg-primary: #09090b;
    --bg-secondary: #0c0c0f;
    --bg-sidebar: #09090b;
    --bg-card: #111114;
    --bg-card-hover: #18181b;
    --bg-input: #18181b;

    /* Card Accent Colors - Vibrant */
    --color-pink: #ec4899;
    --color-pink-light: #f472b6;
    --color-blue: #3b82f6;
    --color-blue-light: #60a5fa;
    --color-yellow: #f59e0b;
    --color-yellow-dark: #d97706;
    --color-green: #22c55e;
    --color-green-light: #4ade80;
    --color-purple: #a855f7;
    --color-purple-light: #c084fc;
    --color-cyan: #06b6d4;
    --color-red: #ef4444;

    /* Gradient Cards - Slightly Darker */
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-yellow: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-green: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);

    /* Text Colors - Higher Contrast */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --text-dark: #09090b;

    /* Borders - Subtler */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Shadows - Deeper */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);

    /* Layout */
    --sidebar-width: 240px;
    --header-height: 64px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* Subtle gradient glow for premium feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(236, 72, 153, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.05), transparent);
    pointer-events: none;
    z-index: -1;
}

::selection {
    background: var(--color-pink);
    color: white;
}

/* =====================================================
   LOADING SCREEN
   ===================================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.loader-ring {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--color-pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   MODAL OVERLAY
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =====================================================
   AUTH MODAL
   ===================================================== */
.auth-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.4s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo .logo-icon {
    width: 68px;
    height: 68px;
    background: var(--gradient-pink);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-4);
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.4);
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.form-group input:hover {
    border-color: var(--border-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-pink);
    background: var(--bg-secondary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.hint {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    font-size: 12px;
    color: var(--color-yellow);
    font-weight: 500;
}

.hint svg {
    flex-shrink: 0;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-pink);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.error-message {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-red);
    font-size: 13px;
    font-weight: 500;
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */
#app {
    display: flex;
    min-height: 100vh;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-slow);
}


/* Sidebar overlay for mobile - click to close sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-pink);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.logo span {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item:hover svg {
    opacity: 1;
}

.nav-item.active {
    background: rgba(236, 72, 153, 0.15);
    color: var(--color-pink);
}

.nav-item.active svg {
    opacity: 1;
    color: var(--color-pink);
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: var(--color-red);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(244, 67, 54, 0.2);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.menu-toggle {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-green);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    display: none;
    padding: var(--space-6);
    flex: 1;
}

.section.active {
    display: block;
    animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   STATS GRID - Colorful Cards
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--gradient-pink);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
}

.stat-card:nth-child(1) {
    background: var(--gradient-pink);
    box-shadow: 0 4px 24px rgba(236, 72, 153, 0.35);
}

.stat-card:nth-child(2) {
    background: var(--gradient-blue);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.35);
}

.stat-card:nth-child(3) {
    background: var(--gradient-yellow);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.35);
}

.stat-card:nth-child(3) .stat-value,
.stat-card:nth-child(3) .stat-label {
    color: var(--text-dark);
}

.stat-card:nth-child(4) {
    background: var(--gradient-green);
    box-shadow: 0 4px 24px rgba(34, 197, 94, 0.35);
}

.stat-card:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stat-card::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    position: absolute;
    right: var(--space-4);
    top: var(--space-4);
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-card:nth-child(3) .stat-icon {
    color: var(--text-dark);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-info {
    position: relative;
    z-index: 1;
    padding-right: 60px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-1);
    display: block;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: var(--space-1);
}

.stat-trend {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.stat-card:nth-child(3) .stat-trend {
    color: var(--text-dark);
    opacity: 0.8;
}

/* =====================================================
   DASHBOARD GRID
   ===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-5);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.select-small {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.select-small option {
    background: var(--bg-card);
}

.view-all-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-pink);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.view-all-link:hover {
    color: var(--color-pink-light);
}

.card-body {
    padding: var(--space-5);
}

/* Chart Container */
.chart-container {
    height: 280px;
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    padding-top: var(--space-4);
    position: relative;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.chart-bar {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(180deg, var(--color-blue) 0%, var(--color-cyan) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-normal);
    min-height: 8px;
    position: relative;
}

.chart-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: inherit;
}

.chart-bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.chart-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Recent Uploads */
.recent-uploads-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-height: 320px;
    overflow-y: auto;
}

.recent-upload-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.recent-upload-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.recent-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-secondary);
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =====================================================
   VISITOR BADGES (like the reference)
   ===================================================== */
.visitor-badges {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.visitor-badge {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.visitor-badge.pink {
    background: rgba(233, 30, 99, 0.15);
    border: 1px solid rgba(233, 30, 99, 0.3);
}

.visitor-badge.blue {
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.visitor-badge.green {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.visitor-badge .badge-value {
    font-size: 24px;
    font-weight: 700;
}

.visitor-badge.pink .badge-value {
    color: var(--color-pink);
}

.visitor-badge.blue .badge-value {
    color: var(--color-blue);
}

.visitor-badge.green .badge-value {
    color: var(--color-green);
}

.visitor-badge .badge-trend {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =====================================================
   FILTERS BAR
   ===================================================== */
.filters-bar {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding: var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.search-container {
    width: 100%;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) 44px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-pink);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--bg-card-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.date-filter label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.date-input {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    min-width: 130px;
}

.date-input:focus {
    outline: none;
    border-color: var(--color-pink);
}

/* Make the entire date input clickable for the calendar */
.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.8);
    opacity: 0.7;
    padding: 4px;
    margin-left: -20px;
    margin-right: 0;
    position: absolute;
    right: 8px;
}

/* Make the input clickable anywhere */
.date-filter {
    position: relative;
}

.date-filter .date-input {
    position: relative;
}

/* Clicking anywhere on the date input should open the picker */
.date-input::-webkit-datetime-edit {
    cursor: pointer;
}

.date-input::-webkit-datetime-edit-fields-wrapper {
    cursor: pointer;
}

.date-input::-webkit-datetime-edit-text,
.date-input::-webkit-datetime-edit-month-field,
.date-input::-webkit-datetime-edit-day-field,
.date-input::-webkit-datetime-edit-year-field {
    cursor: pointer;
    color: var(--text-secondary);
}

/* When date is selected, show in primary color */
.date-input:not(:placeholder-shown)::-webkit-datetime-edit-month-field,
.date-input:not(:placeholder-shown)::-webkit-datetime-edit-day-field,
.date-input:not(:placeholder-shown)::-webkit-datetime-edit-year-field {
    color: var(--text-primary);
}

.select-filter {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    min-width: 120px;
}

.select-filter option {
    background: var(--bg-card);
}

.btn-secondary {
    padding: var(--space-2) var(--space-4);
    background: var(--gradient-pink);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.btn-ghost {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* View Controls */
.view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.results-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-toggle {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
}

.view-btn {
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.view-btn.active {
    background: var(--color-blue);
    color: white;
}

/* =====================================================
   IMAGES GRID
   ===================================================== */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.images-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.image-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-cyan), var(--color-purple));
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 2;
}

.image-card:hover::before {
    opacity: 1;
}

.image-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-blue);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.2), 0 8px 16px rgba(0, 0, 0, 0.3);
}

.image-card .image-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    overflow: hidden;
    position: relative;
}

.image-card .image-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.image-card .image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.image-card:hover .image-thumb img {
    transform: scale(1.05);
}

/* Fallback for images that fail to load */
.image-card .image-thumb.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}

.image-card .image-thumb.no-image::before {
    content: '';
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='1'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'%3E%3C/circle%3E%3Cpolyline points='21 15 16 10 5 21'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.image-card .image-info {
    padding: var(--space-4) var(--space-5);
}

.image-card .image-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-3);
}

.image-card .image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: 12px;
    color: var(--text-muted);
    align-items: center;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--color-green);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-yellow);
}

.status-badge.uploading {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-blue);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-red);
}

/* List View */
.image-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.image-list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-blue);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.image-list-item .list-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.image-list-item .list-info {
    flex: 1;
    min-width: 0;
}

.image-list-item .list-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.image-list-item .list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 12px;
    color: var(--text-muted);
    align-items: center;
}

.image-list-item .list-id {
    width: 180px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6) 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-pink);
    border-color: var(--color-pink);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0 var(--space-4);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    text-align: center;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* =====================================================
   USERS TABLE
   ===================================================== */
.users-header {
    margin-bottom: var(--space-5);
}

.users-header .search-container {
    max-width: 400px;
}

.users-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: var(--bg-secondary);
}

.users-table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.users-table tbody tr {
    border-top: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.users-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.users-table td {
    padding: var(--space-4) var(--space-5);
    font-size: 14px;
    color: var(--text-primary);
}

.users-table .user-id {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.users-table .btn-view {
    padding: var(--space-2) var(--space-4);
    background: var(--gradient-pink);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.users-table .btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

/* =====================================================
   IMAGE MODAL
   ===================================================== */
.image-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlide 0.4s ease;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--color-red);
    border-color: var(--color-red);
}

.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-image-container {
    width: 100%;
    height: 420px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details {
    padding: var(--space-8);
}

.modal-details h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-6);
    word-break: break-all;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.detail-item {
    background: var(--bg-input);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}

.detail-value {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
    justify-content: center;
    text-decoration: none;
    padding: var(--space-3);
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.4s ease;
    max-width: 360px;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--color-green);
}

.toast.error {
    border-left: 4px solid var(--color-red);
}

.toast.info {
    border-left: 4px solid var(--color-blue);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .header {
        gap: var(--space-3);
    }

    .page-title {
        font-size: 18px;
    }

    .connection-status span {
        display: none;
    }

    .filters-bar {
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-3);
    }

    .filter-group {
        width: 100%;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .date-filter {
        flex: 1;
        min-width: 120px;
    }

    .date-filter label {
        display: none;
    }

    .date-input {
        width: 100%;
    }

    .select-filter {
        flex: 1;
        min-width: 100px;
    }

    .btn-secondary,
    .btn-ghost {
        flex: 1;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item.full-width {
        grid-column: span 1;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: var(--space-4);
    }

    .modal-image-container {
        height: 200px;
    }

    .modal-body {
        padding: var(--space-4);
    }

    .modal-actions {
        flex-direction: column;
        gap: var(--space-2);
    }

    .modal-actions .btn-secondary,
    .modal-actions .btn-ghost {
        width: 100%;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-3);
    }

    .image-card .image-thumb {
        height: 140px;
    }

    .image-card .image-info {
        padding: var(--space-3);
    }

    .image-card .image-name {
        font-size: 13px;
    }

    .users-table-container {
        overflow-x: auto;
    }

    .users-table {
        min-width: 600px;
    }

    .chart-container {
        height: 200px;
    }

    .view-controls {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }

    .pagination {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .pagination-btn {
        padding: var(--space-2) var(--space-3);
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 var(--space-3);
        height: 56px;
    }

    .page-title {
        font-size: 16px;
    }

    .section {
        padding: var(--space-3);
    }

    .auth-modal {
        padding: var(--space-5);
        margin: var(--space-3);
        width: calc(100% - var(--space-6));
    }

    .auth-logo .logo-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .images-grid {
        grid-template-columns: 1fr;
    }

    .stat-card::before,
    .stat-card::after {
        display: none;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .filters-bar {
        padding: var(--space-3);
    }

    .search-input {
        padding: var(--space-2) var(--space-3) var(--space-2) 40px;
        font-size: 14px;
    }

    .confirm-modal {
        padding: var(--space-5);
        margin: var(--space-3);
    }

    .confirm-icon {
        width: 60px;
        height: 60px;
    }

    .confirm-modal h3 {
        font-size: 18px;
    }
}

/* Skeleton Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-input) 25%,
            var(--bg-card-hover) 50%,
            var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

/* =====================================================
   CONFIRM DELETE MODAL
   ===================================================== */
.confirm-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

.confirm-icon {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    color: var(--color-red);
}

.confirm-modal h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.confirm-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    line-height: 1.6;
}

.confirm-details {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.confirm-details span {
    font-size: 13px;
    color: var(--text-secondary);
}

.confirm-details span strong {
    color: var(--text-primary);
}

.confirm-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.confirm-actions button {
    flex: 1;
    max-width: 160px;
}

/* Danger Button */
.btn-danger {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Delete button in table */
.btn-delete {
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-red);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-delete svg {
    width: 14px;
    height: 14px;
}

/* User actions cell */
.user-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}