/* ===== Resume Builder - Premium Dark Design System v5 ===== */
/* ===== Inspired by Apple's Design Language ===== */

/* ===== CSS Variables - Light ===== */
:root,
[data-theme="light"] {
    /* Primary - Pure Black Scale */
    --primary-50: #fafafa;
    --primary-100: #f5f5f5;
    --primary-200: #e5e5e5;
    --primary-300: #d4d4d4;
    --primary-400: #a3a3a3;
    --primary-500: #737373;
    --primary-600: #404040;
    --primary-700: #262626;
    --primary-800: #171717;
    --primary-900: #0a0a0a;
    
    /* Accent */
    --accent-500: #525252;
    --accent-600: #404040;
    --accent-700: #262626;
    
    /* Surface */
    --surface-50: #fafafa;
    --surface-100: #f5f5f5;
    --surface-200: #e5e5e5;
    --surface-300: #d4d4d4;
    --surface-400: #a3a3a3;
    --surface-500: #737373;
    --surface-600: #525252;
    --surface-700: #404040;
    --surface-800: #262626;
    --surface-900: #0a0a0a;
    
    /* Semantic */
    --success: #171717;
    --success-light: #f5f5f5;
    --danger: #171717;
    --danger-light: #f5f5f5;
    --warning: #171717;
    --warning-light: #f5f5f5;
    --info: #171717;
    --info-light: #f5f5f5;
    
    /* Mapped */
    --bg: #ffffff;
    --bg-alt: #f8f8f8;
    --bg-elevated: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #aeaeb2;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --hover-bg: #f5f5f7;
    --navbar-bg: rgba(251, 251, 253, 0.8);
    --card-bg: #ffffff;
    --dropdown-bg: #ffffff;
    --input-bg: #ffffff;
    
    /* Effects */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 0 1px rgba(0,0,0,0.05);
    --shadow-ring: 0 0 0 4px rgba(0,0,0,0.04);
    
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== CSS Variables - Dark (Apple-Inspired Premium) ===== */
[data-theme="dark"] {
    --primary-50: #1c1c1e;
    --primary-100: #2c2c2e;
    --primary-200: #3a3a3c;
    --primary-300: #48484a;
    --primary-400: #636366;
    --primary-500: #8e8e93;
    --primary-600: #c7c7cc;
    --primary-700: #e5e5ea;
    
    --surface-50: #1c1c1e;
    --surface-100: #1c1c1e;
    --surface-200: #2c2c2e;
    --surface-300: #3a3a3c;
    --surface-400: #48484a;
    --surface-500: #8e8e93;
    --surface-600: #c7c7cc;
    --surface-700: #e5e5ea;
    --surface-800: #f2f2f7;
    --surface-900: #ffffff;
    
    --success-light: #1c1c1e;
    --danger-light: #1c1c1e;
    --warning-light: #1c1c1e;
    --info-light: #1c1c1e;
    
    --bg: #000000;
    --bg-alt: #000000;
    --bg-elevated: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #48484a;
    --border: #2c2c2e;
    --border-light: #1c1c1e;
    --hover-bg: #1c1c1e;
    --navbar-bg: rgba(0, 0, 0, 0.72);
    --card-bg: #0d0d0d;
    --dropdown-bg: #1c1c1e;
    --input-bg: #0d0d0d;
    
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.6);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-ring: 0 0 0 4px rgba(255,255,255,0.03);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

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

img { max-width: 100%; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Navbar ===== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.nav-brand:hover { text-decoration: none; color: var(--text); }

.nav-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

#authNav {
    display: flex;
    align-items: center;
    gap: 12px;
}

#authNav .btn-primary {
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

#authNav .nav-link {
    white-space: nowrap;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text);
    background: var(--hover-bg);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 6px;
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 24px;
    }
    .nav-links.open { display: flex; }
    #authNav {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    #authNav .nav-link,
    #authNav .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    #authNav .lang-dropdown {
        width: 100%;
    }
    #authNav .lang-dd-btn {
        width: 100%;
        justify-content: center;
    }
}

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

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: white;
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 14px;
}
.btn-ghost:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #262626; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn-block { width: 100%; }

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}
.badge-primary { background: var(--primary-50); color: var(--primary-700); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }

/* ===== Form Controls ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control,
input[type="email"],
input[type="password"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--input-bg);
    transition: all var(--transition);
    font-family: inherit;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

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

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

/* ===== Cards ===== */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-slow);
}

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

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--surface-200);
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #d4d4d4;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #d4d4d4;
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid #d4d4d4;
}

/* ===== Divider ===== */
.divider {
    position: relative;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    position: relative;
    padding: 0 16px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== Hero Section ===== */
.hero {
    padding: 60px 24px 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-text { text-align: left; }

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 20px;
    letter-spacing: -0.025em;
}

.hero h1 .gradient-text,
.hero h1 .hero-highlight {
    color: var(--text);
    font-weight: 800;
    display: inline;
}

.hero p, .hero .hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 0 28px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid var(--primary-100);
}

.hero-badge svg { width: 14px; height: 14px; }

.hero-trust {
    display: flex; gap: 20px; flex-wrap: wrap;
}
.trust-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;
}
.trust-item svg { color: var(--success); flex-shrink: 0; }

/* --- Hero Visual / Resume Mockup --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resume-mockup {
    width: 280px;
    min-height: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    position: relative;
}

.mockup-accent {
    width: 6px;
    background: linear-gradient(180deg, #171717, #404040, #737373);
    flex-shrink: 0;
}

.mockup-body { padding: 20px 16px; flex: 1; }

.mockup-header-zone {
    display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start;
}
.mockup-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #171717, #404040);
    flex-shrink: 0;
}
.mockup-info { flex: 1; }

.mockup-line {
    height: 6px; border-radius: 3px; margin-bottom: 5px;
    background: #262626;
}
.mockup-line.light { background: #d4d4d4; }
.mockup-line.ml-name { width: 70%; height: 8px; background: #171717; margin-bottom: 4px; }
.mockup-line.ml-title { width: 50%; height: 5px; background: #171717; margin-bottom: 6px; }
.mockup-contact-row { display: flex; gap: 6px; }
.mockup-line.ml-contact { width: 28%; height: 4px; background: #a3a3a3; }
.mockup-line.ml-full { width: 100%; }
.mockup-line.ml-90 { width: 90%; }
.mockup-line.ml-85 { width: 85%; }
.mockup-line.ml-75 { width: 75%; }
.mockup-line.ml-70 { width: 70%; }
.mockup-line.ml-60 { width: 60%; }
.mockup-line.ml-50 { width: 50%; }

.mockup-section-zone { margin-bottom: 14px; }
.mockup-sec-title {
    width: 40%; height: 6px; background: #171717; border-radius: 3px;
    margin-bottom: 8px;
}
.mockup-exp-item { margin-bottom: 8px; }

.mockup-skills-row { display: flex; gap: 4px; flex-wrap: wrap; }
.mockup-skill-pill {
    width: 42px; height: 12px; border-radius: 6px;
    background: #e5e5e5;
}

/* ATS Score Badge */
.mockup-score-badge {
    position: absolute;
    top: -10px; right: -10px;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0,0.2), 0 1px 3px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    z-index: 2;
}
.score-ring { position: relative; width: 44px; height: 44px; }
.score-ring svg { width: 100%; height: 100%; }
.score-num {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: var(--text);
}
.score-label { font-size: 10px; font-weight: 600; color: var(--text-secondary); }

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text { text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .hero { padding: 48px 16px 36px; }
    .hero .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-trust { justify-content: center; }
    .hero-visual { margin-top: 20px; }
    .resume-mockup { width: 240px; min-height: 320px; }
}

/* ===== Stats Bar ===== */
.stats-bar {
    padding: 32px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-elevated);
}
.stats-row {
    display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.stat-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.9rem; color: var(--text-secondary);
}
.stat-icon {
    width: 40px; height: 40px; border-radius: var(--radius-lg);
    background: var(--primary-50); color: var(--primary-600);
    display: flex; align-items: center; justify-content: center;
}
.stat-item strong {
    font-size: 1.2rem; font-weight: 800; color: var(--text);
}
@media (max-width: 768px) {
    .stats-row { gap: 24px; }
}

/* ===== Features Section ===== */
.features { padding: 80px 0; }

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

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

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.feature-icon.icon-purple { background: var(--primary-50); color: var(--primary-600); }
.feature-icon.icon-green { background: var(--success-light); color: var(--success); }
.feature-icon.icon-blue { background: var(--info-light); color: var(--info); }
.feature-icon.icon-orange { background: var(--warning-light); color: var(--warning); }
.feature-icon.icon-pink { background: var(--primary-50); color: var(--primary-600); }
.feature-icon.icon-indigo { background: var(--primary-50); color: var(--primary-600); }

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Template Showcase ===== */
.templates-showcase { padding: 80px 0; }

.template-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.tpl-card {
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 16px;
    text-align: center;
    transition: all var(--transition-slow);
    cursor: pointer;
}

.tpl-card:hover {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-glow);
    transform: translateY(-6px);
}

.tpl-label {
    display: flex; flex-direction: column; gap: 2px; margin-top: 12px;
}
.tpl-label span {
    font-weight: 600; font-size: 0.9rem; color: var(--text);
}
.tpl-label small {
    font-size: 0.7rem; color: var(--primary-600); font-weight: 600;
}

/* --- Template Mini Previews (CSS Rendered) --- */
.tpl-mini {
    height: 240px;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 14px 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

[data-theme="dark"] .tpl-mini { background: #171717; border-color: #262626; }

.tm-header { margin-bottom: 10px; }
.tm-name {
    width: 55%; height: 7px; background: #171717; border-radius: 3px; margin-bottom: 4px;
}
[data-theme="dark"] .tm-name { background: #e5e5e5; }
.tm-sub {
    width: 40%; height: 4px; background: #171717; border-radius: 2px; margin-bottom: 6px;
}
.tm-contacts {
    display: flex; gap: 4px;
}
.tm-contacts span {
    width: 22%; height: 3px; background: #a3a3a3; border-radius: 2px;
}
.tm-sec { margin-bottom: 10px; }
.tm-sec-t {
    width: 35%; height: 5px; background: #171717; border-radius: 2px; margin-bottom: 6px;
}
.tm-sec-t.mt { margin-top: 8px; }
.tm-sec-t.cr { background: #525252; }
.tm-sec-t.tech { background: #171717; }
.tm-ln {
    height: 3px; background: #d4d4d4; border-radius: 2px; margin-bottom: 4px;
}
[data-theme="dark"] .tm-ln { background: #525252; }
.tm-ln.lt { background: #e5e5e5; }
[data-theme="dark"] .tm-ln.lt { background: #262626; }
.tm-ln.w100 { width: 100%; }
.tm-ln.w90 { width: 90%; }
.tm-ln.w85 { width: 85%; }
.tm-ln.w80 { width: 80%; }
.tm-ln.w75 { width: 75%; }
.tm-ln.w70 { width: 70%; }
.tm-ln.w60 { width: 60%; }
.tm-ln.w50 { width: 50%; }

/* ATS Clean: clean with green left border */
.tpl-ats-clean { border-left: 4px solid #171717; }

/* Modern: sidebar layout */
.tpl-modern-pv {
    display: flex; gap: 0; padding: 0;
}
.tm-sidebar {
    width: 35%; background: #171717; padding: 12px 8px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    display: flex; flex-direction: column; align-items: center;
}
[data-theme="dark"] .tm-sidebar { background: #0a0a0a; }
.tm-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #404040, #171717);
    margin-bottom: 8px;
}
.tm-ln.side { background: #525252; width: 80%; margin-bottom: 4px; }
.tm-pills { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.tm-pills span {
    width: 24px; height: 8px; border-radius: 4px; background: #525252;
}
.tm-main { flex: 1; padding: 12px 10px; }
.tm-name-m {
    width: 65%; height: 7px; background: #171717; border-radius: 3px; margin-bottom: 6px;
}
[data-theme="dark"] .tm-name-m { background: #e5e5e5; }

/* Executive: gold divider, serif feel */
.tm-header.exec .tm-name { width: 60%; height: 8px; }
.tm-divider.gold {
    height: 2px; background: linear-gradient(90deg, #404040, #737373); margin-bottom: 10px;
    border-radius: 1px;
}

/* Creative: top accent bar + pink headings */
.tm-top-bar {
    height: 6px; background: linear-gradient(90deg, #525252, #737373, #404040);
    margin: -14px -12px 10px; border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Tech: green accents + skill bars */
.tm-header.tech .tm-sub { background: #171717; }
.tm-bars { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.tm-bar {
    height: 5px; border-radius: 3px; background: #e5e5e5;
    position: relative; overflow: hidden;
}
.tm-bar::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0;
    width: var(--w, 80%); background: #171717; border-radius: 3px;
}
[data-theme="dark"] .tm-bar { background: #262626; }

/* Minimal: thin line separator */
.tm-thin-line {
    height: 1px; background: #e5e5e5; margin-bottom: 10px;
}
[data-theme="dark"] .tm-thin-line { background: #262626; }
.tpl-minimal-pv .tm-name { background: #525252; }
[data-theme="dark"] .tpl-minimal-pv .tm-name { background: #a3a3a3; }
.tpl-minimal-pv .tm-sub { background: #a3a3a3; }

@media (max-width: 640px) {
    .template-carousel { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .tpl-mini { height: 180px; padding: 10px 8px; }
}

/* ===== CTA Section ===== */
.cta {
    text-align: center;
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--primary-50), #fafafa, var(--primary-50));
    border-radius: var(--radius-2xl);
    margin: 40px 24px;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

.cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta p { color: var(--text-secondary); margin-bottom: 28px; font-size: 1.05rem; }

/* ===== Auth Pages ===== */
.auth-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-alt);
}

/* Hide navbar/footer on auth pages */
.auth-layout .navbar,
.auth-layout .footer { display: none; }

/* --- Branding Panel (left) --- */
.auth-branding {
    display: none;
    width: 50%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-700), var(--accent-600), var(--primary-900));
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    filter: blur(60px);
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    filter: blur(80px);
}

@media (min-width: 1024px) {
    .auth-branding { display: flex; }
}

.auth-brand-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    height: 100%;
    overflow-y: auto;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
}

.auth-brand-logo svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.auth-brand-logo span {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
}

.auth-brand-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 12px;
}

.auth-brand-content > p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 380px;
}

/* auth feature items */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    list-style: none;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-feature-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.auth-feature-icon svg {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.9);
    stroke: rgba(255,255,255,0.9);
}

.auth-feature-item strong {
    display: block;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-feature-item span {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

/* also support <li> in .auth-features */
.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.auth-features li svg {
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

/* --- Form Panel (right) --- */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 24px;
    min-height: 100vh;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-card-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Google Button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-google:hover {
    background: var(--surface-50);
    border-color: var(--surface-300);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-google:active { transform: translateY(0); }

.btn-google svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Auth form inputs */
.auth-form .form-group {
    margin-bottom: 18px;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-link {
    font-size: 0.8rem;
    color: var(--primary-600);
    font-weight: 500;
}

.form-link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    padding-left: 42px;
    padding-right: 42px;
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

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

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

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Password strength */
.password-strength {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--surface-200);
    border-radius: 2px;
    overflow: hidden;
}

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

.strength-text {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Button full width */
.btn-full {
    width: 100%;
    justify-content: center;
}

.btn .btn-text { }

.btn .btn-loader {
    display: inline-flex;
    align-items: center;
}

.btn .btn-loader svg {
    width: 20px;
    height: 20px;
}

/* Form error */
.form-error {
    font-size: 0.82rem;
    color: var(--danger);
    background: var(--danger-light);
    border: 1px solid #d4d4d4;
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 16px;
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-600);
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Spinner animation */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Nav User Menu ===== */
.nav-user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-avatar-btn:hover { opacity: 0.85; }

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: var(--dropdown-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    animation: fadeIn 0.15s ease;
}

.nav-dropdown.open { display: block; }

.nav-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.nav-dropdown-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.nav-dropdown-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

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

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

.nav-dropdown-danger:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* Dropdown sections (theme & language) */
.nav-dropdown-section {
    padding: 8px 16px;
}

.nav-dropdown-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.nav-dropdown-theme-row {
    display: flex;
    gap: 4px;
    background: var(--hover-bg);
    border-radius: var(--radius);
    padding: 3px;
}

.nav-theme-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

.nav-theme-btn:hover {
    color: var(--text);
}

.nav-theme-btn.active {
    background: var(--bg-elevated);
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

.nav-dropdown-lang-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-dropdown-lang-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.nav-dropdown-lang-btn:hover {
    border-color: var(--primary-400);
    color: var(--text);
}

.nav-dropdown-lang-btn.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* ===== Dashboard ===== */
.dashboard-page {
    padding: 40px 0 60px;
    min-height: calc(100vh - 68px);
}

.dash-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 36px;
    gap: 16px;
}

.dash-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.dash-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-create {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-weight: 600;
}

/* Resume grid — resume.io style */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* Resume card */
.dash-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.dash-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
    transform: translateY(-3px);
}

/* Card preview area — compact resume preview */
.dash-card-preview {
    position: relative;
    aspect-ratio: 4 / 3;
    padding: 16px 14px;
    overflow: hidden;
}

.dash-card-tpl-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpl-line {
    border-radius: 3px;
    height: 8px;
}

.tpl-line-title { width: 55%; height: 12px; }
.tpl-line-sub { width: 40%; height: 6px; margin-bottom: 4px; }
.tpl-line-full { width: 100%; }
.tpl-line-half { width: 50%; }
.tpl-line-3q { width: 75%; }
.tpl-line-name { font-size: 12px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 3px; color: #1a1a1a; line-height: 1.3; }
.tpl-line-email { font-size: 8px; color: #737373; margin-bottom: 4px; }
.tpl-line-role { font-size: 8px; font-weight: 600; color: #404040; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.tpl-line-summary { font-size: 7px; color: #525252; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Hover overlay */
.dash-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.dash-card:hover .dash-card-overlay { opacity: 1; }

/* Card info */
.dash-card-info {
    padding: 14px 16px 8px;
}

.dash-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.dash-card-template {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
}

.dash-card-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.dash-card-stats {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.dash-stat {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: var(--radius);
}

/* Action buttons row */
.dash-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding: 4px 12px 12px;
}

.dash-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.dash-action-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.dash-action-danger:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* --- Selection Mode --- */
.dash-select-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; margin-bottom: 16px;
    background: var(--bg-elevated); border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg); gap: 12px;
}
.dash-select-info { display: flex; align-items: center; gap: 12px; }
.dash-select-count { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.dash-select-actions { display: flex; align-items: center; gap: 8px; }

.dash-card-checkbox {
    position: absolute; top: 8px; left: 8px; z-index: 12;
    display: none; cursor: pointer;
}
.dash-selecting .dash-card-checkbox { display: block; }
.dash-select-cb { display: none; }
.dash-cb-mark {
    width: 22px; height: 22px; border-radius: 4px;
    border: 2px solid var(--border); background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
}
.dash-cb-mark svg { display: none; }
.dash-select-cb:checked + .dash-cb-mark {
    background: var(--primary-600); border-color: var(--primary-600);
}
.dash-select-cb:checked + .dash-cb-mark svg {
    display: block; color: #fff;
}
.dash-selecting .dash-card {
    cursor: pointer;
}
.dash-selecting .dash-card.dash-card-selected {
    outline: 2px solid var(--primary-500);
    outline-offset: -2px;
}

.btn-select-mode {
    gap: 6px; font-size: 13px;
}

/* New resume card */
.dash-card-new {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.dash-card-new:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    transform: translateY(-3px);
}

.dash-card-new-inner {
    text-align: center;
    color: var(--text-muted);
}

.dash-card-new:hover .dash-card-new-inner { color: var(--primary-600); }

.dash-card-new-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: var(--surface-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.dash-card-new:hover .dash-card-new-icon {
    background: var(--primary-100);
}

.dash-card-new-inner span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Empty state */
.dash-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
}

.dash-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-50);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-400);
}

.dash-empty h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.dash-empty p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.dash-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.dash-loading .spinner {
    margin: 0 auto 12px;
    border-color: var(--primary-200);
    border-top-color: var(--primary-600);
    width: 28px;
    height: 28px;
}

/* ===== Admin ===== */
.admin-page {
    padding: 40px 0 60px;
    min-height: calc(100vh - 68px);
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
}

.admin-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Admin stat cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    transition: all var(--transition);
}

.admin-stat-card:hover { box-shadow: var(--shadow-md); }

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

.admin-stat-blue { background: var(--primary-50); color: var(--primary-600); }
.admin-stat-purple { background: var(--primary-50); color: var(--primary-600); }
.admin-stat-green { background: var(--primary-50); color: var(--primary-600); }
.admin-stat-amber { background: var(--primary-50); color: var(--primary-600); }

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 500;
}

/* Admin section */
.admin-section { margin-bottom: 32px; }

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.admin-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    min-width: 220px;
    color: var(--text-muted);
}

.admin-search input {
    border: none;
    outline: none;
    background: none;
    font-size: 0.85rem;
    color: var(--text);
    width: 100%;
    font-family: inherit;
}

.admin-search input::placeholder { color: var(--text-muted); }

.admin-table-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

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

.admin-table th {
    background: var(--surface-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-50); }

.admin-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 32px !important;
}

/* User cell with avatar */
.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-400), var(--accent-500));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-user-name {
    font-weight: 600;
    font-size: 0.88rem;
}

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

/* Admin action buttons */
.admin-actions {
    display: flex;
    gap: 4px;
}

.admin-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.admin-action-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.admin-action-danger:hover {
    color: var(--danger);
    background: var(--danger-light);
}

@media (max-width: 768px) {
    .dash-welcome { flex-direction: column; }
    .dash-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .admin-section-header { flex-direction: column; align-items: stretch; }
    .admin-search { min-width: unset; }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .admin-user-avatar { width: 30px; height: 30px; font-size: 0.65rem; }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border-light);
    margin-top: 60px;
}

.footer a { color: var(--primary-600); font-weight: 500; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ===== Spinner ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== AI Score Badge ===== */
.dash-card-score {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.dash-card-score.score-high {
    background: rgba(255, 255, 255, 0.85);
    color: #171717;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.dash-card-score.score-mid {
    background: rgba(255, 255, 255, 0.85);
    color: #525252;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.dash-card-score.score-low {
    background: rgba(255, 255, 255, 0.85);
    color: #737373;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* ===== AI Score Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.15s ease;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.2s ease;
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

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

.modal-body {
    padding: 24px;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    font-weight: 800;
    border: 4px solid;
}

.score-circle.high { border-color: var(--text); color: var(--text); }
.score-circle.mid { border-color: var(--text-secondary); color: var(--text-secondary); }
.score-circle.low { border-color: var(--text-muted); color: var(--text-muted); }

.score-circle span {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: -4px;
}

.score-issues {
    list-style: none;
    padding: 0;
    margin: 0;
}

.score-issue {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.score-issue:last-child { border-bottom: none; }

.score-issue-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.score-issue-icon.critical { background: var(--danger-light); color: var(--danger); }
.score-issue-icon.warning { background: var(--warning-light); color: var(--warning); }
.score-issue-icon.info { background: var(--info-light); color: var(--info); }

.score-issue-text {
    flex: 1;
}

.score-issue-text h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.score-issue-text p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.score-issue-fix {
    flex-shrink: 0;
}

.score-issue-fix .btn {
    font-size: 0.72rem;
    padding: 4px 10px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== Settings Page ===== */
.settings-page {
    padding: 40px 0 60px;
    min-height: calc(100vh - 68px);
}

.settings-page .container {
    max-width: 960px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
}

.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

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

.settings-row-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.settings-row-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-row-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.settings-linked {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--success);
    font-weight: 500;
}

.settings-linked svg {
    width: 16px;
    height: 16px;
}

/* Theme toggle row */
.theme-toggle-group {
    display: flex;
    gap: 4px;
    background: var(--hover-bg);
    border-radius: var(--radius);
    padding: 3px;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
    font-family: inherit;
}

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

.theme-toggle-btn.active {
    background: var(--bg-elevated);
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

/* ===== Cover Letters Page ===== */
.cover-letters-page {
    padding: 40px 0 60px;
    min-height: calc(100vh - 68px);
}

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

.cl-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.cl-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
    transform: translateY(-2px);
}

.cl-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-50);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.cl-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cl-card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cl-card-new {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.cl-card-new:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

/* ===== RTL Support ===== */
[dir="rtl"] .nav-dropdown { right: auto; left: 0; }
[dir="rtl"] .dash-card-score { right: auto; left: 10px; }
[dir="rtl"] .score-issue { flex-direction: row-reverse; }
[dir="rtl"] .settings-row { flex-direction: row-reverse; }
[dir="rtl"] .nav-brand { flex-direction: row-reverse; }


/* ================================================================ */
/* ===== EDITOR PAGE                                          ===== */
/* ================================================================ */

.editor-body { overflow: hidden; }
.editor-body .navbar { display: none; }
.editor-body main { height: calc(100vh - 52px); overflow: hidden; padding: 0; margin: 0; }

/* --- Editor Navbar (V1 removed — see V2 .ed-navbar-v2 below) --- */

/* --- Editor Layout --- */
.ed-layout { display: flex; height: 100%; overflow: hidden; }

/* --- Form Panel --- */
.ed-form-panel {
    width: 420px; min-width: 320px; max-width: 480px;
    border-right: 1px solid var(--border);
    background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
}
.ed-form-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.ed-form-scroll::-webkit-scrollbar { width: 4px; }
.ed-form-scroll::-webkit-scrollbar-track { background: transparent; }
.ed-form-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* --- Sections --- */
.ed-section { margin-bottom: 6px; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; background: var(--card-bg); }
.ed-section-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; cursor: pointer; user-select: none;
    transition: background var(--transition);
}
.ed-section-header:hover { background: var(--hover-bg); }
.ed-section-header h3 { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; margin: 0; }
.ed-section-chevron { transition: transform var(--transition); color: var(--text-muted); flex-shrink: 0; }
.ed-section.collapsed .ed-section-chevron { transform: rotate(-90deg); }
.ed-section.collapsed .ed-section-body { display: none; }
.ed-section-body { padding: 4px 12px 12px; }

/* --- Fields --- */
.ed-field { flex: 1; min-width: 0; }
.ed-field label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.ed-field input, .ed-field textarea, .ed-field select {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--input-bg); color: var(--text);
    font-size: 13px; font-family: inherit;
    transition: border-color var(--transition);
}
.ed-field input:focus, .ed-field textarea:focus, .ed-field select:focus {
    outline: none; border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(0, 0, 0,0.08);
}
.ed-field textarea { resize: vertical; min-height: 60px; }
.ed-select { appearance: auto; }
.ed-field-row { margin-bottom: 10px; }
.ed-field-row-2 { display: flex; gap: 10px; }

/* --- Photo Upload --- */
.ed-photo-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ed-photo-preview {
    width: 72px; height: 72px; border-radius: 50%;
    border: 2px dashed var(--border); display: flex; flex-direction: column;
    align-items: center; justify-content: center; cursor: pointer;
    overflow: hidden; transition: border-color var(--transition);
    flex-shrink: 0; background: var(--hover-bg);
}
.ed-photo-preview:hover { border-color: var(--primary-400); }
.ed-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.ed-photo-label { font-size: 9px; color: var(--text-muted); margin-top: 2px; }
.ed-photo-actions { display: flex; flex-direction: column; gap: 4px; }
.ed-photo-remove {
    font-size: 11px; color: var(--danger); background: none;
    border: none; cursor: pointer; padding: 4px 8px; border-radius: var(--radius);
}
.ed-photo-remove:hover { background: var(--danger-light); }

/* --- Entry Cards --- */
.ed-entry { border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 6px; background: var(--bg); overflow: hidden; }
.ed-entry-header {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 10px; cursor: pointer; user-select: none;
    background: var(--hover-bg); border-bottom: 1px solid var(--border-light);
}
.ed-entry-header:hover { background: var(--surface-100); }
.ed-entry-grip { cursor: grab; color: var(--text-muted); padding: 2px; display: flex; font-size: 12px; }
.ed-entry-grip:active { cursor: grabbing; }
.ed-entry-title { flex: 1; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-entry-actions { display: flex; gap: 2px; }
.ed-entry-action {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: none; background: transparent;
    color: var(--text-muted); border-radius: var(--radius); cursor: pointer;
    font-size: 12px; transition: all var(--transition);
}
.ed-entry-action:hover { background: var(--bg); color: var(--text); }
.ed-entry-action.danger:hover { color: var(--danger); background: var(--danger-light); }
.ed-entry-body { padding: 10px; }
.ed-entry.collapsed .ed-entry-body { display: none; }
.ed-entry.collapsed .ed-entry-header { border-bottom: none; }

/* --- Add Button --- */
.ed-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    width: 100%; padding: 8px; border: 1px dashed var(--border);
    border-radius: var(--radius); background: transparent;
    color: var(--text-secondary); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all var(--transition); margin-top: 4px;
}
.ed-add-btn:hover { border-color: var(--primary-400); color: var(--primary-600); background: var(--primary-50); }

/* --- Bullet Points --- */
.ed-bullet { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.ed-bullet-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary-400); margin-top: 11px; flex-shrink: 0; }
.ed-bullet input { flex: 1; }
.ed-bullet-remove {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: none; background: transparent;
    color: var(--text-muted); border-radius: var(--radius); cursor: pointer;
    flex-shrink: 0; margin-top: 4px; font-size: 11px;
}
.ed-bullet-remove:hover { color: var(--danger); }

/* --- Custom Links --- */
.ed-custom-link { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-end; }
.ed-custom-link .ed-field { flex: 1; }
.ed-custom-link-remove {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border: none; background: transparent;
    color: var(--text-muted); border-radius: var(--radius); cursor: pointer;
    flex-shrink: 0; margin-bottom: 1px; font-size: 12px;
}
.ed-custom-link-remove:hover { color: var(--danger); }

/* --- Side Panel (Reorder / Template / Import) --- */
.ed-side-panel {
    width: 280px; border-right: 1px solid var(--border);
    background: var(--bg); display: flex; flex-direction: column;
    overflow: hidden;
}
.ed-side-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border-light);
}
.ed-side-panel-header h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 0; }
.ed-panel-close {
    border: none; background: transparent; color: var(--text-muted);
    font-size: 20px; cursor: pointer; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; border-radius: var(--radius);
}
.ed-panel-close:hover { background: var(--hover-bg); color: var(--text); }
.ed-side-panel-body { flex: 1; overflow-y: auto; padding: 14px; }

/* --- Import Panel --- */
.ed-import-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.ed-import-dropzone {
    border: 2px dashed var(--border); border-radius: var(--radius-md);
    padding: 28px 16px; text-align: center; cursor: pointer;
    transition: all var(--transition); display: flex; flex-direction: column;
    align-items: center; gap: 6px;
}
.ed-import-dropzone:hover { border-color: var(--primary-400); background: var(--primary-50); }
.ed-import-dropzone.dragover { border-color: var(--primary-500); background: var(--primary-50); }
.ed-import-dropzone-text { font-size: 13px; font-weight: 500; color: var(--text); }
.ed-import-dropzone-sub { font-size: 11px; color: var(--text-muted); }
.ed-import-status {
    margin-top: 12px; padding: 10px 12px; border-radius: var(--radius);
    font-size: 12px; line-height: 1.5;
}
.ed-import-status.loading { background: var(--info-light); color: var(--info); }
.ed-import-status.success { background: var(--success-light); color: var(--success); }
.ed-import-status.error { background: var(--danger-light); color: var(--danger); }
.ed-import-divider {
    display: flex; align-items: center; gap: 12px; margin: 18px 0;
    color: var(--text-muted); font-size: 11px; text-transform: uppercase;
}
.ed-import-divider::before, .ed-import-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.ed-import-linkedin-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px; border: 1px solid var(--border); border-radius: var(--radius);
    background: transparent; color: var(--text); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.ed-import-linkedin-btn:hover { background: var(--text); color: var(--bg); }
.ed-import-linkedin-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.ed-import-linkedin-textarea {
    width: 100%; margin-top: 10px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--input-bg); color: var(--text);
    font-size: 12px; font-family: monospace; resize: vertical;
}

/* --- Reorder Items --- */
.ed-reorder-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border: 1px solid var(--border-light);
    border-radius: var(--radius); margin-bottom: 4px;
    background: var(--card-bg); cursor: grab; user-select: none;
    font-size: 13px; font-weight: 500; color: var(--text);
    transition: all var(--transition);
}
.ed-reorder-item:active { cursor: grabbing; box-shadow: var(--shadow-md); }
.ed-reorder-item:hover { border-color: var(--primary-300); }
.ed-reorder-item.dragging { opacity: 0.5; border-color: var(--primary-400); background: var(--primary-50); }
.ed-reorder-grip { color: var(--text-muted); display: flex; }

/* --- Template Grid --- */
.ed-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-template-card {
    border: 2px solid var(--border-light); border-radius: var(--radius);
    padding: 14px 8px; text-align: center; cursor: pointer;
    transition: all var(--transition); background: var(--card-bg);
}
.ed-template-card:hover { border-color: var(--primary-300); }
.ed-template-card.active { border-color: var(--primary-500); background: var(--primary-50); }
.ed-template-card-icon { font-size: 28px; margin-bottom: 6px; }
.ed-template-card-name { font-size: 11px; font-weight: 600; color: var(--text); }
.ed-template-card-badge { font-size: 9px; color: var(--primary-600); font-weight: 600; margin-top: 2px; }

/* --- Preview Panel --- */
.ed-preview-panel {
    flex: 1; background: var(--surface-100);
    display: flex; flex-direction: column; overflow: hidden; min-width: 0;
}
.ed-preview-toolbar {
    display: flex; align-items: center; justify-content: center;
    padding: 6px 12px; border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}
.ed-zoom-controls { display: flex; align-items: center; gap: 8px; }
.ed-zoom-btn {
    width: 28px; height: 28px; border: 1px solid var(--border);
    background: var(--card-bg); color: var(--text); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; font-weight: 600;
}
.ed-zoom-btn:hover { background: var(--hover-bg); }
#zoomLevel { font-size: 12px; font-weight: 500; color: var(--text-secondary); min-width: 36px; text-align: center; }
.ed-preview-scroll { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 24px; }
.ed-preview-pages { display: flex; flex-direction: column; align-items: center; gap: 20px; flex-shrink: 0; }
.ed-preview-page {
    width: 210mm; min-height: 297mm; background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1); border-radius: 2px;
    flex-shrink: 0; color: #1a1a1a; position: relative;
    overflow: visible; page-break-after: always;
}
#previewContent {
    padding: 20mm 20mm; font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 10pt; line-height: 1.5;
}

/* --- Preview Template Styles --- */
#previewContent h1 { font-size: 22pt; margin: 0 0 2px; font-weight: 700; color: #1a1a1a; }
#previewContent .pv-contact { font-size: 8.5pt; color: #6b7280; margin-bottom: 6px; word-break: break-word; }
#previewContent .pv-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; float: right; margin: 0 0 8px 12px; border: 2px solid #e5e7eb; }
#previewContent h2 {
    font-size: 10pt; text-transform: uppercase; letter-spacing: 1.5px;
    border-bottom: 1.5px solid #111; padding-bottom: 3px;
    margin: 14px 0 8px; font-weight: 700; color: #1a1a1a;
}
#previewContent .pv-entry { margin-bottom: 8px; }
#previewContent .pv-entry-header { display: flex; justify-content: space-between; align-items: baseline; }
#previewContent .pv-entry-title { font-weight: 700; font-size: 10pt; color: #1a1a1a; }
#previewContent .pv-entry-date { font-size: 8.5pt; color: #6b7280; white-space: nowrap; }
#previewContent .pv-entry-sub { font-style: italic; color: #4b5563; font-size: 9pt; }
#previewContent .pv-entry-desc { font-size: 9.5pt; margin-top: 2px; color: #374151; }
#previewContent .pv-bullets { margin: 3px 0 0 16px; padding: 0; }
#previewContent .pv-bullets li { font-size: 9.5pt; color: #374151; margin-bottom: 1px; }
#previewContent .pv-skills { display: flex; flex-wrap: wrap; gap: 4px; }
#previewContent .pv-skill { background: #f3f4f6; padding: 1px 8px; border-radius: 3px; font-size: 8.5pt; color: #374151; }
#previewContent .pv-summary { font-size: 9.5pt; color: #374151; margin-bottom: 8px; line-height: 1.6; }
#previewContent .pv-link { color: #0a0a0a; text-decoration: none; font-size: 8.5pt; }
#previewContent .pv-custom-field { font-size: 9.5pt; margin-bottom: 3px; }
#previewContent .pv-custom-field strong { color: #1a1a1a; }

/* --- Accent Bar --- */
#previewContent .pv-accent-bar {
    margin: -20mm -20mm 14px;
    height: 5px;
}

/* --- Skills Compact Grid --- */
#previewContent .pv-skills-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 16px;
    margin-top: 4px;
}
#previewContent .pv-skill-group {
    font-size: 9pt;
    line-height: 1.5;
}
#previewContent .pv-skill-cat {
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 4px;
}
#previewContent .pv-skill-cat::after { content: ': '; }
#previewContent .pv-skill-list {
    color: #4b5563;
}

/* --- Languages --- */
#previewContent .pv-languages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-top: 4px;
}
#previewContent .pv-lang-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9pt;
    padding: 2px 0;
}
#previewContent .pv-lang-name {
    font-weight: 600;
    color: #1a1a1a;
}
#previewContent .pv-lang-dots {
    font-size: 7pt;
    color: #171717;
    letter-spacing: 2px;
}
#previewContent .pv-lang-level {
    color: #6b7280;
    font-size: 8pt;
    margin-left: auto;
}

/* --- Page Spacer --- */
#previewContent .pv-page-spacer {
    pointer-events: none;
}

/* --- Page Number & Multi-page --- */
.ed-page-number {
    position: absolute; right: 14px;
    font-size: 9px; color: #9ca3af; font-family: Arial, sans-serif;
    pointer-events: none; letter-spacing: 0.3px; z-index: 6;
}
.ed-page-break {
    position: absolute; left: 0; right: 0; height: 0; z-index: 5; pointer-events: none;
    border-top: 2px dashed var(--primary-400, #404040);
    box-shadow: 0 0 8px rgba(0, 0, 0,0.25);
}
.ed-page-gap {
    position: absolute; left: -12px; right: -12px; z-index: 4; pointer-events: none;
    background: var(--surface-100, #f5f5f5);
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
    border-top: 1px dashed var(--border-light, #d4d4d4);
    border-bottom: 1px dashed var(--border-light, #d4d4d4);
}
.ed-page-gap::before {
    content: 'PAGE BREAK'; font-size: 8px; color: var(--text-muted, #a3a3a3);
    letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
}

/* --- Photo Enhancement Menu --- */
.ed-photo-enhance-wrap { position: relative; display: inline-block; }
.ed-photo-menu {
    position: absolute; top: 100%; left: 0; z-index: 200;
    min-width: 180px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 4px 0; margin-top: 4px;
}
.ed-photo-menu button {
    display: block; width: 100%; text-align: left;
    padding: 7px 14px; font-size: 12px; font-weight: 500;
    background: none; border: none; color: var(--text);
    cursor: pointer; transition: background var(--transition);
}
.ed-photo-menu button:hover { background: var(--hover-bg); }

/* --- Responsive Editor --- */
@media (max-width: 900px) {
    .ed-layout { flex-direction: column; }
    .ed-form-panel { width: 100% !important; max-width: none !important; border-right: none; border-bottom: 1px solid var(--border); height: 50vh; }
    .ed-preview-panel { height: 50vh; }
    .ed-side-panel { position: fixed; top: 48px; right: 0; height: calc(100vh - 48px); z-index: 150; box-shadow: var(--shadow-xl); }
}

/* --- Preview Fullwidth Mode --- */
.ed-preview-fullwidth {
    flex: 1 1 100% !important;
    max-width: 100% !important;
}
.ed-preview-fullwidth .ed-preview-scroll {
    justify-content: center;
}
.ed-preview-fullwidth .ed-preview-pages {
    transform: scale(0.85) !important;
    transform-origin: top center;
}

/* --- AI Button --- */
.ed-ai-btn {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border: 1px solid var(--primary-300);
    border-radius: var(--radius-full); background: var(--primary-50);
    color: var(--primary-600); font-size: 10px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
    vertical-align: middle; margin-left: 6px; line-height: 1.5;
}
.ed-ai-btn:hover { background: var(--primary-100); border-color: var(--primary-400); }
.ed-ai-btn:disabled { opacity: 0.6; cursor: wait; }

/* --- ATS Strength Bar --- */
.ed-strength-bar {
    margin: 0 0 10px; padding: 12px 14px;
    background: var(--card-bg); border: 1px solid var(--border-light);
    border-radius: var(--radius); overflow: hidden;
}
.ed-strength-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.ed-strength-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.ed-strength-pct { font-size: 12px; font-weight: 700; }
.ed-strength-track {
    width: 100%; height: 6px; background: var(--border-light);
    border-radius: var(--radius-full); overflow: hidden;
}
.ed-strength-fill {
    height: 100%; width: 0; border-radius: var(--radius-full);
    background: #404040; transition: width 0.5s ease, background 0.5s ease;
}
.ed-strength-checks {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px;
    margin-top: 8px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.ed-strength-bar:hover .ed-strength-checks { max-height: 200px; }
.str-check { font-size: 10px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.str-ok { color: var(--success); }
.str-miss { color: var(--text-muted); }

/* --- Badge Preview in Entries --- */
.ed-badge-preview { margin: 6px 0 4px 0; }

/* --- Score Overlay --- */
.ed-score-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.ed-score-modal {
    width: 460px; max-width: 92vw; max-height: 85vh; overflow-y: auto;
    background: var(--card-bg); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border);
}
.ed-score-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.ed-score-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.ed-score-body { padding: 20px; }
.ed-score-loading { text-align: center; padding: 40px 20px; }
.ed-score-loading p { margin-top: 16px; color: var(--text-secondary); font-size: 14px; }
.ed-score-circle {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 28px; font-weight: 800;
    border: 4px solid;
}
.ed-score-circle.score-high { border-color: var(--success); color: var(--success); background: var(--success-light); }
.ed-score-circle.score-mid { border-color: var(--warning); color: var(--warning); background: var(--warning-light); }
.ed-score-circle.score-low { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }
.ed-score-summary { text-align: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.ed-score-issues { display: flex; flex-direction: column; gap: 8px; }
.ed-score-issue {
    padding: 12px; border-radius: var(--radius); border-left: 3px solid;
}
.ed-score-issue.sev-critical { background: var(--danger-light); border-color: var(--danger); }
.ed-score-issue.sev-warning { background: var(--warning-light); border-color: var(--warning); }
.ed-score-issue.sev-info { background: var(--info-light); border-color: var(--info); }
.ed-score-issue-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ed-score-sev {
    font-size: 9px; text-transform: uppercase; font-weight: 700;
    padding: 1px 5px; border-radius: 3px; background: rgba(0,0,0,0.08);
}
.ed-score-issue p { font-size: 12px; color: var(--text-secondary); margin: 2px 0; }
.ed-score-fix { font-style: italic; }

/* --- Preview: Certifications with Badge Image --- */
#previewContent .pv-cert-entry { }
#previewContent .pv-cert-with-badge {
    display: flex; align-items: flex-start; gap: 10px;
}
#previewContent .pv-cert-badge {
    width: 48px; height: 48px; border-radius: 6px;
    object-fit: contain; flex-shrink: 0; border: 1px solid #e5e7eb;
}
#previewContent .pv-cert-info { flex: 1; }

/* --- Preview: Badges Grid --- */
#previewContent .pv-badges-grid {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px;
}
#previewContent .pv-badge-card {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
    background: #f9fafb; min-width: 120px;
}
#previewContent .pv-badge-img {
    width: 40px; height: 40px; border-radius: 6px; object-fit: contain; flex-shrink: 0;
}
#previewContent .pv-badge-icon { font-size: 28px; flex-shrink: 0; }
#previewContent .pv-badge-info { font-size: 9pt; }
#previewContent .pv-badge-info strong { font-size: 9.5pt; display: block; color: #1a1a1a; }

/* --- Spinner --- */
.spinner {
    width: 24px; height: 24px; border: 3px solid var(--border);
    border-top-color: var(--primary-500); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================ */
/* ===== DASHBOARD IMPORT / UPLOAD                            ===== */
/* ================================================================ */

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

.btn-import-cv {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; font-weight: 600;
}

.dash-card-import {
    border-color: var(--primary-200) !important;
}
.dash-card-import:hover {
    border-color: var(--primary-400) !important;
    background: var(--primary-50) !important;
}

/* Import modal tabs */
.import-tabs {
    display: flex; gap: 4px; margin-bottom: 18px;
    border-bottom: 1px solid var(--border-light); padding-bottom: 0;
}
.import-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px; border: none; background: transparent;
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer; border-bottom: 2px solid transparent;
    transition: all var(--transition); border-radius: 0;
    margin-bottom: -1px;
}
.import-tab:hover { color: var(--text); background: var(--hover-bg); }
.import-tab.active {
    color: var(--primary-600); border-bottom-color: var(--primary-500);
}

.import-section { animation: fadeIn 0.2s ease; }

/* Import dropzone */
.import-dropzone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg);
    padding: 36px 24px; text-align: center; cursor: pointer;
    transition: all var(--transition); display: flex; flex-direction: column;
    align-items: center; gap: 10px;
}
.import-dropzone:hover { border-color: var(--primary-400); background: var(--primary-50); }
.import-dropzone.dragover { border-color: var(--primary-500); background: var(--primary-50); box-shadow: 0 0 0 4px var(--primary-100); }
.import-dropzone-text { font-size: 14px; font-weight: 600; color: var(--text); }
.import-dropzone-sub { font-size: 12px; color: var(--text-muted); }

/* Import status */
.import-status {
    margin-top: 14px; padding: 12px 16px; border-radius: var(--radius);
    font-size: 13px; line-height: 1.5; font-weight: 500;
}
.import-status.loading { background: var(--info-light); color: var(--info); }
.import-status.success { background: var(--success-light); color: var(--success); }
.import-status.error { background: var(--danger-light); color: var(--danger); }

/* LinkedIn steps */
.import-linkedin-info { margin-bottom: 16px; }
.import-step {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; font-size: 13px; color: var(--text-secondary);
}
.import-step-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary-50); color: var(--primary-600);
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.import-textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--input-bg);
    color: var(--text); font-size: 13px; font-family: inherit;
    resize: vertical;
}
.import-textarea:focus { outline: none; border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(0, 0, 0,0.08); }

/* Merged Add New card */
.dash-card-add-new { cursor: default; }
.dash-card-add-new .dash-card-new-inner { gap: 12px; }
.dash-add-actions {
    display: flex; flex-direction: column; gap: 8px;
    width: 100%; margin-top: 8px; padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.dash-add-actions .btn {
    width: 100%; justify-content: center;
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; padding: 8px 14px;
}

@media (max-width: 640px) {
    .dash-header-actions { flex-direction: column; gap: 6px; }
    .dash-header-actions .btn { width: 100%; justify-content: center; }
}

/* --- Download Modal --- */
.dl-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.dl-modal {
    width: 480px; max-width: 94vw; background: var(--card-bg);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    border: 1px solid var(--border); overflow: hidden;
}
.dl-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.dl-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.dl-close {
    width: 28px; height: 28px; border: none; background: none; cursor: pointer;
    font-size: 18px; color: var(--text-muted); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
}
.dl-close:hover { background: var(--hover-bg); color: var(--text); }
.dl-body { padding: 20px; }
.dl-preview-info {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg-secondary);
    border-radius: var(--radius); margin-bottom: 18px;
    border: 1px solid var(--border-light);
}
.dl-preview-icon {
    width: 44px; height: 56px; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #9ca3af; flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dl-preview-details { flex: 1; }
.dl-preview-title {
    font-size: 14px; font-weight: 600; color: var(--text);
    margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-preview-meta { font-size: 12px; color: var(--text-muted); }
.dl-format-label {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.dl-buttons { display: flex; gap: 10px; }
.dl-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--card-bg);
    color: var(--text); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.dl-btn:hover { border-color: var(--primary-400); background: var(--primary-50); color: var(--primary-600); }
.dl-btn:disabled { opacity: 0.6; cursor: wait; }
.dl-btn svg { flex-shrink: 0; }
.dl-btn-pdf:hover { border-color: var(--text-secondary); background: var(--hover-bg); color: var(--text); }
.dl-btn-word:hover { border-color: var(--text-secondary); background: var(--hover-bg); color: var(--text); }

/* --- Auth Page Language/Theme Controls --- */
.auth-controls {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px; padding: 12px 20px 0;
}
.auth-theme-row { display: flex; gap: 4px; }
.auth-theme-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card-bg); color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; margin-left: 2px;
}
.auth-theme-btn:hover, .auth-theme-btn.active {
    background: var(--primary-600); color: #fff; border-color: var(--primary-600);
}

/* --- Language Globe Dropdown --- */
.lang-dropdown { position: relative; }
.lang-dd-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text-secondary); cursor: pointer; font-size: 0.8rem;
    font-weight: 600; transition: all 0.15s;
}
.lang-dd-btn:hover { border-color: var(--primary-400); color: var(--text); }
.lang-dd-menu {
    position: absolute; top: calc(100% + 4px); right: 0;
    min-width: 150px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 1000;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.2s ease;
}
.lang-dd-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dd-item {
    display: block; width: 100%; padding: 8px 14px; border: none;
    background: none; text-align: left; font-size: 0.85rem;
    color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.lang-dd-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.lang-dd-item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.lang-dd-item:hover { background: var(--primary-50); color: var(--primary-600); }
.lang-dd-item.active { color: var(--primary-600); font-weight: 600; background: var(--primary-50); }

/* ===== AI Bullet Rewrite Button ===== */
.ed-bullet-ai {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: none; background: transparent;
    color: var(--primary-400); border-radius: var(--radius); cursor: pointer;
    flex-shrink: 0; margin-top: 4px; font-size: 12px;
    transition: all var(--transition);
}
.ed-bullet-ai:hover { background: var(--primary-50); color: var(--primary-600); }
.ed-bullet-ai:disabled { opacity: 0.5; cursor: wait; }

/* --- Bullet Actions Row --- */
.ed-bullet-actions {
    display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}

/* --- Section Actions Row --- */
.ed-section-actions {
    display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap;
}

/* ===== Reorder Arrows ===== */
.ed-reorder-arrows {
    display: flex; flex-direction: column; gap: 2px; margin-left: auto; flex-shrink: 0;
}
.ed-reorder-arrow {
    border: none; background: var(--hover-bg); color: var(--text-secondary);
    width: 22px; height: 18px; border-radius: 3px;
    cursor: pointer; font-size: 9px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.ed-reorder-arrow:hover { background: var(--primary-100); color: var(--primary-600); }
.ed-reorder-arrow-spacer { width: 22px; height: 18px; }
.ed-reorder-label { flex: 1; }
.ed-reorder-item.drag-over { border-color: var(--primary-500); background: var(--primary-50); }

/* ===== Photo Position Toggle ===== */
.ed-photo-position {
    display: flex; align-items: center; gap: 4px; margin-top: 6px;
}
.ed-photo-pos-label {
    font-size: 11px; color: var(--text-secondary); font-weight: 500; margin-right: 2px;
}
.ed-photo-pos-btn {
    width: 28px; height: 26px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card-bg); color: var(--text-secondary);
    cursor: pointer; font-size: 12px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.ed-photo-pos-btn:hover { border-color: var(--primary-400); color: var(--primary-600); }
.ed-photo-pos-btn.active {
    background: var(--primary-600); color: #fff; border-color: var(--primary-600);
}

/* ===== Photo Positions in Preview ===== */
#previewContent .pv-photo-right { float: right; margin: 0 0 8px 12px; }
#previewContent .pv-photo-left { float: left; margin: 0 12px 8px 0; }
#previewContent .pv-photo-center {
    float: none; display: block; margin: 0 auto 10px auto;
}
#previewContent .pv-photo-none { display: none; }

/* ===== Editable Section Title ===== */
.ed-section-title {
    outline: none; cursor: text; border-bottom: 1px dashed transparent;
    padding-bottom: 1px; transition: border-color var(--transition);
    min-width: 40px; display: inline-block;
}
.ed-section-title:hover { border-bottom-color: var(--primary-300); }
.ed-section-title:focus { border-bottom-color: var(--primary-500); }

/* ===== AI Enhance Full CV Button ===== */
.ed-enhance-cv-btn {
    width: 100%; margin-top: 8px; padding: 6px 12px !important;
    font-size: 11px !important; justify-content: center;
}

/* ================================================================ */
/* ===== PROFESSIONAL CORPORATE DASHBOARD REDESIGN 2025       ===== */
/* ================================================================ */

/* --- Dashboard Stats Row --- */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-stat-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    transition: all var(--transition-slow);
}

.dash-stat-widget:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateY(-2px);
}

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

.dash-stat-blue { background: var(--primary-50); color: var(--primary-600); }
.dash-stat-green { background: var(--primary-50); color: var(--primary-600); }
.dash-stat-purple { background: var(--primary-50); color: var(--primary-600); }
.dash-stat-amber { background: var(--primary-50); color: var(--primary-600); }

.dash-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
    .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .dash-stats-row { grid-template-columns: 1fr; }
}

/* --- Dashboard Toolbar --- */
.dash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
    flex-wrap: wrap;
}

.dash-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.dash-quick-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-600);
    transform: translateY(-1px);
}

.dash-quick-btn svg {
    flex-shrink: 0;
}

.dash-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
}

.dash-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.dash-view-btn:hover {
    color: var(--text);
    background: var(--hover-bg);
}

.dash-view-btn.active {
    background: var(--card-bg);
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

/* --- List View Styles --- */
.dash-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.dash-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.dash-list-checkbox {
    display: none;
}

.dash-selecting .dash-list-checkbox {
    display: block;
}

.dash-list-preview {
    width: 48px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.dash-list-template-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: var(--text-secondary);
}

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

.dash-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-list-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.dash-list-meta span:not(.dash-list-time) {
    background: var(--hover-bg);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.dash-list-time {
    margin-left: auto;
    color: var(--text-muted);
}

.dash-list-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

.dash-list-item:hover .dash-list-actions {
    opacity: 1;
}

.dash-list-new {
    border-style: dashed;
    background: transparent;
    justify-content: flex-start;
    color: var(--text-muted);
}

.dash-list-new:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
    color: var(--primary-600);
}

.dash-list-new-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-selecting .dash-list-item.dash-card-selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

/* --- Recent Activity Section --- */
.dash-activity-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.dash-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.dash-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.dash-activity-item:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

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

.dash-activity-edit {
    background: var(--info-light);
    color: var(--info);
}

.dash-activity-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dash-activity-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

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

/* --- Templates Modal --- */
.dash-templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 4px;
}

.dash-template-card {
    background: var(--card-bg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.dash-template-card:hover {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.dash-template-preview {
    height: 140px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.tpl-preview-ats {
    background: linear-gradient(135deg, #fafafa 0%, #e5e5e5 100%);
}
.tpl-preview-ats .tpl-preview-name { color: #171717; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.tpl-preview-ats .tpl-preview-title { color: #171717; font-size: 10px; font-weight: 600; margin-bottom: 12px; }

.tpl-preview-modern {
    background: #fff;
    display: flex;
    padding: 0;
}
.tpl-preview-sidebar {
    width: 35%;
    background: #171717;
    height: 100%;
}
.tpl-preview-main {
    flex: 1;
    padding: 16px;
}
.tpl-preview-modern .tpl-preview-name { color: #171717; font-size: 12px; font-weight: 700; margin-bottom: 8px; }

.tpl-preview-executive {
    background: #fff;
    padding: 20px;
}
.tpl-preview-executive .tpl-preview-name { color: #171717; font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.tpl-preview-divider {
    height: 2px;
    background: linear-gradient(90deg, #404040, #737373);
    margin-bottom: 12px;
}

.tpl-preview-creative {
    background: #fff;
    padding: 16px;
    position: relative;
}
.tpl-preview-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #525252, #737373, #404040);
}
.tpl-preview-creative .tpl-preview-name { color: #171717; font-size: 14px; font-weight: 700; margin-top: 8px; }

.tpl-preview-tech {
    background: #fafafa;
    padding: 16px;
}
.tpl-preview-tech .tpl-preview-name { color: #171717; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.tpl-preview-skill-bar {
    height: 4px;
    background: #171717;
    border-radius: 2px;
    width: 70%;
    margin-bottom: 8px;
}

.tpl-preview-minimal {
    background: #fff;
    padding: 20px;
}
.tpl-preview-minimal .tpl-preview-name { color: #525252; font-size: 14px; font-weight: 600; border-bottom: 1px solid #e5e5e5; padding-bottom: 8px; margin-bottom: 12px; }

.tpl-preview-line {
    height: 6px;
    background: #d4d4d4;
    border-radius: 3px;
    margin-bottom: 6px;
}
.tpl-preview-line.w50 { width: 50%; }
.tpl-preview-line.w60 { width: 60%; }
.tpl-preview-line.w70 { width: 70%; }
.tpl-preview-line.w75 { width: 75%; }
.tpl-preview-line.w80 { width: 80%; }
.tpl-preview-line.w85 { width: 85%; }
.tpl-preview-line.w90 { width: 90%; }
.tpl-preview-line.w100 { width: 100%; }

.dash-template-info {
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
}

.dash-template-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.dash-template-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

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

@media (max-width: 480px) {
    .dash-templates-grid { grid-template-columns: 1fr; }
}

/* --- Enhanced Card Selection --- */
.dash-card-selected {
    outline: 2px solid var(--primary-500);
    outline-offset: -2px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .dash-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dash-quick-actions {
        justify-content: stretch;
    }
    
    .dash-quick-btn {
        flex: 1;
        justify-content: center;
    }
    
    .dash-view-toggle {
        align-self: flex-end;
    }
    
    .dash-list-actions {
        opacity: 1;
    }
}


/* ================================================================ */
/* ===== CORPORATE SIGNUP & HOME PAGE REDESIGN 2025          ===== */
/* ================================================================ */

/* --- Corporate Auth Page --- */
.auth-corporate {
    background: var(--bg);
}

.auth-corporate .auth-branding {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 50%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
}

.auth-corporate .auth-branding::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 0, 0,0.3) 0%, transparent 70%);
    pointer-events: none;
}

.auth-corporate .auth-branding::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 0, 0,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.auth-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.auth-decoration-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: -100px;
}

.auth-decoration-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: -50px;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.auth-brand-hero {
    margin-bottom: 48px;
}

.auth-brand-hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}

.auth-brand-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 420px;
}

.auth-feature-text {
    display: flex;
    flex-direction: column;
}

.auth-testimonial {
    margin-top: auto;
    padding: 24px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.1);
}

.auth-testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.auth-testimonial-stars svg {
    width: 16px;
    height: 16px;
    color: #737373;
}

.auth-testimonial-text {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
}

.auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-testimonial-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-400), var(--accent-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.auth-testimonial-author strong {
    display: block;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-testimonial-author span {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

/* Form Side Improvements */
.auth-corporate .auth-card {
    max-width: 480px;
    padding: 40px;
}

.auth-card-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-social-section {
    margin-bottom: 20px;
}

.btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-social:hover {
    background: var(--hover-bg);
    border-color: var(--surface-300);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group-half {
    flex: 1;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-checkbox-label input {
    display: none;
}

.form-checkbox-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all var(--transition);
}

.form-checkbox-mark svg {
    display: none;
    color: white;
}

.form-checkbox-label input:checked + .form-checkbox-mark {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.form-checkbox-label input:checked + .form-checkbox-mark svg {
    display: block;
}

.form-checkbox-text a {
    color: var(--primary-600);
    font-weight: 500;
}

.form-checkbox-text a:hover {
    text-decoration: underline;
}

.btn-create-account {
    padding: 14px 24px;
    font-size: 1rem;
}

.auth-security-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.auth-security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-security-badge svg {
    color: var(--success);
}

@media (max-width: 1024px) {
    .auth-corporate .auth-brand-hero h2 {
        font-size: 2rem;
    }
    .auth-testimonial {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-corporate .auth-branding {
        display: none;
    }
    .auth-corporate .auth-card {
        padding: 32px 24px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ================================================================ */
/* ===== CORPORATE HOME PAGE REDESIGN                         ===== */
/* ================================================================ */

/* --- Hero Corporate --- */
.hero-corporate {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, var(--bg) 0%, var(--surface-50) 100%);
}

.hero-corporate .hero-grid {
    align-items: center;
    gap: 64px;
}

.hero-corporate h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-corporate .hero-sub {
    font-size: 1.2rem;
    max-width: 540px;
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

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

.hero-stat strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.hero-stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Corporate Resume Mockup */
.resume-mockup-corporate {
    width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.15), 0 10px 30px rgba(0,0,0,0.1);
    padding: 28px;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.resume-mockup-corporate:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-100);
}

.mockup-avatar-corporate {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.mockup-header-info {
    flex: 1;
}

.mockup-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #171717;
    margin-bottom: 4px;
}

.mockup-title {
    font-size: 0.9rem;
    color: var(--primary-600);
    font-weight: 500;
}

.mockup-section {
    margin-bottom: 20px;
}

.mockup-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #171717;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
}

.mockup-item {
    margin-bottom: 12px;
}

.mockup-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #262626;
    margin-bottom: 2px;
}

.mockup-item-date {
    font-size: 0.75rem;
    color: #a3a3a3;
    margin-bottom: 4px;
}

.mockup-item-desc {
    font-size: 0.8rem;
    color: #737373;
    line-height: 1.5;
}

.mockup-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mockup-skills span {
    font-size: 0.7rem;
    background: #e5e5e5;
    color: #0a0a0a;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Floating Badges */
.hero-float-badge {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: float 3s ease-in-out infinite;
}

.hero-float-badge svg {
    flex-shrink: 0;
}

.hero-float-badge strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.hero-float-badge span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-float-ats {
    top: -20px;
    right: -30px;
    animation-delay: 0s;
}

.hero-float-ats svg {
    color: var(--success);
}

.hero-float-ai {
    bottom: 40px;
    left: -40px;
    animation-delay: 1.5s;
}

.hero-float-ai svg {
    color: var(--primary-500);
}

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

/* Trust Logos */
.trust-logos {
    padding: 48px 0 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-light);
}

.trust-logos-title {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.trust-logos-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.trust-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity var(--transition);
}

.trust-logo:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-corporate h1 {
        font-size: 2.5rem;
    }
    .resume-mockup-corporate {
        width: 280px;
        transform: none;
    }
    .hero-float-badge {
        display: none;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    .hero-stat-divider {
        display: none;
    }
    .trust-logos-grid {
        gap: 24px;
    }
    .trust-logo {
        font-size: 1rem;
    }
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-600);
    margin-bottom: 16px;
}

.section-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header .section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    flex: 1;
    max-width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    position: relative;
    transition: all var(--transition-slow);
}

.step-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
    transform: translateY(-4px);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0,0.3);
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto 20px;
    color: var(--primary-600);
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-connector {
    width: 80px;
    height: 24px;
    color: var(--border);
    flex-shrink: 0;
}

.step-connector svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 1024px) {
    .steps-grid {
        flex-direction: column;
    }
    .step-connector {
        transform: rotate(90deg);
        height: 40px;
    }
    .step-card {
        max-width: 400px;
        width: 100%;
    }
}

/* --- Features Corporate --- */
.features-corporate {
    padding: 100px 0;
    background: var(--surface-50);
}

.feature-grid-corporate {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card-large {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: auto 0 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 8px 0;
}

.feature-list li::before {
    content: '';
    width: 18px;
    height: 18px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.feature-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.lang-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-700);
    background: var(--primary-50);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

@media (max-width: 1024px) {
    .feature-grid-corporate {
        grid-template-columns: repeat(2, 1fr);
    }
    .feature-card-large {
        grid-row: span 1;
    }
}

@media (max-width: 640px) {
    .feature-grid-corporate {
        grid-template-columns: 1fr;
    }
}

/* --- Templates Corporate --- */
.templates-corporate {
    padding: 100px 0;
}

.template-carousel-corporate {
    gap: 20px;
}

/* --- Testimonials --- */
.testimonials {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--surface-50) 0%, var(--bg) 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all var(--transition-slow);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
    transform: translateY(-4px);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.testimonial-stars svg {
    width: 18px;
    height: 18px;
    color: #737373;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.testimonial-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.testimonial-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* --- CTA Corporate --- */
.cta-corporate {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-600) 100%);
    position: relative;
    overflow: hidden;
}

.cta-corporate::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-corporate::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-corporate h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.cta-corporate p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.btn-white {
    background: white;
    color: var(--primary-700);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-white:hover {
    background: var(--surface-50);
    color: var(--primary-800);
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.cta-note {
    font-size: 0.85rem !important;
    color: rgba(255,255,255,0.7) !important;
    margin: 0 !important;
}

@media (max-width: 640px) {
    .cta-corporate h2 {
        font-size: 1.8rem;
    }
}


/* ================================================================ */
/* ===== SETTINGS PAGE REDESIGN                               ===== */
/* ================================================================ */

.settings-corporate {
    padding: 40px 0 80px;
    min-height: calc(100vh - 64px);
}

.settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Sidebar */
.settings-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

.settings-nav {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

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

.settings-nav-item.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

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

/* Main Content */
.settings-main {
    min-width: 0;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.settings-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Sections */
.settings-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

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

.settings-section-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
}

.settings-section-icon.icon-security { background: var(--primary-50); color: var(--primary-600); }
.settings-section-icon.icon-appearance { background: var(--primary-50); color: var(--primary-600); }
.settings-section-icon.icon-language { background: var(--primary-50); color: var(--primary-600); }
.settings-section-icon.icon-notifications { background: var(--primary-50); color: var(--primary-600); }

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

.settings-section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.settings-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.settings-card-danger {
    border-color: var(--border);
    background: var(--bg-elevated);
}

/* Avatar Section */
.settings-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.settings-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

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

/* Linked Accounts */
.settings-linked-accounts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-linked-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
}

.linked-account-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.linked-account-icon {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.linked-account-details strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.linked-account-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Settings Form Actions */
.settings-form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Danger Zone */
.danger-zone-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.danger-zone-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.danger-zone-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Theme Options */
.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.theme-option {
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.theme-option:hover {
    border-color: var(--primary-300);
}

.theme-option.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.theme-preview-light {
    background: white;
}

.theme-preview-dark {
    background: #171717;
}

.theme-preview-system {
    background: linear-gradient(135deg, white 50%, #171717 50%);
}

.theme-preview-header {
    height: 20px;
    background: var(--primary-500);
}

.theme-preview-content {
    padding: 12px;
}

.theme-preview-line {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 6px;
}

.theme-preview-line.short {
    width: 60%;
}

.theme-preview-dark .theme-preview-line,
.theme-preview-system .theme-preview-line {
    background: #262626;
}

.theme-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

/* Language Options */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
}

.language-option:hover {
    background: var(--hover-bg);
}

.language-option.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.language-flag {
    font-size: 1.5rem;
}

.language-info {
    flex: 1;
}

.language-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.language-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.language-check {
    color: var(--primary-600);
    opacity: 0;
}

.language-option.active .language-check {
    opacity: 1;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

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

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

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

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.notification-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.notification-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}

.notification-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    .settings-sidebar {
        position: static;
    }
    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .settings-nav::-webkit-scrollbar { display: none; }
    .settings-nav-item {
        flex-shrink: 0;
        padding: 10px 14px;
    }
    .settings-nav-item span {
        white-space: nowrap;
        font-size: 0.82rem;
    }
}

@media (max-width: 640px) {
    .settings-page { padding-top: 16px; }
    .settings-page .container { padding: 0 12px; }
    .settings-header { margin-bottom: 20px; }
    .settings-header h1 { font-size: 1.4rem; }
    .settings-nav-item span { display: none; }
    .settings-nav-item { padding: 10px 12px; }
    .settings-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .settings-section-icon { width: 40px; height: 40px; }
    .settings-card { padding: 16px; }
    .settings-avatar-section { flex-direction: column; text-align: center; gap: 14px; }
    .settings-avatar-actions { justify-content: center; }
    .theme-options { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .theme-option { padding: 10px; }
    .theme-preview { height: 56px; }
    .language-option { padding: 12px; gap: 12px; }
    .language-flag { font-size: 1.25rem; }
    .notification-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .danger-zone-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .danger-zone-item .btn { width: 100%; justify-content: center; }
    .settings-linked-account { flex-direction: column; align-items: flex-start; gap: 12px; }
    .settings-form-actions .btn { width: 100%; }
}

/* ================================================================ */
/* ===== COVER LETTERS PAGE REDESIGN                          ===== */
/* ================================================================ */

.cl-corporate {
    padding: 40px 0 80px;
    min-height: calc(100vh - 64px);
}

.cl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.cl-header-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.cl-header-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.cl-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

/* Templates Section */
.cl-templates-section {
    margin-bottom: 48px;
}

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

.cl-template-card {
    background: var(--card-bg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.cl-template-card:hover {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.cl-template-preview {
    height: 140px;
    padding: 16px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
}

.cl-preview-header {
    margin-bottom: 12px;
}

.cl-preview-line {
    height: 6px;
    background: #d4d4d4;
    border-radius: 3px;
    margin-bottom: 6px;
}

.cl-preview-line.w40 { width: 40%; }
.cl-preview-line.w45 { width: 45%; }
.cl-preview-line.w50 { width: 50%; }
.cl-preview-line.w55 { width: 55%; }
.cl-preview-line.w60 { width: 60%; }
.cl-preview-line.w65 { width: 65%; }
.cl-preview-line.w70 { width: 70%; }
.cl-preview-line.w75 { width: 75%; }
.cl-preview-line.w80 { width: 80%; }
.cl-preview-line.w85 { width: 85%; }
.cl-preview-line.w90 { width: 90%; }
.cl-preview-line.w100 { width: 100%; }

.cl-preview-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    border-radius: 2px;
    margin-bottom: 12px;
}

.cl-preview-body {
    padding-top: 8px;
}

.cl-preview-modern {
    background: linear-gradient(135deg, #fafafa 0%, #e5e5e5 100%);
}

.cl-preview-enthusiastic {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.cl-preview-experienced {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.cl-preview-career {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.cl-preview-entry {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.cl-template-info {
    padding: 16px;
}

.cl-template-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.cl-template-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* My Letters Section */
.cl-my-letters {
    margin-top: 48px;
}

.cl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.cl-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
}

.cl-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.cl-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    flex-shrink: 0;
}

.cl-card-content {
    flex: 1;
    min-width: 0;
}

.cl-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

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

.cl-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition);
}

.cl-card:hover .cl-card-actions {
    opacity: 1;
}

.cl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    background: var(--card-bg);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
}

.cl-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-400);
    margin: 0 auto 16px;
}

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

.cl-empty p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Editor Layout */
.modal-content-large {
    max-width: 900px;
    width: 90%;
}

.cl-editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.cl-editor-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cl-editor-content {
    display: flex;
    flex-direction: column;
}

.cl-editor-content label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.cl-content-textarea {
    flex: 1;
    min-height: 300px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}

.cl-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.cl-editor-toolbar .btn-icon {
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.cl-editor-toolbar .btn-icon:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-600);
}

.cl-ai-actions {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .cl-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cl-templates-grid {
        grid-template-columns: 1fr;
    }
    .cl-grid {
        grid-template-columns: 1fr;
    }
    .cl-editor-layout {
        grid-template-columns: 1fr;
    }
}

/* ================================================================ */
/* ===== HEADER/NAVBAR REDESIGN                               ===== */
/* ================================================================ */

.navbar-corporate {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
    height: 64px;
}

.navbar-corporate .nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    gap: 12px;
}

.navbar-corporate .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
}

.navbar-corporate .nav-links {
    gap: 8px;
}

.navbar-corporate .nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
}

.navbar-corporate .nav-link:hover {
    background: var(--hover-bg);
}

.navbar-corporate .nav-link.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* User Menu */
.nav-user-menu {
    position: relative;
}

.nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
}

.nav-avatar-btn:hover {
    border-color: var(--primary-300);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-avatar-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.nav-avatar-btn svg {
    color: var(--text-muted);
}


/* ================================================================ */
/* ===== EDITOR V2 - REDESIGNED WITH SIDEBAR & DRAG-DROP      ===== */
/* ================================================================ */

/* --- Navbar V2 --- */
.ed-navbar-v2 {
    height: 52px;
    background: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 200;
}

.ed-nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.ed-nav-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.ed-nav-back:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-nav-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ed-navbar-v2 .ed-title-input {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    padding: 5px 10px;
    border-radius: var(--radius);
    min-width: 120px;
    max-width: 200px;
    transition: all var(--transition);
}

.ed-navbar-v2 .ed-title-input:hover {
    border-color: var(--border);
    background: var(--hover-bg);
}

.ed-navbar-v2 .ed-title-input:focus {
    border-color: var(--text-muted);
    background: var(--hover-bg);
    outline: none;
    box-shadow: var(--shadow-ring);
}

.ed-save-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ed-save-status.saving {
    color: var(--text-secondary);
}

.ed-nav-center {
    flex: 0 0 auto;
}

.ed-template-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ed-template-indicator:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.ed-template-indicator .template-icon {
    font-size: 1rem;
}

.ed-nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
}

.ed-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.ed-nav-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-nav-btn.active {
    background: var(--primary-50);
    color: var(--text);
}

.ed-nav-btn-ai {
    background: transparent;
    color: var(--text-secondary);
}

.ed-nav-btn-ai:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-nav-btn-primary {
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
}

.ed-nav-btn-primary:hover {
    opacity: 0.85;
}

.ed-nav-btn-label {
    display: inline;
}

@media (max-width: 1100px) {
    .ed-nav-btn-label { display: none; }
    .ed-save-group .ed-nav-btn-label { display: none; }
}
@media (max-width: 768px) {
    .ed-nav-btn-label { display: none; }
    .ed-nav-center { display: none; }
}

/* --- Layout V2 --- */
.ed-layout-v2 {
    display: grid;
    grid-template-columns: 240px 1fr 6px 42%;
    height: calc(100vh - 52px);
    overflow: hidden;
    width: 100%;
    transition: grid-template-columns 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed sidebar grid */
.ed-layout-v2.sidebar-collapsed {
    grid-template-columns: 56px 1fr 6px 42%;
}

/* --- Resize Handle --- */
.ed-resize-handle {
    width: 6px;
    background: var(--border);
    cursor: col-resize;
    position: relative;
    z-index: 10;
    transition: background var(--transition);
}

.ed-resize-handle:hover,
.ed-resize-handle.active {
    background: var(--text-muted);
}

.ed-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 24px;
    background: var(--text-muted);
    border-radius: 1px;
    opacity: 0;
    transition: opacity var(--transition);
}

.ed-resize-handle:hover::after,
.ed-resize-handle.active::after {
    opacity: 1;
}

/* --- Sidebar --- */
.ed-sidebar {
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed sidebar */
.ed-sidebar.collapsed {
    overflow: visible;
}

.ed-sidebar.collapsed .ed-sidebar-header {
    justify-content: center;
    padding: 14px 8px;
}

.ed-sidebar.collapsed .ed-sidebar-header h3 {
    display: none;
}

.ed-sidebar.collapsed .ed-sidebar-toggle svg {
    transform: rotate(180deg);
}

.ed-sidebar.collapsed .ed-sidebar-content {
    padding: 4px;
    gap: 4px;
}

.ed-sidebar.collapsed .ed-sections-list {
    gap: 1px;
}

.ed-sidebar.collapsed .ed-section-item {
    justify-content: center;
    padding: 10px 4px;
    gap: 0;
}

.ed-sidebar.collapsed .ed-section-item .section-label,
.ed-sidebar.collapsed .ed-section-item .section-status,
.ed-sidebar.collapsed .ed-section-item .section-drag-handle {
    display: none;
}

.ed-sidebar.collapsed .ed-section-item .section-icon {
    margin: 0;
    font-size: 1.2rem;
}

.ed-sidebar.collapsed .ed-strength-widget {
    padding: 8px 4px;
    border: none;
    background: transparent;
}

.ed-sidebar.collapsed .ed-strength-header,
.ed-sidebar.collapsed .ed-strength-bar,
.ed-sidebar.collapsed .ed-ai-enhance-btn {
    display: none;
}

.ed-sidebar.collapsed .ed-strength-widget::after {
    content: attr(data-score);
    display: block;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.ed-sidebar.collapsed .ed-quick-actions {
    display: none;
}

/* Tooltip for collapsed sidebar items */
.ed-sidebar.collapsed .ed-section-item {
    position: relative;
}

.ed-sidebar.collapsed .ed-section-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    padding: 4px 10px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ed-sidebar.collapsed .ed-section-item:hover::after {
    opacity: 1;
}

.ed-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
}

.ed-sidebar-header h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ed-sidebar-toggle {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ed-sidebar-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-secondary);
}

.ed-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Section List */
.ed-sections-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ed-section-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    user-select: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ed-section-item:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-section-item.active {
    background: var(--hover-bg);
    color: var(--text);
    font-weight: 600;
}

.ed-section-item.dragging {
    opacity: 0.5;
}

.section-drag-handle {
    opacity: 0;
    cursor: grab;
    font-size: 10px;
    color: var(--text-muted);
    padding: 4px;
}

.ed-section-item:hover .section-drag-handle {
    opacity: 1;
}

.section-drag-handle:active {
    cursor: grabbing;
}

.section-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.section-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text);
    flex-shrink: 0;
    opacity: 0.6;
}

.section-status.incomplete {
    background: var(--text-secondary);
    opacity: 0.4;
}

.section-status.empty {
    background: var(--text-muted);
    opacity: 0.2;
}

/* Strength Widget */
.ed-strength-widget {
    background: var(--hover-bg);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid var(--border);
}

.ed-strength-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ed-strength-score {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

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

.ed-strength-fill {
    height: 100%;
    background: var(--text);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-ai-enhance-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.ed-ai-enhance-btn:hover {
    background: var(--hover-bg);
    border-color: var(--text-muted);
    color: var(--text);
}

/* Quick Actions */
.ed-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-quick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.ed-quick-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}

/* --- Form Panel V2 --- */
.ed-form-panel-v2 {
    background: var(--bg-alt);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    /* Override old .ed-form-panel constraints for grid */
    width: auto;
    min-width: 0;
    max-width: none;
}

.ed-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Custom scrollbar */
.ed-form-scroll::-webkit-scrollbar,
.ed-sidebar-content::-webkit-scrollbar,
.ed-preview-scroll::-webkit-scrollbar {
    width: 6px;
}

.ed-form-scroll::-webkit-scrollbar-track,
.ed-sidebar-content::-webkit-scrollbar-track,
.ed-preview-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ed-form-scroll::-webkit-scrollbar-thumb,
.ed-sidebar-content::-webkit-scrollbar-thumb,
.ed-preview-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.ed-form-scroll::-webkit-scrollbar-thumb:hover,
.ed-sidebar-content::-webkit-scrollbar-thumb:hover,
.ed-preview-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Section V2 */
.ed-section-v2 {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all var(--transition);
}

.ed-section-v2:hover {
    border-color: var(--text-muted);
}

.ed-section-header-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}

.ed-section-header-v2:hover {
    background: var(--hover-bg);
}

.ed-section-v2.collapsed .ed-section-header-v2 {
    border-bottom: none;
}

.ed-section-icon {
    width: 36px;
    height: 36px;
    background: var(--hover-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ed-section-title-group {
    flex: 1;
}

.ed-section-title-group h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1px;
    letter-spacing: -0.01em;
}

.ed-section-title-group p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ed-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ed-section-collapse {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ed-section-collapse:hover {
    background: var(--hover-bg);
    color: var(--text-secondary);
}

.ed-section-v2.collapsed .ed-section-collapse svg {
    transform: rotate(-90deg);
}

.ed-section-body-v2 {
    padding: 0 16px 16px;
    animation: fadeIn 0.2s ease;
    border-top: 1px solid var(--border);
}

.ed-section-v2.collapsed .ed-section-body-v2 {
    display: none;
}

/* Form Grid */
.ed-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.ed-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ed-form-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ed-form-field label .required {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.ed-form-field input,
.ed-form-field select,
.ed-form-field textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition);
}

.ed-form-field input:focus,
.ed-form-field select:focus,
.ed-form-field textarea:focus {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-ring);
    outline: none;
}

.ed-form-field input::placeholder,
.ed-form-field textarea::placeholder {
    color: var(--text-muted);
}

.ed-form-field-phone {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
}

.ed-form-field-phone label {
    grid-column: 1 / -1;
}

.ed-field-ai {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.ed-field-ai:hover {
    background: var(--border);
    color: var(--text);
}

/* Photo Upload V2 */
.ed-photo-row {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.ed-photo-upload-v2 {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    background: var(--hover-bg);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    overflow: hidden;
}

.ed-photo-upload-v2:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.ed-photo-upload-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.ed-photo-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ed-photo-positions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ed-photo-positions label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pos-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

.pos-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

.pos-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

/* Add Entry Button */
.ed-add-entry-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 8px;
}

.ed-add-entry-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

/* Form Footer */
.ed-form-footer {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* --- Preview Panel V2 --- */
.ed-preview-panel-v2 {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    /* Override old .ed-preview-panel flex:1 */
    flex: none;
}

.ed-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.ed-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--hover-bg);
    padding: 3px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.ed-zoom-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ed-zoom-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.ed-zoom-controls span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
}

.ed-preview-actions {
    display: flex;
    gap: 4px;
}

.ed-preview-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ed-preview-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-preview-scroll {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: var(--hover-bg);
}

/* Preview Page */
.ed-preview-pages {
    width: fit-content;
    margin: 0 auto;
}

.ed-preview-page {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.06);
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

/* Preview fullwidth mode */
.ed-preview-fullwidth {
    grid-column: 2 / -1;
}

/* --- Modal V2 --- */
.ed-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ed-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.ed-modal-content.ed-modal-small {
    max-width: 400px;
}

.ed-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.ed-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.ed-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

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

.ed-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.ed-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.ed-modal-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Template Grid V2 */
.ed-template-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ed-template-card-v2 {
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.ed-template-card-v2:hover {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-md);
}

.ed-template-card-v2.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.ed-template-card-v2 .template-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.ed-template-card-v2 h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.ed-template-card-v2 p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Reorder List V2 */
.ed-reorder-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ed-reorder-item-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: grab;
    transition: all var(--transition);
}

.ed-reorder-item-v2:hover {
    border-color: var(--primary-300);
}

.ed-reorder-item-v2.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.ed-reorder-item-v2 .drag-handle {
    color: var(--text-muted);
    font-size: 12px;
}

.ed-reorder-item-v2 .section-icon {
    font-size: 1.2rem;
}

.ed-reorder-item-v2 .section-name {
    flex: 1;
    font-weight: 500;
}

/* Download Options */
.ed-download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ed-download-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}

.ed-download-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

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

.ed-download-icon.pdf {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-download-icon.word {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-download-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 2px;
}

.ed-download-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Side Panel V2 */
.ed-side-panel-v2 {
    position: fixed;
    top: 60px;
    left: 260px;
    width: 320px;
    height: calc(100vh - 60px);
    background: var(--card-bg);
    border-right: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    display: flex;
    flex-direction: column;
}

.ed-side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.ed-side-panel-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.ed-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-panel-close:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.ed-side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Import Dropzone */
.ed-import-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ed-import-dropzone:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.ed-import-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.ed-import-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .ed-layout-v2 {
        grid-template-columns: 56px 1fr 6px 42%;
    }
    .ed-sidebar {
        /* Force collapsed look at narrow screens */
    }
    .ed-sidebar-header h3 {
        display: none;
    }
    .section-label,
    .section-status {
        display: none;
    }
    .ed-strength-widget {
        display: none;
    }
    .ed-quick-actions {
        display: none;
    }
    .ed-section-item {
        justify-content: center;
        padding: 10px;
    }
    .section-drag-handle {
        display: none;
    }
}

@media (max-width: 900px) {
    .ed-layout-v2,
    .ed-layout-v2.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
    .ed-sidebar,
    .ed-preview-panel-v2,
    .ed-resize-handle {
        display: none;
    }
    .ed-form-panel-v2 {
        border-right: none;
    }
    .ed-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================ */
/* ===== EDITOR V2 - ADDITIONAL STYLES                        ===== */
/* ================================================================ */

/* Drag over state */
.ed-section-item.drag-over,
.ed-reorder-item-v2.drag-over {
    background: var(--primary-50) !important;
    border: 2px dashed var(--primary-400);
}

/* Preview mode — hide form, expand preview */
.ed-layout-v2.preview-mode {
    grid-template-columns: 240px 0 0 1fr;
}

.ed-layout-v2.sidebar-collapsed.preview-mode {
    grid-template-columns: 56px 0 0 1fr;
}

.ed-layout-v2.preview-mode .ed-form-panel-v2 {
    display: none;
}

.ed-layout-v2.preview-mode .ed-resize-handle {
    display: none;
}

.ed-layout-v2.preview-mode .ed-preview-panel-v2 {
    display: flex;
}

/* Nav button active state */
.ed-nav-btn.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* Import status messages */
.ed-import-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ed-import-status.success {
    background: var(--hover-bg);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.ed-import-status.error {
    background: var(--hover-bg);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.ed-import-status.loading {
    background: var(--hover-bg);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.ed-import-status.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Entry card styles for drag-drop */
.ed-entry-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

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

.ed-entry-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.ed-entry-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ed-entry-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px;
}

.ed-entry-drag-handle:active {
    cursor: grabbing;
}

.ed-entry-title {
    flex: 1;
    font-weight: 600;
    color: var(--text);
}

.ed-entry-actions {
    display: flex;
    gap: 4px;
}

.ed-entry-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.ed-entry-action-btn:hover {
    background: var(--hover-bg);
    color: var(--danger);
}

.ed-entry-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ed-entry-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-entry-field.full-width {
    grid-column: 1 / -1;
}

.ed-entry-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ed-entry-field input,
.ed-entry-field textarea {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.85rem;
    transition: all var(--transition);
}

.ed-entry-field input:focus,
.ed-entry-field textarea:focus {
    border-color: var(--primary-400);
    outline: none;
}

.ed-entry-field textarea {
    min-height: 80px;
    resize: vertical;
}

/* Photo dragover state */
.ed-photo-upload-v2.dragover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

/* Mobile responsive adjustments */
@media (max-width: 1200px) {
    .ed-layout-v2.preview-mode {
        grid-template-columns: 56px 0 0 1fr;
    }
}

/* Collapsed sidebar section items - removed, now handled above */

/* ===== Save/Undo/Discard Buttons ===== */
.ed-save-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ed-nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 8px;
}
.ed-save-btn.has-changes {
    background: var(--primary-500) !important;
    color: #fff !important;
    animation: pulse-save 2s infinite;
}
@keyframes pulse-save {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}
.ed-save-btn:disabled, .ed-undo-btn:disabled, .ed-discard-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ed-save-status.unsaved {
    color: var(--warning, #f59e0b) !important;
}
.ed-save-status.error {
    color: var(--danger, #ef4444) !important;
}

/* ===== Photo Enhancement Dropdown ===== */
.ed-photo-enhance-wrap {
    position: relative;
    display: inline-block;
}
.ed-photo-enhance-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 8px 0;
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.ed-photo-enhance-dropdown.show {
    display: block;
}
.ed-enhance-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ed-enhance-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: background 0.15s;
}
.ed-enhance-option:hover {
    background: var(--hover-bg);
}
.enhance-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.enhance-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.enhance-text strong {
    font-size: 0.85rem;
    font-weight: 500;
}
.enhance-text small {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.ed-enhance-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* ===== Translate Modal ===== */
.ed-translate-info {
    background: var(--hover-bg);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.ed-translate-detected {
    display: flex;
    align-items: center;
    gap: 8px;
}
.translate-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.translate-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.ed-small-btn {
    padding: 3px 8px;
    font-size: 0.7rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.ed-small-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
}
.ed-translate-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.5;
}

/* ===== Entry Card Improvements (Dark Mode Visibility) ===== */
.ed-entry {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-xl) !important;
    margin-bottom: 10px !important;
    background: var(--card-bg) !important;
    overflow: hidden;
    transition: border-color 0.15s;
}
.ed-entry:hover {
    border-color: var(--text-muted) !important;
}
.ed-entry.dragging {
    opacity: 0.5;
    border-color: var(--primary-500) !important;
}
.ed-entry.drag-over {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}
.ed-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.ed-entry-header:hover {
    background: var(--hover-bg);
}
.ed-entry-grip {
    cursor: grab;
    color: var(--text-muted);
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.15s;
}
.ed-entry-grip:hover {
    background: var(--hover-bg);
    color: var(--text);
}
.ed-entry-grip:active {
    cursor: grabbing;
}
.ed-entry-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ed-entry-body {
    padding: 14px;
    background: var(--bg);
}
.ed-entry.collapsed .ed-entry-body {
    display: none;
}
.ed-entry.collapsed .ed-entry-header {
    border-bottom: none;
}

/* ===== Add Entry Button V2 ===== */
.ed-add-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.ed-add-entry-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: rgba(59,130,246,0.05);
}

/* ================================================================ */
/* ===== COMPREHENSIVE MOBILE RESPONSIVE                      ===== */
/* ================================================================ */

/* --- Touch-friendly base --- */
@media (hover: none) and (pointer: coarse) {
    .btn, button { min-height: 44px; }
    .nav-link { min-height: 44px; display: inline-flex; align-items: center; }
    .form-control, input[type="text"], input[type="email"], input[type="password"],
    input[type="url"], textarea, select {
        font-size: 16px !important; /* prevents iOS zoom on focus */
    }
}

/* --- Global mobile helpers (480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .navbar { padding: 0 12px; height: 48px; }
    .nav-brand span { font-size: 0.85rem; }
    .brand-icon { width: 28px; height: 28px; }
    .brand-icon svg { width: 16px; height: 16px; }
    .footer { padding: 16px 12px; font-size: 0.75rem; margin-top: 32px; }
    .btn { font-size: 0.82rem; padding: 8px 14px; }
    .btn-lg { font-size: 0.9rem; padding: 12px 20px; }
}

/* --- Home page mobile (768px) --- */
@media (max-width: 768px) {
    .hero-corporate { padding: 48px 0 36px; }
    .hero-corporate h1 { font-size: 2rem; }
    .hero-corporate .hero-sub { font-size: 1rem; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .how-it-works { padding: 48px 0; }
    .how-it-works .section-title { font-size: 1.5rem; }
    .features-corporate { padding: 48px 0; }
    .templates-corporate { padding: 48px 0; }
    .testimonials { padding: 48px 0; }
    .cta-corporate { padding: 48px 0; }
    .cta-corporate h2 { font-size: 1.75rem; }
    .cta-actions { flex-direction: column; gap: 10px; }
    .cta-actions .btn { width: 100%; }
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.95rem; margin-bottom: 32px; }
}

/* --- Dashboard mobile (768px) --- */
@media (max-width: 768px) {
    .dashboard-page { padding-top: 16px; }
    .dash-welcome { flex-direction: column; gap: 14px; }
    .dash-welcome h1 { font-size: 1.4rem; }
    .dash-header-actions { width: 100%; }
    .dash-header-actions .btn { flex: 1; }
    .dash-toolbar { flex-direction: column; align-items: stretch; }
    .dash-quick-actions { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .dash-quick-actions::-webkit-scrollbar { display: none; }
    .dash-quick-btn { flex-shrink: 0; font-size: 0.8rem; padding: 6px 12px; }
    .dash-view-toggle { align-self: flex-end; }
    .dash-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .dash-select-bar { flex-direction: column; gap: 10px; }
    .dash-select-actions { width: 100%; display: flex; gap: 8px; }
    .dash-select-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
    .dash-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-stat-widget { padding: 12px; }
    .dash-stat-value { font-size: 1.1rem; }
    .dash-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-card-actions { padding: 8px; gap: 2px; }
    .dash-card-action { font-size: 0.7rem; padding: 4px; }
    .dl-modal { max-width: 96vw; }
    .dl-body { padding: 14px; }
}

/* --- Editor mobile (900px already exists, enhance further) --- */
@media (max-width: 600px) {
    .ed-navbar { padding: 0 8px; height: 44px; }
    .ed-nav-btn { padding: 4px 6px; font-size: 11px; }
    .ed-nav-btn-label { display: none; }
    .ed-title-input { max-width: 140px; font-size: 0.8rem; }
    .ed-template-indicator { padding: 4px 8px; gap: 4px; }
    .ed-template-indicator .template-name { display: none; }
    .ed-form-panel { font-size: 0.85rem; }
    .ed-section-header-v2 { padding: 10px 12px; }
    .ed-section-body-v2 { padding: 10px 12px; }
    .ed-field label { font-size: 0.8rem; }
    .ed-field input, .ed-field select, .ed-field textarea { font-size: 0.85rem; padding: 8px 10px; }
    .ed-preview-zoom { padding: 4px 8px; }
    .ed-zoom-btn { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
    .ed-layout { flex-direction: column; }
    .ed-form-panel { width: 100% !important; max-width: none !important; border-right: none; border-bottom: 1px solid var(--border); height: 55vh; min-height: 300px; }
    .ed-preview-panel { height: 45vh; min-height: 250px; }
    .ed-side-panel { position: fixed; top: 44px; left: 0; right: 0; height: calc(100vh - 44px); z-index: 150; box-shadow: var(--shadow-xl); width: 100%; }
}

/* --- Auth pages mobile (768px already exists, enhance) --- */
@media (max-width: 480px) {
    .auth-form-side { padding: 16px; }
    .auth-card { padding: 24px 16px; }
    .auth-card-header h1 { font-size: 1.5rem; }
    .btn-social { font-size: 0.85rem; padding: 10px; }
    .auth-footer { padding: 16px; flex-direction: column; gap: 8px; text-align: center; }
    .auth-security-badge { justify-content: center; }
}

/* --- Cover Letters mobile --- */
@media (max-width: 768px) {
    .cl-corporate { padding: 24px 0 48px; }
    .cl-header { flex-direction: column; gap: 14px; align-items: stretch; }
    .cl-header .btn { width: 100%; justify-content: center; }
    .cl-header h1 { font-size: 1.4rem; }
}

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

/* --- Score overlay mobile --- */
@media (max-width: 640px) {
    .score-overlay-content { max-width: 96vw; padding: 20px 14px; }
    .score-ring-wrapper svg { width: 120px; height: 120px; }
    .score-breakdown { grid-template-columns: 1fr; }
}

/* --- Print: hide nav/footer/controls --- */
@media print {
    .navbar, .footer, .ed-navbar, .ed-form-panel, .ed-side-panel,
    .ed-preview-zoom, .ed-page-number, .ed-page-break, .ed-page-gap { display: none !important; }
    .ed-preview-panel { width: 100% !important; height: auto !important; overflow: visible !important; }
    .ed-preview-pages { transform: none !important; margin: 0 !important; }
    .ed-preview-page { box-shadow: none !important; border: none !important; }
}
