/* ===================================
   TechPanel — Premium Dark Admin UI
   Design System & Complete Stylesheet
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========== CSS Variables ========== */
:root {
    /* Colors — Dark Theme */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-card-hover: #252838;
    --bg-input: #252838;
    --bg-sidebar: #151821;

    /* Accent Colors */
    --accent-primary: #6c5ce7;
    --accent-primary-hover: #7c6ef7;
    --accent-secondary: #00cec9;
    --accent-success: #00b894;
    --accent-warning: #fdcb6e;
    --accent-danger: #e17055;
    --accent-info: #74b9ff;

    /* Text colors */
    --text-primary: #e8e8f0;
    --text-secondary: #9ca3b4;
    --text-muted: #6c7289;
    --text-inverse: #0f1117;

    /* Borders */
    --border-color: #2a2d3a;
    --border-light: #353849;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.15);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-xs: 0.75rem;
    --font-sm: 0.8125rem;
    --font-base: 0.875rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.375rem;
    --font-2xl: 1.75rem;
    --font-3xl: 2.25rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* ========== Layout ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    overflow-y: auto;
}

.sidebar-brand {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--font-lg);
    color: #fff;
}

.sidebar-brand h2 {
    font-size: var(--font-lg);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    padding: var(--space-md) 0;
    flex: 1;
}

.nav-section {
    padding: var(--space-sm) var(--space-xl);
    margin-top: var(--space-md);
}

.nav-section-title {
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    color: var(--text-secondary);
    font-size: var(--font-base);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
    border-left-color: var(--accent-primary);
}

.nav-item.active {
    color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.12);
    border-left-color: var(--accent-primary);
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

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

/* ========== Topbar ========== */
.topbar {
    height: var(--topbar-height);
    background: rgba(15, 17, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 500;
}

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

.topbar-left h1 {
    font-size: var(--font-xl);
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-sm);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-menu:hover {
    background: var(--bg-card);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-sm);
    color: #fff;
}

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

.user-name {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ========== Content Area ========== */
.content-area {
    padding: var(--space-xl);
    flex: 1;
}

/* ========== Cards ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-header h3 {
    font-size: var(--font-lg);
    font-weight: 700;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(108, 92, 231, 0.3);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.purple { background: rgba(108, 92, 231, 0.15); color: var(--accent-primary); }
.stat-icon.teal { background: rgba(0, 206, 201, 0.15); color: var(--accent-secondary); }
.stat-icon.green { background: rgba(0, 184, 148, 0.15); color: var(--accent-success); }
.stat-icon.orange { background: rgba(225, 112, 85, 0.15); color: var(--accent-danger); }
.stat-icon.blue { background: rgba(116, 185, 255, 0.15); color: var(--accent-info); }
.stat-icon.yellow { background: rgba(253, 203, 110, 0.15); color: var(--accent-warning); }

.stat-details {
    flex: 1;
}

.stat-value {
    font-size: var(--font-2xl);
    font-weight: 800;
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* ========== Tables ========== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-secondary);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-base);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(108, 92, 231, 0.04);
}

/* ========== Badges ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    font-size: var(--font-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-new, .badge-created { background: rgba(108, 92, 231, 0.15); color: var(--accent-primary); }
.badge-contacted, .badge-assigned { background: rgba(116, 185, 255, 0.15); color: var(--accent-info); }
.badge-qualified, .badge-in_progress { background: rgba(253, 203, 110, 0.15); color: var(--accent-warning); }
.badge-converted, .badge-completed { background: rgba(0, 184, 148, 0.15); color: var(--accent-success); }
.badge-lost, .badge-revision { background: rgba(225, 112, 85, 0.15); color: var(--accent-danger); }
.badge-submitted { background: rgba(0, 206, 201, 0.15); color: var(--accent-secondary); }
.badge-active { background: rgba(0, 184, 148, 0.15); color: var(--accent-success); }
.badge-paused { background: rgba(253, 203, 110, 0.15); color: var(--accent-warning); }
.badge-sent { background: rgba(0, 184, 148, 0.15); color: var(--accent-success); }
.badge-failed { background: rgba(225, 112, 85, 0.15); color: var(--accent-danger); }
.badge-in_progress_learn { background: rgba(116, 185, 255, 0.15); color: var(--accent-info); }

.badge-admin { background: rgba(108, 92, 231, 0.15); color: var(--accent-primary); }
.badge-manager { background: rgba(0, 206, 201, 0.15); color: var(--accent-secondary); }
.badge-team { background: rgba(116, 185, 255, 0.15); color: var(--accent-info); }

/* ========== Forms ========== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-base);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236c7289' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.form-error {
    color: var(--accent-danger);
    font-size: var(--font-xs);
    margin-top: var(--space-xs);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #8b7cf7);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), #9b8cf7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    color: #fff;
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #2ed8a4);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), #f08b73);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 112, 85, 0.3);
    color: #fff;
}

.btn-sm {
    padding: 4px var(--space-md);
    font-size: var(--font-xs);
}

.btn-icon {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ========== Page Header ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.page-header h2 {
    font-size: var(--font-2xl);
    font-weight: 800;
}

.page-subtitle {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

/* ========== Filters ========== */
.filters-bar {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    align-items: end;
}

.filters-bar .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.search-input {
    position: relative;
}

.search-input .form-control {
    padding-left: 36px;
}

.search-input svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

/* ========== Alerts ========== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-sm);
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(225, 112, 85, 0.1);
    border: 1px solid rgba(225, 112, 85, 0.3);
    color: var(--accent-danger);
}

.alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    font-size: 1.2rem;
    padding: 0;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* ========== Modals ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    font-size: var(--font-lg);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
}

.modal-body {
    margin-bottom: var(--space-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ========== Skeleton Loading ========== */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.04),
        transparent
    );
    animation: shimmer 2s infinite;
}

.skeleton-text {
    height: 14px;
    margin-bottom: var(--space-sm);
    width: 100%;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: var(--space-md);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-md);
}

/* ========== Pagination ========== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
    gap: var(--space-xs);
}

.pagination-wrapper nav {
    display: flex;
    gap: 2px;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.pagination-wrapper a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.pagination-wrapper .active span {
    background: var(--accent-primary);
    color: #fff;
}

.pagination-wrapper svg {
    width: 16px;
    height: 16px;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.empty-state h3 {
    font-size: var(--font-lg);
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: var(--font-sm);
    margin-bottom: var(--space-lg);
}

/* ========== Detail View ========== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.detail-item {
    margin-bottom: var(--space-lg);
}

.detail-label {
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.detail-value {
    font-size: var(--font-base);
    color: var(--text-primary);
}

/* ========== Login Page ========== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    padding: var(--space-xl);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-header .brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--font-xl);
    color: #fff;
    margin: 0 auto var(--space-lg);
}

.login-header h1 {
    font-size: var(--font-2xl);
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.login-header p {
    color: var(--text-muted);
    font-size: var(--font-sm);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.remember-row input[type="checkbox"] {
    accent-color: var(--accent-primary);
}

.remember-row label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--font-md);
    justify-content: center;
    text-align: center;
}

/* ========== Animations ========== */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: var(--space-md);
    }

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filters-bar .form-group {
        width: 100%;
        min-width: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: var(--font-sm);
    }

    .data-table th,
    .data-table td {
        padding: var(--space-sm) var(--space-md);
    }

    .user-info {
        display: none;
    }
}

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mb-1 { margin-top: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-lg); }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ========== Dropzone / File Upload ========== */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-input);
    position: relative;
}

.dropzone:hover {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.04);
}

.dropzone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1), var(--shadow-glow);
    transform: scale(1.01);
}

.dropzone.has-file {
    border-style: solid;
    border-color: var(--accent-success);
    background: rgba(0, 184, 148, 0.04);
    padding: var(--space-lg) var(--space-xl);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.dropzone-icon {
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: var(--space-sm);
    transition: all var(--transition-base);
}

.dropzone:hover .dropzone-icon {
    color: var(--accent-primary);
    opacity: 0.8;
    transform: translateY(-4px);
}

.dropzone-text {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text-secondary);
}

.dropzone-hint {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.dropzone-browse {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dropzone-browse:hover {
    color: var(--accent-primary-hover);
}

.dropzone-formats {
    font-size: var(--font-xs);
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: var(--space-xs);
}

.dropzone-preview {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    text-align: left;
}

.preview-file-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(0, 184, 148, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-size {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.preview-remove {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.preview-remove:hover {
    background: rgba(225, 112, 85, 0.15);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}
