/**
 * Transform.pics Dashboard Styles
 * Based on PugWorks Design System v1.0 - December 2025
 * Brand Promise: "Simple. Secure. Always There."
 */

/* ============================================
   CSS Variables - PugWorks Brand Colors
   ============================================ */
:root {
    /* Primary Brand Colors */
    --primary-color: #1E6BD6;        /* Deep Trust Blue - Main logo, buttons, headers */
    --primary-hover: #1557a8;        /* Darker blue for hover states */
    --primary-light: #dbeafe;        /* Light blue background */
    --secondary-color: #5CA9F2;      /* Sky Accent - Highlights, links */
    --accent-color: #23C0B7;         /* Soft Aqua - Alerts, secondary calls to action */

    /* Legacy variable mappings for backwards compatibility */
    --ocean-blue: var(--primary-color);
    --ocean-light: var(--primary-light);
    --ocean-dark: var(--primary-hover);
    --coral-pop: var(--primary-color);
    --coral-light: var(--primary-light);
    --coral-dark: var(--primary-hover);
    --mint-fresh: var(--accent-color);

    /* Neutral Colors */
    --ink: #2E3238;
    --slate: #64748b;
    --cloud: #94A3B8;
    --mist: #F8FAFC;
    --snow: #FFFFFF;

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;         /* Cloud Gray - Page backgrounds */
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #FFFFFF;
    --bg-color: #F5F7FA;
    --card-bg: #FFFFFF;
    --bg-overlay: rgba(45, 52, 54, 0.5);

    /* Text Colors */
    --text-primary: #2E3238;         /* Midnight Slate - Main text */
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #FFFFFF;

    /* Border Colors */
    --border-default: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-strong: #cbd5e1;
    --border-color: #e2e8f0;

    /* Semantic Colors */
    --success-color: #23C0B7;
    --success-bg: #d1fae5;
    --success-text: #15803D;
    --success-border: #22C55E;
    --warning-color: #f59e0b;
    --warning-bg: #fed7aa;
    --warning-text: #B45309;
    --warning-border: #FBBF24;
    --danger-color: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #DC2626;
    --error-border: #F87171;
    --info-bg: #dbeafe;
    --info-text: #1D4ED8;
    --info-border: #3B82F6;

    /* Shadows */
    --shadow: 0 1px 3px rgba(30,107,214,0.12), 0 1px 2px rgba(30,107,214,0.06);
    --shadow-sm: 0 2px 8px rgba(30,107,214,0.08);
    --shadow-md: 0 4px 20px rgba(30,107,214,0.1);
    --shadow-lg: 0 10px 15px rgba(30,107,214,0.1), 0 4px 6px rgba(30,107,214,0.05);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0.0, 1, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Dark Mode
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --bg-elevated: #1e293b;
        --bg-color: #0f172a;
        --card-bg: #1e293b;
        --bg-overlay: rgba(0, 0, 0, 0.7);

        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --text-tertiary: #64748b;
        --text-inverse: #0f172a;

        --border-default: #334155;
        --border-subtle: #1e293b;
        --border-strong: #475569;
        --border-color: #334155;

        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --ocean-blue: #3b82f6;
        --ocean-dark: #2563eb;
        --ocean-light: #1e3a5f;
        --coral-pop: #3b82f6;
        --coral-light: #1e3a5f;

        --success-bg: #14532d;
        --success-text: #86EFAC;
        --warning-bg: #451a03;
        --warning-text: #FCD34D;
        --error-bg: #450a0a;
        --error-text: #FCA5A5;
        --info-bg: #1E3A5F;
        --info-text: #93C5FD;

        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Manual dark mode toggle */
[data-theme="dark"],
.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-elevated: #1e293b;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;

    --border-default: #334155;
    --border-subtle: #1e293b;
    --border-strong: #475569;
    --border-color: #334155;

    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --ocean-blue: #3b82f6;
    --ocean-dark: #2563eb;
    --ocean-light: #1e3a5f;
    --coral-pop: #3b82f6;
    --coral-light: #1e3a5f;

    --success-bg: #14532d;
    --success-text: #86EFAC;
    --warning-bg: #451a03;
    --warning-text: #FCD34D;
    --error-bg: #450a0a;
    --error-text: #FCA5A5;
    --info-bg: #1E3A5F;
    --info-text: #93C5FD;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Manual light mode toggle - overrides system dark preference */
[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #FFFFFF;
    --bg-color: #F5F7FA;
    --card-bg: #FFFFFF;

    --text-primary: #2E3238;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    --border-default: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-strong: #cbd5e1;
    --border-color: #e2e8f0;

    --primary-color: #1E6BD6;
    --primary-hover: #1557a8;
    --ocean-blue: #1E6BD6;
    --ocean-dark: #1557a8;
    --ocean-light: #dbeafe;
    --coral-pop: #1E6BD6;
    --coral-light: #dbeafe;
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    margin-left: 80px; /* Make room for vertical sidebar */
}

/* ============================================
   Vertical Brand Sidebar
   ============================================ */
.vertical-brand-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 4px 0 12px rgba(30, 107, 214, 0.15);
}

.vertical-brand-sidebar .brand-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: white;
    letter-spacing: 3px;
    text-transform: uppercase;
    user-select: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-md);
    line-height: 1.2;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
    line-height: 1.25;
}

h3 {
    font-size: 20px;
    line-height: 1.3;
}

h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

h4 {
    font-size: 16px;
}

p {
    margin: 0 0 var(--space-md);
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-secondary) !important;
}

small, .text-small {
    font-size: 13px;
    line-height: 1.5;
}

.caption {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
}

code, .code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--card-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--snow) !important;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--snow) !important;
}

.navbar-nav .nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: var(--space-sm) var(--space-md) !important;
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease-out);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--snow) !important;
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Profile Dropdown
   ============================================ */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.profile-trigger:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

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

.profile-menu {
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    min-width: 280px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 100;
}

.profile-dropdown.active .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-base);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.profile-menu-item:hover {
    background: var(--bg-secondary);
}

.profile-menu-item.danger {
    color: var(--danger-color);
}

.profile-menu-item.danger:hover {
    background: var(--error-bg);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 107, 214, 0.2);
}

/* Primary Button - Blue */
.btn-primary {
    background: var(--primary-color);
    color: var(--snow);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: var(--snow);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    background: var(--cloud);
    color: var(--slate);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button - Gray */
.btn-secondary,
.btn-outline-primary {
    background: #64748b;
    color: var(--snow);
    border: none;
}

.btn-secondary:hover,
.btn-outline-primary:hover {
    background: #475569;
    color: var(--snow);
    transform: translateY(-1px);
}

/* Outline variant */
.btn-outline {
    background: var(--snow);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Success Button */
.btn-success {
    background: var(--accent-color);
    color: var(--snow);
}

.btn-success:hover {
    background: #1da89f;
    color: var(--snow);
    transform: translateY(-1px);
}

/* Ghost Button */
.btn-ghost,
.btn-outline-secondary {
    background: transparent;
    color: var(--slate);
    border: none;
}

.btn-ghost:hover,
.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--ink);
}

/* Danger Button */
.btn-danger,
.btn-outline-danger {
    background: var(--danger-color);
    color: var(--snow);
}

.btn-danger:hover,
.btn-outline-danger:hover {
    background: #dc2626;
    color: var(--snow);
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

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

.card-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-header h5 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-header h5 i {
    color: var(--primary-color);
}

.card-body {
    padding: var(--space-lg);
}

/* Success Card */
#result-card .card-header,
.card-header.bg-success {
    background: var(--accent-color) !important;
    color: var(--snow);
    border-bottom: none;
}

#result-card .card-header h5,
.card-header.bg-success h5 {
    color: var(--snow);
}

/* Error Card */
#error-card .card-header,
.card-header.bg-danger {
    background: var(--danger-color) !important;
    color: var(--snow);
    border-bottom: none;
}

/* ============================================
   Form Controls
   ============================================ */
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 14px;
}

.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: var(--space-md);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: all 0.2s var(--ease-out);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--border-strong);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 107, 214, 0.15);
    outline: none;
}

/* Light mode form control overrides */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

/* Dark mode form control overrides */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.input-group-text {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Range Slider */
.form-range {
    height: 8px;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s var(--ease-bounce);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* ============================================
   Dropzone
   ============================================ */
.dropzone {
    border: 2px dashed var(--primary-color) !important;
    border-radius: var(--radius-lg);
    background: var(--primary-light) !important;
    padding: var(--space-2xl);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.dropzone:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(35, 192, 183, 0.15) 100%) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dropzone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--space-md);
}

.dropzone p {
    margin: 0;
    text-align: center;
}

.dropzone .fw-bold {
    color: var(--ink);
    font-size: 16px;
}

.dropzone-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid;
    font-weight: 500;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.alert-danger {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: var(--warning-border);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: var(--info-border);
}

/* ============================================
   Badges/Tags
   ============================================ */
.badge {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.badge-plan {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.badge-free {
    background: var(--accent-color);
    color: var(--snow);
}

.badge-basic {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.badge-pro {
    background: var(--secondary-color);
    color: var(--snow);
}

.badge-business {
    background: var(--primary-color);
    color: var(--snow);
}

.bg-success {
    background: var(--accent-color) !important;
}

.bg-danger {
    background: var(--danger-color) !important;
}

/* ============================================
   Statistics Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--card-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3,
h3.mb-0 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-icon.total {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-icon.active {
    background: var(--success-bg);
    color: var(--success-color);
}

.stat-icon.inactive {
    background: var(--warning-bg);
    color: var(--warning-color);
}

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-card {
    transition: all 0.3s var(--ease-out);
}

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

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.pricing-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--snow);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.pricing-card .price {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-card .price small {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ============================================
   File List Items
   ============================================ */
.file-list-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all 0.2s var(--ease-out);
}

.file-list-item:hover {
    background: var(--primary-light);
}

.file-list-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-right: var(--space-md);
}

/* ============================================
   History Table
   ============================================ */
.history-table {
    font-size: 14px;
}

.history-table th {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding: var(--space-md);
}

.history-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-default);
    vertical-align: middle;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-full);
    transition: width 0.3s var(--ease-out);
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    color: var(--primary-color);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 9999;
}

.toast {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Image Preview
   ============================================ */
.img-preview,
.img-thumbnail {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-default);
}

/* ============================================
   Draggable Items
   ============================================ */
.draggable-item {
    cursor: grab;
    transition: all 0.2s var(--ease-out);
}

.draggable-item:active {
    cursor: grabbing;
}

.draggable-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-default);
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
}

footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
}

/* ============================================
   Links
   ============================================ */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

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

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ============================================
   Utilities
   ============================================ */
.bg-light {
    background: var(--bg-secondary) !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.hidden {
    display: none !important;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Accessibility - Skip Link
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: var(--space-sm) var(--space-md);
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    body {
        margin-left: 60px;
    }

    .vertical-brand-sidebar {
        width: 60px;
    }

    .vertical-brand-sidebar .brand-text {
        font-size: 20px;
        letter-spacing: 2px;
    }

    :root {
        --space-lg: 16px;
        --space-xl: 24px;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 18px; }

    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .card-body {
        padding: var(--space-md);
    }

    .dropzone {
        min-height: 150px;
        padding: var(--space-xl) !important;
    }

    .btn {
        padding: 10px 16px;
    }

    .btn-lg {
        padding: 12px 20px;
    }

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

@media (max-width: 480px) {
    body {
        margin-left: 50px;
    }

    .vertical-brand-sidebar {
        width: 50px;
    }

    .vertical-brand-sidebar .brand-text {
        font-size: 16px;
        letter-spacing: 1px;
    }
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(35, 192, 183, 0.2) 100%);
    display: flex;
    align-items: center;
    margin-left: 0; /* Override body margin for login page */
}

.login-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.brand-text-gradient {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
