/* ═══════════════════════════════════════════════════════════
   ResumeForge — Main UI Styles
   Aesthetic: Editorial Precision — Warm cream + Midnight Navy
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fdfbf7;
    --bg-warm: #f4f2ea;
    --surface: #ffffff;
    --sidebar-bg: #111118;
    --sidebar-hover: #1c1c28;
    --sidebar-active: #232330;
    --sidebar-text: #a8a8c0;
    --sidebar-text-active: #f0eeff;
    --sidebar-accent: #fbbf24;

    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-subtle: rgba(251, 191, 36, 0.15);

    --text: #141420;
    --text-secondary: #6b6b7a;
    --text-muted: #9999aa;

    --border: #e0dcd4;
    --border-light: #ece8e0;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);

    --radius: 8px;
    --radius-lg: 12px;

    --header-h: 58px;
    --nav-w: 200px;
    --editor-w: 400px;
    --font-ui: 'DM Sans', sans-serif;
    --font-display: 'Syne', sans-serif;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ─── App Header ─── */
.app-header {
    height: var(--header-h);
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    flex-shrink: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: -0.5px;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.resume-name-input {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 14px;
    padding: 6px 12px;
    width: 260px;
    text-align: center;
    transition: all 0.2s;
    outline: none;
}

.resume-name-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.resume-name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: var(--font-ui);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.export-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.btn-primary {
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 6px 0 0 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-family: var(--font-ui);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary-ghost {
    background: rgba(251, 191, 36, 0.2);
    border: none;
    color: #fcd34d;
    border-radius: 0 6px 6px 0;
    padding: 7px 10px;
    font-size: 12px;
    font-family: var(--font-ui);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 1px solid rgba(251, 191, 36, 0.3);
}

.btn-primary-ghost:hover {
    background: rgba(251, 191, 36, 0.35);
}

.score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 10px;
    min-width: 50px;
    cursor: default;
}

#scoreValue {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.score-label {
    font-size: 9px;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ─── Workspace ─── */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ─── Section Navigation ─── */
.section-nav {
    width: var(--nav-w);
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    overflow-y: auto;
    flex-shrink: 0;
    padding: 16px 0 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-label {
    padding: 14px 16px 6px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(168, 168, 192, 0.4);
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.nav-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.6;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item:hover svg {
    opacity: 0.9;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    border-left-color: var(--sidebar-accent);
    font-weight: 500;
}

.nav-item.active svg {
    opacity: 1;
}

/* ─── Editor Panel ─── */
.editor-panel {
    width: var(--editor-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Section Headers ─── */
.section-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.section-body {
    padding: 20px 24px;
}

/* ─── Form Elements ─── */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-family: var(--font-ui);
    font-size: 13.5px;
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b7a' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Toggle Switch ─── */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}

.toggle input:checked+.toggle-slider {
    background: var(--accent);
}

.toggle input:checked+.toggle-slider::before {
    transform: translateX(16px);
}

/* ─── Cards for list items ─── */
.item-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--surface);
    position: relative;
    transition: border-color 0.2s;
}

.item-card:hover {
    border-color: #c0bcb4;
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.item-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.item-card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.item-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: var(--bg-warm);
    color: var(--text);
}

.btn-icon.danger:hover {
    background: #fff0f0;
    color: var(--accent);
}

.btn-add {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    margin-top: 4px;
}

.btn-add:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

/* ─── AI Button ─── */
.btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6c63ff22, #fbbf2422);
    border: 1px solid rgba(108, 99, 255, 0.25);
    border-radius: 20px;
    color: #6c63ff;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ai:hover {
    background: linear-gradient(135deg, #6c63ff33, #fbbf2433);
    border-color: rgba(108, 99, 255, 0.4);
}

.btn-ai .ai-spark {
    font-size: 14px;
}

/* ─── Skills Section ─── */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name-input {
    flex: 1;
}

.skill-level-select {
    width: 120px;
    flex-shrink: 0;
}

/* ─── Preview Panel ─── */
.preview-panel {
    flex: 1;
    background: var(--bg-warm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.preview-toolbar {
    height: 44px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.preview-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctrl-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
}

.ctrl-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

.zoom-display {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: center;
}

.preview-viewport {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.cv-paper {
    width: 794px;
    /* A4 */
    min-height: 1123px;
    background: white;
    box-shadow: var(--shadow-lg);
    transform-origin: top center;
    transition: transform 0.2s;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* ─── Template Gallery ─── */
.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--surface);
}

.template-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.template-thumb {
    height: 160px;
    overflow: hidden;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-thumb-placeholder {
    width: 90%;
    height: 90%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.template-info {
    padding: 10px 12px;
    border-top: 1px solid var(--border-light);
}

.template-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.template-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 4px;
    font-weight: 500;
}

.tag-corporate {
    background: #e8f0fe;
    color: #1a56db;
}

.tag-minimal {
    background: #f0fdf4;
    color: #15803d;
}

.tag-creative {
    background: #fdf4ff;
    color: #7c3aed;
}

.tag-executive {
    background: #fff7ed;
    color: #c2410c;
}

.selected-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.template-card.selected .selected-check {
    display: flex;
}

/* ─── Customize Panel ─── */
.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: var(--text);
    transform: scale(1.1);
}

.font-option {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.font-option:hover {
    border-color: var(--accent);
}

.font-option.selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

/* ─── Photo Upload ─── */
.photo-upload-area {
    width: 100%;
    height: 130px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.photo-upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.photo-upload-area img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    opacity: 0;
    transition: 0.2s;
}

.photo-upload-area:hover .photo-upload-overlay {
    opacity: 1;
}

.photo-upload-icon {
    font-size: 28px;
}

.photo-upload-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ─── Progress bar (skills) ─── */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.3s;
}

/* ─── Modals ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-modal {
    width: 560px;
}

.saved-modal {
    width: 500px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.ai-icon {
    color: #6c63ff;
    font-size: 16px;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    color: var(--text-muted);
    font-size: 13px;
}

.ai-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.ai-suggestion {
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    line-height: 1.6;
}

.ai-suggestion:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.ai-suggestion-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* ─── Resume Score ─── */
.score-breakdown {
    padding: 0;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.score-item-label {
    width: 120px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.score-item-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.score-item-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), #ff8c94);
    transition: width 0.5s ease;
}

.score-item-value {
    width: 36px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* ─── Saved Resumes ─── */
.saved-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-item:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.saved-item-name {
    font-weight: 500;
    font-size: 14px;
}

.saved-item-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.saved-item-actions {
    display: flex;
    gap: 6px;
}

/* ─── Toast Notifications ─── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-ui);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 300px;
}

.toast.success {
    background: #15803d;
}

.toast.error {
    background: var(--accent);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ─── Dividers & Misc ─── */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 13px;
}

/* ─── Collapsible Section ─── */
.collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
}

.collapse-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.collapse-icon {
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--text-muted);
}

.collapse-header.open .collapse-icon {
    transform: rotate(90deg);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    :root {
        --editor-w: 340px;
    }
}

@media (max-width: 900px) {
    .section-nav {
        display: none;
    }

    :root {
        --editor-w: 300px;
    }
}

@media (max-width: 700px) {
    .editor-panel {
        display: none;
    }

    .preview-panel {
        flex: 1;
    }
}

/* ─── Print Styles ─── */
@media print {

    .app-header,
    .section-nav,
    .editor-panel,
    .preview-toolbar {
        display: none !important;
    }

    .preview-viewport {
        padding: 0 !important;
    }

    .cv-paper {
        box-shadow: none !important;
        transform: none !important;
        width: 100% !important;
    }

    body {
        background: white !important;
    }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c0bcb4;
}

/* ─── Range input ─── */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}