/* ============================================
   EDESON FOLDER LOCKER - Complete Stylesheet
   Blue & Yellow Branding | Dark/Light Mode
   ============================================ */

/* === CSS Custom Properties === */
:root {
    /* Primary Blue */
    --primary: #1565C0;
    --primary-hover: #1976D2;
    --primary-light: #BBDEFB;
    --primary-dark: #0D47A1;
    --primary-bg: rgba(21, 101, 192, 0.08);

    /* Accent Yellow */
    --accent: #FFC107;
    --accent-hover: #FFD54F;
    --accent-dark: #FF8F00;
    --accent-light: #FFF8E1;
    --accent-bg: rgba(255, 193, 7, 0.1);

    /* Neutrals */
    --bg: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-header: #FFFFFF;
    --bg-input: #F0F2F5;
    --border: #E0E4EA;
    --border-light: #ECEEF2;
    --text: #1A1D23;
    --text-secondary: #5F6B7A;
    --text-muted: #8D95A3;
    --text-on-primary: #FFFFFF;

    /* Status Colors */
    --success: #2E7D32;
    --success-bg: #E8F5E9;
    --error: #C62828;
    --error-bg: #FFEBEE;
    --warning: #E65100;
    --warning-bg: #FFF3E0;
    --info: #1565C0;
    --info-bg: #E3F2FD;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --footer-height: auto;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #42A5F5;
    --primary-hover: #64B5F6;
    --primary-light: rgba(66, 165, 245, 0.15);
    --primary-dark: #1E88E5;
    --primary-bg: rgba(66, 165, 245, 0.1);

    --accent: #FFD54F;
    --accent-hover: #FFE082;
    --accent-dark: #FFC107;
    --accent-light: rgba(255, 213, 79, 0.1);
    --accent-bg: rgba(255, 213, 79, 0.08);

    --bg: #0F1419;
    --bg-card: #1A2027;
    --bg-sidebar: #141A21;
    --bg-header: #141A21;
    --bg-input: #252D38;
    --border: #2C3440;
    --border-light: #232B35;
    --text: #E8ECF0;
    --text-secondary: #9CA7B5;
    --text-muted: #6B7785;

    --success: #4CAF50;
    --success-bg: rgba(76, 175, 80, 0.12);
    --error: #EF5350;
    --error-bg: rgba(239, 83, 80, 0.12);
    --warning: #FF9800;
    --warning-bg: rgba(255, 152, 0, 0.12);
    --info: #42A5F5;
    --info-bg: rgba(66, 165, 245, 0.12);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.2);
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    color: var(--text);
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* === Auth Overlay === */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1976D2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.auth-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    animation: slideUp 0.4s ease;
}

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

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
    text-align: center;
}

.auth-form-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 24px;
}

/* === Form Elements === */
.form-group {
    margin-bottom: 18px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--text);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-fill.strength-0 { width: 0; background: var(--border); }
.strength-fill.strength-1 { width: 25%; background: var(--error); }
.strength-fill.strength-2 { width: 50%; background: var(--warning); }
.strength-fill.strength-3 { width: 75%; background: var(--accent-dark); }
.strength-fill.strength-4 { width: 100%; background: var(--success); }

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
}

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

.btn-accent {
    background: var(--accent);
    color: #1A1D23;
}

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

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-danger {
    background: var(--error);
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #D32F2F;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* === App Shell === */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Header === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.sidebar-toggle:hover {
    background: var(--primary-bg);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    color: var(--primary);
    display: flex;
    align-items: center;
}

.header-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-app-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-dark);
    letter-spacing: 0.3px;
}

.header-right {
    flex-shrink: 0;
}

.ad-banner {
    width: 728px;
    height: 90px;
    max-width: 100%;
    background: linear-gradient(135deg, var(--bg-input), var(--border-light));
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.ad-banner small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
}

.header-lock-btn {
    flex-shrink: 0;
}

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 90;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.sidebar-logo {
    color: var(--primary);
}

.sidebar-nav {
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 20px;
}

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

/* === Main Content === */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 32px;
    flex: 1;
    min-height: calc(100vh - var(--header-height));
}

/* === Pages === */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

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

/* === Dashboard === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

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

.stat-locked .stat-icon {
    background: var(--info-bg);
    color: var(--info);
}

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

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

.stat-recent .stat-icon {
    background: var(--accent-bg);
    color: var(--accent-dark);
}

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

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.dashboard-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.empty-state-small {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 16px 0;
}

/* === Size Summary === */
.size-summary .size-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.size-summary .size-row:last-child {
    border-bottom: none;
}

/* === Activity Mini === */
.activity-mini .activity-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

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

.activity-mini-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-mini-dot.lock { background: var(--info); }
.activity-mini-dot.unlock { background: var(--success); }
.activity-mini-dot.hide { background: var(--warning); }
.activity-mini-dot.restore { background: var(--accent-dark); }
.activity-mini-dot.password { background: var(--error); }
.activity-mini-dot.default { background: var(--text-muted); }

/* === Select Folder === */
.select-folder-area {
    margin-bottom: 24px;
}

.folder-pick-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 2px dashed var(--border);
    transition: border-color var(--transition);
}

.folder-pick-card:hover {
    border-color: var(--primary);
}

.folder-pick-icon {
    color: var(--primary);
    margin-bottom: 16px;
}

.folder-pick-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.folder-pick-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.folder-pick-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--warning-bg);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-size: 0.825rem;
    text-align: left;
    margin: 16px auto;
    max-width: 480px;
}

.folder-pick-warning svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.folder-pick-card .btn {
    margin-top: 8px;
}

/* Selected Folder Info */
.selected-folder-info {
    margin-top: 24px;
}

.folder-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.folder-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.folder-detail-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-bg);
    color: var(--accent-dark);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-detail-header h3 {
    font-size: 1.15rem;
    word-break: break-word;
}

.folder-path {
    color: var(--text-muted);
    font-size: 0.8rem;
    word-break: break-all;
    margin-top: 2px;
}

.folder-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.folder-meta-item {
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.folder-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* === Search Bar === */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    margin-bottom: 16px;
    transition: border-color var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
}

.search-bar svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

/* === Filter Buttons === */
.folder-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

/* === Folder List === */
.folder-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.folder-list-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeIn 0.3s ease;
}

.folder-list-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.folder-list-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent-bg);
    color: var(--accent-dark);
}

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

.folder-list-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-list-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.folder-list-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-locked {
    background: var(--info-bg);
    color: var(--info);
}

.status-hidden {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-visible {
    background: var(--success-bg);
    color: var(--success);
}

.folder-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.folder-list-actions .btn-icon {
    width: 34px;
    height: 34px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* === Info Banner === */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--info-bg);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    color: var(--info);
    border-left: 3px solid var(--info);
}

.info-banner svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.info-banner p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* === Settings === */
.settings-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.settings-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.setting-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.setting-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.select-input {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.select-input:focus {
    border-color: var(--primary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 28px;
    transition: var(--transition);
}

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

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Danger Zone */
.danger-zone {
    border: 1px solid var(--error);
    border-left: 4px solid var(--error);
}

.danger-zone h3 {
    color: var(--error);
}

.danger-text {
    font-size: 0.875rem;
    color: var(--error);
    background: var(--error-bg);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

/* Backup Actions */
.backup-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* === Activity Log === */
.activity-actions {
    margin-bottom: 16px;
}

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    animation: fadeIn 0.3s ease;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.activity-dot.lock { background: var(--info); }
.activity-dot.unlock { background: var(--success); }
.activity-dot.hide { background: var(--warning); }
.activity-dot.restore { background: var(--accent-dark); }
.activity-dot.password { background: var(--error); }
.activity-dot.setup { background: var(--primary); }
.activity-dot.delete { background: var(--error); }
.activity-dot.default { background: var(--text-muted); }

.activity-info {
    flex: 1;
}

.activity-action {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.activity-folder {
    color: var(--primary);
}

.activity-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* === Help === */
.help-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.help-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    user-select: none;
    transition: background var(--transition);
}

.help-toggle:hover {
    background: var(--primary-bg);
}

.help-toggle .chevron {
    margin-left: auto;
    transition: transform var(--transition);
}

.help-toggle.open .chevron {
    transform: rotate(180deg);
}

.help-body {
    display: none;
    padding: 0 20px 20px 52px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.help-body.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

.help-body p {
    margin-bottom: 12px;
}

.help-body ul, .help-body ol {
    margin: 12px 0;
    padding-left: 20px;
}

.help-body li {
    margin-bottom: 6px;
}

.help-body strong {
    color: var(--text);
}

/* === About === */
.about-content {
    display: flex;
    justify-content: center;
}

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.about-logo {
    margin-bottom: 28px;
}

.about-logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.about-logo h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.about-version {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.about-details {
    text-align: left;
}

.about-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

.about-row:last-child {
    border-bottom: none;
}

.about-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.about-value {
    color: var(--text);
    font-size: 0.85rem;
    text-align: right;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--error-bg);
    color: var(--error);
}

.modal-body h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info);
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast.info .toast-icon {
    color: var(--info);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Footer === */
.app-footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #FFFFFF;
    padding: 24px 32px;
    text-align: center;
    margin-left: var(--sidebar-width);
    font-size: 0.85rem;
    line-height: 1.7;
}

.app-footer p {
    margin-bottom: 4px;
}

.app-footer a {
    color: var(--accent);
    font-weight: 600;
}

.app-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: #FFFFFF;
}

/* === Browser Compat Notice === */
.browser-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.browser-notice.warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-left: 3px solid var(--warning);
}

.browser-notice.info {
    background: var(--info-bg);
    color: var(--info);
    border-left: 3px solid var(--info);
}

.browser-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === Responsive Design === */

/* Tablet */
@media (max-width: 1024px) {
    .header-center {
        display: none;
    }

    .ad-banner {
        display: none;
    }

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

/* Mobile / Tablet */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }

    .header-left .header-title {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .app-footer {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .page-header h2 {
        font-size: 1.3rem;
    }

    .folder-pick-card {
        padding: 32px 20px;
    }

    .folder-list-item {
        flex-wrap: wrap;
    }

    .folder-list-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .folder-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        padding: 24px;
        margin: 10px;
    }

    .about-card {
        padding: 28px 20px;
    }

    .about-row {
        flex-direction: column;
        gap: 4px;
    }

    .about-value {
        text-align: left;
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    .toast {
        min-width: unset;
        max-width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
    }

    .folder-list-item {
        padding: 14px 16px;
    }

    .folder-detail-card {
        padding: 20px;
    }

    .settings-card {
        padding: 20px;
    }

    .auth-container {
        padding: 28px 24px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

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

/* High Contrast Support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #FFFFFF;
    }

    .nav-item.active {
        border-left-width: 4px;
    }

    .folder-list-item,
    .stat-card,
    .settings-card {
        border-width: 2px;
    }
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === Print === */
@media print {
    .app-header, .sidebar, .sidebar-overlay, .app-footer, .toast-container, .modal-overlay {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 20px;
    }
}

/* === Utility === */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* Color utility for activity types */
.color-locked { color: var(--info); }
.color-hidden { color: var(--warning); }
.color-visible { color: var(--success); }
.color-accent { color: var(--accent-dark); }
