:root {
    --pv-teal: #14b8a6;
    --pv-teal-light: #5eead4;
    --pv-teal-dark: #0d9488;
    --pv-gold: #d4af37;
    --pv-navy: #0f172a;

    --pv-success: #22c55e;
    --pv-warning: #eab308;
    --pv-danger: #ef4444;
    --pv-info: #3b82f6;

    --pv-approved: #22c55e;
    --pv-review: #eab308;
    --pv-rejected: #ef4444;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --sidebar-width: 260px;
    --topbar-height: 64px;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

[data-theme="dark"], :root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-strong: rgba(255, 255, 255, 0.1);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-sidebar: rgba(10, 10, 10, 0.95);

    --border-primary: rgba(255, 255, 255, 0.08);
    --border-secondary: rgba(255, 255, 255, 0.12);
    --border-focus: var(--pv-teal);

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-inverse: #0a0a0a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.15);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #f1f3f5;
    --bg-tertiary: #e9ecef;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-sidebar: rgba(255, 255, 255, 0.92);

    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(0, 0, 0, 0.15);
    --border-focus: var(--pv-teal);

    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-tertiary: #868e96;
    --text-inverse: #fafafa;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 24px rgba(20, 184, 166, 0.08);
}

*, *::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: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

[data-theme="dark"] body {
    background: var(--bg-primary);
}

[data-theme="light"] body {
    background: var(--bg-primary);
}

a { color: var(--pv-teal); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--pv-teal-light); }

img { max-width: 100%; height: auto; }

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-primary);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), width var(--transition-normal);
}
[data-theme="light"] .sidebar {
    box-shadow: 2px 0 20px rgba(0,0,0,0.04);
    border-right: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .topbar {
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .sidebar-nav a.active {
    background: rgba(20, 184, 166, 0.12);
}
[data-theme="light"] .card {
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
[data-theme="light"] .stat-card {
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .vault-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pv-teal), var(--pv-teal-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-glow);
}

.sidebar-brand h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-brand .subtitle {
    font-size: 11px;
    color: var(--pv-teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav .nav-section {
    margin-bottom: 24px;
}

.sidebar-nav .nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 0 12px 8px;
}

.sidebar-nav a, .sidebar-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sidebar-nav a:hover, .sidebar-nav button:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--pv-teal);
}

.sidebar-nav a.active i { color: var(--pv-teal); }

.sidebar-nav i { width: 20px; font-size: 18px; opacity: 0.7; flex-shrink: 0; }

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
}
.sidebar-collapse-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}
.sidebar-collapse-btn i {
    font-size: 16px;
    transition: transform var(--transition-normal);
}

.sidebar-collapsed .sidebar {
    width: 68px;
}
.sidebar-collapsed .sidebar-brand > div,
.sidebar-collapsed .sidebar-nav .nav-section-title,
.sidebar-collapsed .sidebar-nav a span,
.sidebar-collapsed .sidebar-nav button span,
.sidebar-collapsed .sidebar-legal,
.sidebar-collapsed .sidebar-brand .subtitle,
.sidebar-collapsed .sidebar-collapse-btn span {
    display: none;
}
.sidebar-collapsed .sidebar-brand {
    padding: 16px;
    justify-content: center;
}
.sidebar-collapsed .sidebar-nav {
    padding: 12px 10px;
}
.sidebar-collapsed .sidebar-nav a,
.sidebar-collapsed .sidebar-nav button {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
    position: relative;
}
.sidebar-collapsed .sidebar-nav a:hover::after,
.sidebar-collapsed .sidebar-nav button:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    pointer-events: none;
}
.sidebar-collapsed .sidebar-nav a i,
.sidebar-collapsed .sidebar-nav button i {
    margin: 0;
    width: auto;
}
.sidebar-collapsed .sidebar-nav .nav-section {
    margin-bottom: 8px;
}
.sidebar-collapsed .sidebar-footer {
    padding: 10px;
}
.sidebar-collapsed .sidebar-footer > div:first-child {
    justify-content: center;
    padding: 4px 0;
}
.sidebar-collapsed .sidebar-footer > div:first-child > div:last-child {
    display: none;
}
.sidebar-collapsed .sidebar-footer .avatar {
    border-radius: 50%;
}
.sidebar-collapsed .sidebar-collapse-btn {
    padding: 10px 0;
    justify-content: center;
}
.sidebar-collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}
.sidebar-collapsed .main-content {
    margin-left: 68px;
}
.sidebar-collapsed .main-content::before {
    left: 68px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-primary);
}
.sidebar-legal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 4px;
    font-size: 11px;
}
.sidebar-legal a {
    color: var(--text-tertiary);
}
.sidebar-legal a:hover {
    color: var(--pv-teal);
}
.sidebar-legal span {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    position: relative;
    transition: margin-left var(--transition-normal);
}
.main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 0%, rgba(20, 184, 166, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(20, 184, 166, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
[data-theme="light"] .main-content::before {
    background: radial-gradient(ellipse at 20% 0%, rgba(20, 184, 166, 0.05) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(20, 184, 166, 0.03) 0%, transparent 50%);
}
.main-content > * {
    position: relative;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.content-area {
    padding: 32px;
    max-width: 1400px;
    min-width: 0;
    overflow: hidden;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-secondary);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pv-teal), var(--pv-teal-light));
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

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

.stat-card .stat-change.positive { color: var(--pv-success); }
.stat-card .stat-change.negative { color: var(--pv-danger); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    line-height: 1.4;
}

.btn-primary {
    background: var(--pv-teal);
    color: white;
    border-color: var(--pv-teal);
}

.btn-primary:hover {
    background: var(--pv-teal-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-glass-strong);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--pv-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-gold {
    background: var(--pv-gold);
    color: #1a1a0a;
    font-weight: 600;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

.form-group {
    margin-bottom: 20px;
}

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

[data-theme="dark"] .form-input[type="date"],
[data-theme="dark"] .form-input[type="datetime-local"] {
    color-scheme: dark;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--pv-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

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

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--pv-danger);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
}

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

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-primary);
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

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

tr:hover td { background: var(--bg-glass); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.badge-active { background: rgba(34, 197, 94, 0.1); color: var(--pv-success); }
.badge-draft { background: rgba(59, 130, 246, 0.1); color: var(--pv-info); }
.badge-archived { background: rgba(161, 161, 170, 0.1); color: var(--text-tertiary); }
.badge-deleted { background: rgba(239, 68, 68, 0.1); color: var(--pv-danger); }
.badge-teal { background: rgba(20, 184, 166, 0.1); color: var(--pv-teal); }

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.pagination a:hover { background: var(--bg-glass); color: var(--text-primary); }
.pagination .active { background: var(--pv-teal); color: white; border-color: var(--pv-teal); }

.alert {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(34, 197, 94, 0.1); color: var(--pv-success); border: 1px solid rgba(34, 197, 94, 0.2); }
.alert-danger { background: rgba(239, 68, 68, 0.1); color: var(--pv-danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(234, 179, 8, 0.1); color: var(--pv-warning); border: 1px solid rgba(234, 179, 8, 0.2); }
.alert-info { background: rgba(59, 130, 246, 0.1); color: var(--pv-info); border: 1px solid rgba(59, 130, 246, 0.2); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-title { font-size: 18px; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 24px;
    gap: 4px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-sans);
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--pv-teal); border-bottom-color: var(--pv-teal); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle input:checked + .toggle-slider { background: var(--pv-teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

.notif-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-primary);
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pv-teal), var(--pv-teal-light));
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.storage-bar-fill.warning { background: linear-gradient(90deg, var(--pv-warning), #fbbf24); }
.storage-bar-fill.danger { background: linear-gradient(90deg, var(--pv-danger), #f87171); }

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

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-glass);
    color: var(--pv-teal);
}

.activity-text { font-size: 14px; color: var(--text-secondary); }
.activity-time { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; }

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-card {
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    background: var(--bg-card);
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
}
.gallery-card-body { flex: 1; }

.gallery-card:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-card-thumb {
    aspect-ratio: 16/10;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.gallery-card-body .dropdown { position: static; }
.gallery-card-body .dropdown-menu { position: absolute; right: 16px; bottom: auto; z-index: 10; }

.gallery-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.gallery-card-body { padding: 16px; }

.gallery-card-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }

.gallery-card-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 12px;
    align-items: center;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.theme-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle:hover { color: var(--pv-teal); border-color: var(--pv-teal); }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-primary);
    flex-shrink: 0;
}

.avatar-lg { width: 80px; height: 80px; }
.avatar-sm { width: 28px; height: 28px; }

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pv-teal), var(--pv-teal-dark));
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
}

.dropdown-menu.active { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-item:hover { background: var(--bg-glass); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-primary); margin: 4px 0; }

.upload-zone {
    border: 2px dashed var(--border-secondary);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--pv-teal);
    background: rgba(20, 184, 166, 0.05);
}

.upload-zone i { font-size: 48px; color: var(--pv-teal); margin-bottom: 16px; }

.progress {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pv-teal), var(--pv-teal-light));
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.mobile-menu-toggle { display: none; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .main-content::before { left: 0; }
    .mobile-menu-toggle { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .sidebar-collapse-btn { display: none; }
    .sidebar-collapsed .sidebar { width: var(--sidebar-width); }
    .sidebar-collapsed .main-content { margin-left: 0; }
    .sidebar-collapsed .main-content::before { left: 0; }
}

@media (max-width: 640px) {
    .content-area { padding: 16px; }
    .topbar { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
}

.text-teal { color: var(--pv-teal); }
.text-gold { color: var(--pv-gold); }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}
.error-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20,184,166,0.06) 0%, transparent 70%);
    top: -150px;
    right: -150px;
}
.error-container {
    text-align: center;
    max-width: 440px;
    padding: 40px;
    position: relative;
    z-index: 1;
}
.error-icon {
    width: 72px;
    height: 72px;
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.2);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pv-teal);
    font-size: 32px;
    margin-bottom: 24px;
}
.error-icon-warning {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
    color: var(--pv-danger);
}
.error-icon-muted {
    background: rgba(161,161,170,0.1);
    border-color: rgba(161,161,170,0.15);
    color: var(--text-tertiary);
}
.error-code {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1;
}
.error-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.error-message {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.error-btn {
    justify-content: center;
    min-width: 160px;
}

.ge-type-label {
    cursor: pointer;
    display: block;
}
.ge-type-card {
    text-align: center;
    padding: 16px;
    transition: all var(--transition-fast);
    cursor: pointer;
}
.ge-type-card:hover {
    border-color: var(--border-secondary);
    background: var(--bg-card-hover);
}
.ge-type-card.ge-type-active {
    border-color: var(--pv-teal);
    background: rgba(20, 184, 166, 0.1);
}
.ge-type-icon {
    font-size: 24px;
    color: var(--pv-teal);
    display: block;
    margin-bottom: 8px;
}
