/* CvFaction CV Editörü Stilleri
   - Editör UI ve Canvas düzeni
   - 8 profesyonel CV Şablonu
   - PDF / Baskı optimizasyonları
*/

/* ── Temel Reset ve Değişkenler ───────────────────────── */
:root {
    --primary: #0e7490;
    --primary-hover: #0891b2;
    --primary-light: rgba(14, 116, 144, 0.1);
    --primary-rgb: 14, 116, 144;

    --bg-app: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-ui: #e2e8f0;

    --shadow-ui: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);

    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.editor-body {
    font-family: var(--font-ui);
    background-color: var(--bg-app);
    color: var(--text-main);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.editor-body.format-toolbar-open .mobile-nav {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

body.editor-body.tools-open,
body.editor-body.mobile-sheet-open {
    overflow: hidden;
    touch-action: none;
}

/* ── Üst Bar (Topbar) ─────────────────────────────────── */
.topbar {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-ui);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary), #0369a1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}

.topbar-logo .brand-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: block;
    border: 1.5px solid #0a0a0a;
    box-shadow: 3px 3px 0 #0a0a0a;
    -webkit-text-fill-color: initial;
    background: none;
}

.topbar-logo i {
    background: linear-gradient(135deg, var(--primary), #0369a1);
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: white;
    padding: 6px;
    border-radius: 8px;
    font-size: 16px;
}

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

.topbar-hint {
    font-size: 13px;
    color: var(--text-muted);
    background-color: #f8fafc;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px dashed var(--border-ui);
}

.save-state {
    font-size: 13px;
    font-weight: 500;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Canlı ATS göstergesi (üst bar) ─────────────────── */
.ats-live-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border-ui);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.ats-live-badge:hover {
    border-color: rgba(14, 116, 144, 0.45);
    box-shadow: 0 4px 14px rgba(14, 116, 144, 0.12);
    transform: translateY(-1px);
}

.ats-live-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: var(--text-main);
    transition: border-color 0.25s, background 0.25s;
}

.ats-live-ring[data-tier="excellent"] { border-color: #34d399; background: #ecfdf5; color: #047857; }
.ats-live-ring[data-tier="good"] { border-color: #fbbf24; background: #fffbeb; color: #b45309; }
.ats-live-ring[data-tier="low"] { border-color: #f87171; background: #fef2f2; color: #b91c1c; }

.ats-live-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    text-align: left;
}

.ats-live-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.ats-live-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Canlı eksik kelime şeridi ───────────────────────── */
.ats-live-strip {
    background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-ui);
    z-index: 45;
    flex-shrink: 0;
}

.ats-live-strip-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.ats-live-strip-inner::-webkit-scrollbar { display: none; }

.ats-live-strip-inner > i {
    color: var(--primary);
    flex-shrink: 0;
}

.ats-live-strip-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.ats-live-strip-chips {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.ats-live-chip {
    border: 1px dashed #fca5a5;
    background: #fff;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.ats-live-chip:hover {
    background: #fef2f2;
}

.ats-live-strip-btn {
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.tool-tab-badge {
    margin-left: 4px;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    background: #e2e8f0;
    color: var(--text-main);
}

.tool-tab-badge[data-tier="excellent"] { background: #d1fae5; color: #047857; }
.tool-tab-badge[data-tier="good"] { background: #fef3c7; color: #b45309; }
.tool-tab-badge[data-tier="low"] { background: #fee2e2; color: #b91c1c; }

.tools-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 35;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.tools-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobil alt navigasyon ─────────────────────────────── */
.mobile-nav {
    display: none;
}

.tools-drawer-header {
    display: none;
}

.mobile-only-btn {
    display: none;
}

.mobile-sheet {
    display: none;
}

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

.lang-switcher {
    display: flex;
    align-items: center;
}

.lang-select {
    height: 34px;
    padding: 0 26px 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #fff);
    color: var(--text, #0f172a);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.lang-select:focus {
    outline: 2px solid var(--accent, #0e7490);
    outline-offset: 1px;
}

/* ── Butonlar ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: white;
    box-shadow: 0 4px 10px rgba(14, 116, 144, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(14, 116, 144, 0.3);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.btn:disabled,
.btn:disabled:hover {
    opacity: 0.42;
    cursor: not-allowed;
    background-color: transparent;
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

.btn-soft {
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-soft:hover {
    background-color: rgba(14, 116, 144, 0.18);
}

/* ── PDF eylem simgesi (ortak) ─────────────────────────── */
.km-pdf-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
    color: inherit;
}

.km-pdf-action i {
    font-size: 17px;
}

.km-pdf-action-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.km-pdf-action--inline {
    flex-direction: row;
    gap: 8px;
}

.km-pdf-action--inline .km-pdf-action-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-pdf {
    background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
    border: 1px solid transparent;
    color: #fff;
    padding: 9px 16px;
    min-width: auto;
    border-radius: 10px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 14px rgba(14, 116, 144, 0.35);
    animation: pdfCtaPulse 2.4s ease-in-out 3;
}

.btn-pdf .km-pdf-action,
.btn-pdf .km-pdf-action-label {
    color: inherit;
}

.btn-pdf .km-pdf-action i {
    font-size: 16px;
}

.btn-pdf:hover {
    background: linear-gradient(135deg, #0f766e 0%, var(--primary-hover) 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 8px 20px rgba(14, 116, 144, 0.42);
    animation: none;
}

.btn-pdf:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.3);
}

@keyframes pdfCtaPulse {
    0%, 100% {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.2) inset,
            0 4px 14px rgba(14, 116, 144, 0.35);
    }
    50% {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.2) inset,
            0 4px 14px rgba(14, 116, 144, 0.35),
            0 0 0 6px rgba(14, 116, 144, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-pdf {
        animation: none;
    }
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ── Shell & Panel Düzeni ──────────────────────────────── */
.editor-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.editor-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* Sol Araç Paneli */
.tools {
    width: 340px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-ui);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    z-index: 40;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.tool-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-ui);
    background-color: #f8fafc;
}

.tool-tab {
    flex: 1;
    padding: 14px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tool-tab:hover {
    color: var(--primary);
    background-color: #ffffff;
}

.tool-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: #ffffff;
}

.tool-tab i {
    font-size: 16px;
}

.tool-panel {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.tool-panel.active {
    display: block;
}

.panel-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.panel-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Kontroller */
.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-val {
    color: var(--primary);
    font-weight: 800;
}

.control-select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background-color: #ffffff;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.control-input,
.control-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background-color: #ffffff;
    font-size: 14px;
    color: var(--text-main);
    font-family: var(--font-ui);
    transition: border-color 0.2s;
    resize: vertical;
}

.control-textarea {
    min-height: 120px;
    line-height: 1.5;
}

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

/* ── ATS Skor Paneli ──────────────────────────────────── */
.ats-score-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid var(--border-ui);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 20px;
    text-align: center;
}

.ats-score-card[data-tier="excellent"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}

.ats-score-card[data-tier="good"] {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.ats-score-card[data-tier="low"] {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.ats-score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ats-score-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
}

.ats-score-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.ats-score-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.ats-criteria {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.ats-criterion {
    background: #ffffff;
    border: 1px solid var(--border-ui);
    border-radius: 10px;
    padding: 12px;
}

.ats-criterion-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.ats-criterion-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.ats-criterion-weight {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.ats-criterion-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.ats-criterion-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #0284c7);
    transition: width 0.35s ease;
}

.ats-criterion-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.ats-criterion-note {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

.ats-keywords {
    margin-bottom: 20px;
}

.ats-kw-block {
    margin-bottom: 14px;
}

.ats-kw-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ats-kw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ats-kw-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.3;
}

.ats-kw-chip.matched {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.ats-kw-chip.missing {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.ats-kw-chip--action {
    cursor: pointer;
    transition: background-color 0.15s, transform 0.1s;
}

.ats-kw-chip--action:hover {
    background-color: #fecaca;
    transform: translateY(-1px);
}

.ats-kw-chip--action i {
    font-size: 9px;
    margin-left: 4px;
    opacity: 0.7;
}

.ats-kw-hint {
    font-weight: 400;
    font-size: 10px;
    color: var(--text-muted);
}

.ats-kw-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.ats-tips {
    background: #f8fafc;
    border: 1px dashed var(--border-ui);
    border-radius: 10px;
    padding: 12px;
}

.ats-tips-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ats-tips-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
}

.ats-tips-list li + li {
    margin-top: 6px;
}

.color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.swatch {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.swatch:hover {
    transform: scale(1.1);
}

.swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
    transform: scale(1.1);
}

.swatch.active::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.swatch-reset {
    background-color: #f1f5f9;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 44px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border-ui);
    border-radius: 6px;
}

/* ── Tasarım Paneli ───────────────────────────────────── */
.design-status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid var(--border-ui);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.design-status-card i {
    color: var(--primary);
    font-size: 15px;
}

.design-status-card.is-multi {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.design-status-card.is-multi i {
    color: #d97706;
}

.design-warnings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.design-warning {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.design-warning i {
    margin-top: 2px;
    flex-shrink: 0;
}

.design-warning--ats {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.design-warning--ats i { color: #2563eb; }

.design-warning--contrast {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.design-warning--contrast i { color: #ea580c; }

.design-warning--photo {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.design-warning--photo i { color: #16a34a; }

.color-custom-row {
    margin-top: 4px;
}

.btn-color-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed var(--border-ui);
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-color-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.design-preset-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.design-preset-btn {
    padding: 10px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.design-preset-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.font-preview {
    margin-top: 10px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background: #f8fafc;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-main);
}

.range-hints {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: -2px;
}

.design-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-ui);
}

.btn-design-optimize {
    background: rgba(14, 116, 144, 0.1) !important;
    color: var(--primary) !important;
}

.design-photo-group.is-ats-muted {
    opacity: 0.55;
}

.design-photo-ats-note {
    margin-top: -8px;
    margin-bottom: 12px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-ui);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.photo-btns {
    display: flex;
    gap: 10px;
}

.photo-btns .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

/* Şablon Kart Izgarası */
.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.template-card {
    position: relative;
    background: none;
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: var(--primary);
    background-color: #f8fafc;
}

.template-card.active {
    border-color: var(--primary);
    background-color: rgba(14, 116, 144, 0.04);
    box-shadow: 0 0 0 1px var(--primary);
}

.tc-thumb {
    height: 100px;
    background: linear-gradient(160deg, #e2e8f0 0%, #f1f5f9 100%);
    border-radius: 6px;
    border: 1px solid var(--border-ui);
    overflow: hidden;
    position: relative;
    padding: 7px;
}

/* Gerçekçi şablon önizlemeleri */
.tc-doc {
    display: flex;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.tc-side {
    width: 34%;
    padding: 5px 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.tc-main {
    flex: 1;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tc-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.45);
    margin-bottom: 1px;
    flex-shrink: 0;
}

.tc-line {
    display: block;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    flex-shrink: 0;
}

.tc-line--bold {
    height: 3px;
    background: #cbd5e1;
}

.tc-line--inv {
    background: rgba(255, 255, 255, 0.38);
}

.tc-line--center {
    align-self: center;
}

.tc-heading {
    display: block;
    height: 2px;
    width: 42%;
    border-radius: 1px;
    margin: 2px 0 1px;
    opacity: 0.85;
}

.tc-band {
    display: block;
    height: 14px;
    width: 100%;
    flex-shrink: 0;
}

.tc-body-pad {
    flex: 1;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tc-rule {
    display: block;
    height: 1px;
    width: 55%;
    background: #cbd5e1;
    margin: 3px auto;
}

.tc-two-col {
    display: flex;
    gap: 5px;
    flex: 1;
    min-height: 0;
}

.tc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tc-stripe {
    width: 4px;
    background: var(--tc);
    flex-shrink: 0;
}

.tc-doc--klasik {
    flex-direction: column;
    align-items: center;
    padding: 7px 8px;
    gap: 3px;
}

.tc-doc--bordo {
    flex-direction: column;
}

.tc-doc--minimal {
    flex-direction: column;
    padding: 0;
}

.tc-doc--minimal .tc-min-bar {
    height: 3px;
    width: 100%;
    background: var(--tc);
    flex-shrink: 0;
}

.tc-doc--minimal .tc-body-pad {
    padding: 5px 8px;
}

.tc-doc--timeline .tc-tl-row {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.tc-doc--timeline .tc-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1.5px solid var(--tc);
    margin-top: 1px;
    flex-shrink: 0;
}

.tc-doc--timeline .tc-tl-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tc-doc--kurumsal {
    flex-direction: column;
}

.tc-doc--kurumsal .tc-corp-head {
    height: 22px;
    width: 100%;
    background: var(--tc);
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    padding: 0 6px 3px;
    gap: 4px;
}

.tc-doc--kurumsal .tc-corp-photo {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.tc-doc--kurumsal .tc-corp-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 1px;
}

.tc-doc--kurumsal .tc-corp-lines .tc-line {
    background: rgba(255, 255, 255, 0.45);
}

.tc-doc--ats .tc-body-pad {
    padding: 6px 8px;
}

.tc-doc--ats-modern {
    flex-direction: row;
}

.tc-tag-row {
    display: flex;
    gap: 3px;
    margin: 1px 0;
}

.tc-tag {
    height: 4px;
    width: 14px;
    border-radius: 2px;
    background: rgba(14, 116, 144, 0.15);
    border: 1px solid rgba(14, 116, 144, 0.25);
}

.tc-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.template-card .tc-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(14, 116, 144, 0.35);
    z-index: 2;
}

.template-card.active .tc-check {
    display: flex;
}

/* ── Masaüstü: Sol Araç Paneli ─────────────────────────── */
@media (min-width: 821px) {
    .tools {
        width: 380px;
        background: linear-gradient(180deg, #f8fafc 0%, #ffffff 140px);
        box-shadow: 1px 0 0 rgba(226, 232, 240, 0.8);
    }

    .tool-tabs {
        padding: 10px 12px 0;
        gap: 4px;
        background: transparent;
        border-bottom: 1px solid var(--border-ui);
    }

    .tool-tab {
        flex: 1;
        padding: 10px 6px 12px;
        font-size: 11px;
        gap: 5px;
        border-radius: 10px 10px 0 0;
        position: relative;
        min-width: 0;
    }

    .tool-tab span:not(.tool-tab-badge) {
        line-height: 1.2;
        text-align: center;
    }

    .tool-tab i {
        font-size: 15px;
    }

    .tool-tab:hover {
        background: rgba(255, 255, 255, 0.7);
    }

    .tool-tab.active {
        background: #fff;
        box-shadow: 0 -1px 0 var(--border-ui) inset;
    }

    .tool-tab-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        margin: 0;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 9px;
        line-height: 18px;
        border-radius: 999px;
    }

    .tool-panel {
        padding: 18px 18px 24px;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }

    .tool-panel::-webkit-scrollbar {
        width: 6px;
    }

    .tool-panel::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    .panel-desc {
        background: #f8fafc;
        border: 1px dashed #e2e8f0;
        border-radius: 10px;
        padding: 11px 13px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .template-grid {
        gap: 14px;
    }

    .template-card {
        padding: 11px;
        border-radius: 12px;
        background: #fff;
    }

    .template-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        border-color: rgba(14, 116, 144, 0.45);
    }

    .template-card.active {
        border-color: var(--primary);
        background: linear-gradient(180deg, rgba(14, 116, 144, 0.06) 0%, #fff 60%);
        box-shadow: 0 0 0 1px var(--primary), 0 8px 20px rgba(14, 116, 144, 0.12);
    }

    .tc-thumb {
        height: 112px;
        border-radius: 8px;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    }

    .tc-name {
        font-size: 12px;
    }
}

@media (min-width: 1280px) {
    .tools {
        width: 400px;
    }

    .tool-tab {
        font-size: 12px;
        padding: 11px 8px 13px;
    }

    .tool-panel {
        padding: 20px 20px 28px;
    }

    .tc-thumb {
        height: 124px;
    }
}

/* Bölüm Görünürlükleri */
.section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.section-toggle:hover {
    background-color: #f1f5f9;
}

.section-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-ui);
    cursor: pointer;
}

@media (min-width: 821px) {
    .section-toggle {
        padding: 11px 14px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .section-toggle:hover {
        border-color: rgba(14, 116, 144, 0.3);
        background: #fff;
    }

    .control-group {
        margin-bottom: 18px;
    }

    .design-status-card {
        border-radius: 10px;
    }
}

/* ── Orta: Çalışma Alanı ───────────────────────────── */
.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.canvas-toolbar {
    height: 48px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-ui);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.tools-toggle {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-ui);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 20px;
}

.zoom-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--border-ui);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
    font-size: 10px;
}

.zoom-btn:hover {
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#zoomLabel {
    font-size: 12px;
    font-weight: 700;
    width: 44px;
    text-align: center;
}

.page-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
}

.canvas-scroll {
    flex: 1;
    overflow: auto;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.paper-wrap {
    transform-origin: top center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
}

/* A4 Kağıt Simülasyonu */
.cv-paper {
    width: 794px;
    /* A4 standardı 96 DPI */
    min-height: 1123px;
    background-color: #ffffff;
    box-shadow: var(--shadow-card);
    padding: var(--cv-pad, 42px);
    line-height: var(--cv-lh, 1.5);
    font-size: var(--cv-fs, 10.5pt);
    color: #1f2937;
    position: relative;
    box-sizing: border-box;
    text-align: left;
    outline: none;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

/* Tipografi ile sığmayan şablonlar: tek sayfaya zoom ile sığdır */
.cv-paper.cv-fit-scaled {
    zoom: var(--cv-fit-zoom, 1);
    overflow: hidden;
    height: 1123px !important;
    min-height: 1123px !important;
}

.tpl {
    flex: 1;
}

/* ── CV Genel Bileşenler & Etkileşimler ─────────────────── */
[contenteditable="true"] {
    outline: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

[contenteditable="true"]:hover {
    background-color: rgba(14, 116, 144, 0.05);
    outline: 1px dashed rgba(14, 116, 144, 0.35);
}

[contenteditable="true"]:focus {
    background-color: rgba(14, 116, 144, 0.08);
    outline: 2px solid var(--cv-accent, var(--primary));
    box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.1);
}

/* Madde Silme ve Ekleme Butonları */
.cv-item,
.cv-skill,
.cv-lang,
.cv-cert,
.cv-custom-head {
    position: relative;
}

.cv-del {
    position: absolute;
    top: 50%;
    right: -24px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    border: none;
    z-index: 10;
}

.cv-item:hover .cv-del,
.cv-skill:hover .cv-del,
.cv-lang:hover .cv-del,
.cv-cert:hover .cv-del,
.cv-custom-head:hover .cv-del {
    opacity: 1;
}

.cv-del:hover {
    background-color: #dc2626;
    transform: translateY(-50%) scale(1.15);
}

@media (hover: none) and (pointer: coarse) {
    .cv-del {
        opacity: 0.9;
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .cv-item .cv-del,
    .cv-skill .cv-del,
    .cv-lang .cv-del,
    .cv-cert .cv-del,
    .cv-custom-head .cv-del {
        right: 0;
        top: 0;
        transform: none;
    }

    .cv-tag .cv-del {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Şablon içindeki butonlar için yerleştirme detayları */
.cv-tag .cv-del {
    top: -6px;
    right: -6px;
    transform: none;
    width: 14px;
    height: 14px;
    font-size: 8px;
}

.cv-tag:hover .cv-del {
    opacity: 1;
}

.cv-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--cv-accent, var(--primary));
    background-color: rgba(14, 116, 144, 0.05);
    border: 1px dashed rgba(14, 116, 144, 0.25);
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.cv-add:hover {
    background-color: rgba(14, 116, 144, 0.1);
    border-color: var(--cv-accent, var(--primary));
}

/* Fotoğraf Alanı */
.cv-photo {
    width: 110px;
    height: 110px;
    background-color: #f1f5f9;
    border: 2px solid var(--border-ui);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.cv-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-photo-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.cv-photo-empty i {
    font-size: 24px;
}

.cv-photo-circle {
    border-radius: 50%;
}

.cv-photo-square {
    border-radius: 8px;
}

/* İletişim Detayları */
.cv-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cv-contact-item i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* Blok ve Yapı Elemanları */
.cv-block {
    margin-bottom: var(--cv-section-gap, 24px);
}

.cv-sec-title {
    font-weight: 800;
    margin-bottom: 14px;
}

.cv-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}

.cv-role {
    font-size: 1.1em;
    color: #2d2c2c;
}

.cv-dates {
    font-weight: 600;
    font-size: 0.9em;
}

.cv-item-sub {
    font-size: 0.95em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.cv-dot-sep {
    margin: 0 4px;
    color: var(--border-ui);
}

.cv-text {
    color: #374151;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: pre-line;
    margin-top: 6px;
    margin-bottom: 0;
}

.cv-note {
    font-style: italic;
    color: var(--text-muted);
}

/* Yetenekler */
.cv-skill {
    margin-bottom: var(--cv-item-gap, 12px);
}

.cv-skill-name {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.cv-skill-bar {
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cv-skill-fill {
    height: 100%;
    background-color: var(--cv-accent, var(--primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-tag {
    background-color: #f1f5f9;
    border: 1px solid var(--border-ui);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.cv-plain-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cv-plain-item {
    font-weight: 500;
    position: relative;
}

/* Dil & Sertifikalar */
.cv-lang {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--cv-item-gap, 8px);
}

.cv-lang-name {
    font-weight: 600;
}

.cv-lang-level {
    color: var(--text-muted);
    font-size: 0.9em;
}

.cv-cert {
    margin-bottom: var(--cv-item-gap, 12px);
}

/* Özel Bölümler */
.cv-custom-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-custom-head h3 {
    flex: 1;
}


/* ── ŞABLONLAR ────────────────────────────────────────── */

/* 1. Şablon: Koyu Sidebar (tpl-sidebar-koyu) */
.tpl-sidebar-koyu {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 1123px;
    margin: calc(-1 * var(--cv-pad, 42px));
}

.tpl-sidebar-koyu .sk-side {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tpl-sidebar-koyu .sk-side .cv-photo {
    align-self: center;
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
}

.tpl-sidebar-koyu .sk-title {
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.tpl-sidebar-koyu .sk-side .cv-contact-item i {
    color: var(--cv-accent, var(--primary));
}

.tpl-sidebar-koyu .sk-side .cv-skill-bar {
    background-color: rgba(255, 255, 255, 0.1);
}

.tpl-sidebar-koyu .sk-side .cv-text {
    color: #cbd5e1;
}

.tpl-sidebar-koyu .sk-side .cv-role,
.tpl-sidebar-koyu .sk-side .cv-skill-name,
.tpl-sidebar-koyu .sk-side .cv-lang-name {
    color: #f1f5f9;
}

.tpl-sidebar-koyu .sk-side .cv-dates {
    color: #e2e8f0;
}

.tpl-sidebar-koyu .sk-side .cv-item-sub,
.tpl-sidebar-koyu .sk-side .cv-company,
.tpl-sidebar-koyu .sk-side .cv-lang-level,
.tpl-sidebar-koyu .sk-side .cv-contact-item {
    color: #94a3b8;
}

.tpl-sidebar-koyu .sk-side [contenteditable="true"]:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.tpl-sidebar-koyu .sk-main {
    padding: 42px 36px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tpl-sidebar-koyu .sk-header {
    border-bottom: 2px solid var(--border-ui);
    padding-bottom: 20px;
    margin-bottom: 8px;
}

.tpl-sidebar-koyu .sk-header .cv-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--cv-accent, var(--primary));
}

.tpl-sidebar-koyu .sk-header .cv-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.tpl-sidebar-koyu .sk-main-title {
    color: var(--cv-accent, var(--primary));
    border-bottom: 2px solid var(--cv-accent, var(--primary));
    padding-bottom: 4px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}


/* 2. Şablon: Klasik Serif (tpl-klasik) */
.tpl-klasik {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tpl-klasik .kl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.tpl-klasik .kl-photo {
    margin-bottom: 4px;
    border-color: var(--cv-accent, var(--primary));
}

.tpl-klasik .kl-header .cv-name {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.tpl-klasik .kl-header .cv-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.tpl-klasik .kl-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.tpl-klasik .kl-contact .cv-contact-item {
    margin-bottom: 0;
    font-size: 0.88em;
}

.tpl-klasik .kl-rule {
    height: 1px;
    background-color: var(--cv-accent, var(--primary));
    margin: 2px 0;
}

.tpl-klasik .kl-title {
    color: var(--cv-accent, var(--primary));
    border-bottom: 1px solid var(--border-ui);
    padding-bottom: 3px;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.tpl-klasik .kl-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Klasik Serif: Bölüm ve Öğe Boşluklarını Sıkıştır */
.tpl-klasik .cv-block {
    margin-bottom: 6px;
}

.tpl-klasik .cv-sec-title {
    margin-bottom: 4px;
}

.tpl-klasik .cv-item {
    margin-bottom: 4px;
}

.tpl-klasik .cv-item-sub {
    margin-bottom: 2px;
}

.tpl-klasik .cv-text {
    margin-top: 2px;
    font-size: 0.9em;
}

.tpl-klasik .cv-cert {
    margin-bottom: 4px;
}

.tpl-klasik .cv-lang {
    margin-bottom: 4px;
}

.tpl-klasik .cv-photo {
    width: 72px;
    height: 72px;
    margin-bottom: 2px;
}


/* 3. Şablon: Bordo Bant (tpl-bordo) */
.tpl-bordo {
    display: flex;
    flex-direction: column;
    margin: calc(-1 * var(--cv-pad, 42px));
    min-height: 1123px;
    background-color: #ffffff;
}

.tpl-bordo .bd-band {
    background-color: var(--cv-accent, #7f1d1d);
    color: white;
    padding: 36px 42px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.tpl-bordo .bd-ident {
    flex: 1;
}

.tpl-bordo .bd-ident .cv-name {
    font-size: 32px;
    font-weight: 800;
}

.tpl-bordo .bd-ident .cv-title {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 4px;
}

.tpl-bordo .bd-photo {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.tpl-bordo .bd-contact-row {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-ui);
    padding: 14px 42px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tpl-bordo .bd-contact-row .cv-contact-item {
    margin-bottom: 0;
    font-size: 0.9em;
    font-weight: 500;
}

.tpl-bordo .bd-contact-row i {
    color: var(--cv-accent, #7f1d1d);
}

.tpl-bordo .bd-body {
    padding: 32px 42px;
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 32px;
    flex: 1;
}

.tpl-bordo .bd-main,
.tpl-bordo .bd-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tpl-bordo .bd-title {
    color: var(--cv-accent, #7f1d1d);
    border-bottom: 1px solid var(--cv-accent, #7f1d1d);
    padding-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* 4. Şablon: Minimalist (tpl-minimal) */
.tpl-minimal {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tpl-minimal .mn-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 16px;
}

.tpl-minimal .mn-header .cv-name {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
}

.tpl-minimal .mn-header .cv-title {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.tpl-minimal .mn-contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tpl-minimal .mn-contact .cv-contact-item {
    margin-bottom: 4px;
    justify-content: flex-end;
}

.tpl-minimal .mn-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--border-ui);
    padding-bottom: 6px;
    color: #0f172a;
}

.tpl-minimal .mn-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tpl-minimal .cv-tag {
    background-color: #ffffff;
    border-radius: 4px;
}


/* 5. Şablon: Modern Zaman Çizelgesi (tpl-modern-yesil) */
.tpl-modern-yesil {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: calc(-1 * var(--cv-pad, 42px));
    padding: 0 var(--cv-pad, 42px) var(--cv-pad, 42px);
    background-color: #ffffff;
    min-height: 1123px;
}

.tpl-modern-yesil .my-stripe {
    height: 8px;
    background-color: var(--cv-accent, #0f766e);
    margin: 0 calc(-1 * var(--cv-pad, 42px)) 12px;
}

.tpl-modern-yesil .my-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-modern-yesil .my-ident .cv-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--cv-accent, #0f766e);
}

.tpl-modern-yesil .my-ident .cv-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.tpl-modern-yesil .my-photo {
    border-color: var(--cv-accent, #0f766e);
}

.tpl-modern-yesil .my-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid var(--border-ui);
    padding-bottom: 16px;
}

.tpl-modern-yesil .my-contact-row .cv-contact-item {
    margin-bottom: 0;
    font-size: 0.9em;
}

.tpl-modern-yesil .my-contact-row i {
    color: var(--cv-accent, #0f766e);
}

.tpl-modern-yesil .my-title {
    color: var(--cv-accent, #0f766e);
    border-bottom: 1px solid var(--border-ui);
    padding-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tpl-modern-yesil .my-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Zaman çizgisi */
.tpl-modern-yesil .cv-timeline {
    position: relative;
    border-left: 2px solid var(--cv-accent, #0f766e);
    margin-left: 10px;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tpl-modern-yesil .cv-item-timeline {
    position: relative;
}

.tpl-modern-yesil .tl-dot {
    position: absolute;
    left: -30px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--cv-accent, #0f766e);
    border: 2px solid #ffffff;
}


/* 6. Şablon: Kurumsal Mavi (tpl-kurumsal-mavi) */
.tpl-kurumsal-mavi {
    display: flex;
    flex-direction: column;
    margin: calc(-1 * var(--cv-pad, 42px));
    min-height: 1123px;
    background-color: #ffffff;
}

.tpl-kurumsal-mavi .km-header {
    background-color: var(--cv-accent, #1e3a8a);
    color: white;
    padding: 20px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-kurumsal-mavi .km-ident {
    flex: 1;
}

.tpl-kurumsal-mavi .km-ident .cv-name {
    font-size: 24px;
    font-weight: 800;
}

.tpl-kurumsal-mavi .km-ident .cv-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-top: 2px;
}

.tpl-kurumsal-mavi .km-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.tpl-kurumsal-mavi .km-contact .cv-contact-item {
    margin-bottom: 0;
    font-size: 0.82em;
}

.tpl-kurumsal-mavi .km-photo {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    width: 72px;
    height: 72px;
}

.tpl-kurumsal-mavi .km-body {
    padding: 20px 36px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.tpl-kurumsal-mavi .km-title {
    color: var(--cv-accent, #1e3a8a);
    border-bottom: 2px solid var(--cv-accent, #1e3a8a);
    padding-bottom: 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tpl-kurumsal-mavi .km-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}


/* ── Mobil Uyum Tasarımı (Responsive) ─────────────────── */
@media (max-width: 1100px) {
    .topbar {
        padding: 0 12px;
        gap: 8px;
    }

    .topbar-actions .btn > span:not(.km-pdf-action) {
        display: none;
    }

    .topbar-actions .btn {
        padding: 10px 12px;
    }

    .topbar-logo span {
        display: none;
    }
}

@media (max-width: 820px) {
    body.editor-body {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-only-btn {
        display: inline-flex;
    }

    .tools-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-ui);
        background: #fff;
        flex-shrink: 0;
    }

    .tools-drawer-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--text-main);
    }

    .tools-drawer-close {
        width: 40px;
        height: 40px;
        border: none;
        background: #f1f5f9;
        border-radius: 10px;
        color: var(--text-muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }

    .tools-toggle {
        display: flex;
        width: 40px;
        height: 40px;
    }

    .tools {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(100vw, 380px);
        max-width: 100%;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.18);
        z-index: 70;
    }

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

    .tools-backdrop {
        z-index: 65;
    }

    .tool-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tool-tabs::-webkit-scrollbar {
        display: none;
    }

    .tool-tab {
        flex: 0 0 auto;
        min-width: 76px;
        padding: 12px 10px;
        font-size: 11px;
    }

    .tool-panel {
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .control-input,
    .control-textarea,
    .control-select {
        font-size: 16px;
    }

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

    .topbar {
        height: auto;
        min-height: 48px;
        padding: 6px 10px;
        padding-top: calc(6px + env(safe-area-inset-top, 0));
        gap: 8px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .topbar-logo i {
        padding: 7px;
        font-size: 14px;
        border-radius: 10px;
    }

    .topbar-center {
        gap: 8px;
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
        align-items: center;
    }

    .topbar-hint {
        display: none;
    }

    .save-state {
        font-size: 0;
        width: 7px;
        height: 7px;
        padding: 0;
        border-radius: 50%;
        background: #10b981;
        overflow: hidden;
        flex-shrink: 0;
        box-shadow: 0 0 0 2px #fff;
    }

    .save-state i {
        display: none;
    }

    .ats-live-badge {
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .ats-live-badge:hover {
        transform: none;
        box-shadow: none;
    }

    .ats-live-meta {
        display: none;
    }

    .ats-live-ring {
        width: 36px;
        height: 36px;
        font-size: 12px;
        border-width: 2.5px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .topbar-actions {
        gap: 2px;
        align-items: center;
    }

    .topbar-actions .btn {
        min-width: 38px;
        min-height: 38px;
        padding: 0;
        border-radius: 10px;
    }

    .mobile-only-btn {
        width: 38px;
        height: 38px;
        color: var(--text-muted);
        background: #f8fafc;
        border: 1px solid var(--border-ui);
    }

    .btn-pdf {
        min-width: auto;
        min-height: 38px;
        padding: 6px 12px;
        background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
        border: none;
        color: #fff;
        box-shadow: 0 3px 10px rgba(14, 116, 144, 0.35);
        animation: none;
    }

    .btn-pdf .km-pdf-action--inline {
        gap: 6px;
    }

    .btn-pdf .km-pdf-action i {
        font-size: 15px;
    }

    .btn-pdf .km-pdf-action-label {
        font-size: 12px;
        font-weight: 700;
    }

    .topbar-actions .btn-ghost:not(.mobile-only-btn) {
        display: none;
    }

    .shortcuts-wrap > #btnShortcuts {
        display: none;
    }

    .shortcuts-wrap {
        display: block;
        position: static;
    }

    .shortcuts-panel.open {
        display: block;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0));
        top: auto;
        width: auto;
        z-index: 90;
        max-height: 70vh;
        overflow-y: auto;
    }

    .canvas-scroll {
        padding: 10px 6px 16px;
        -webkit-overflow-scrolling: touch;
    }

    .canvas-toolbar {
        padding: 6px 12px;
        height: 46px;
        background: #f8fafc;
        border-bottom: 1px solid var(--border-ui);
        gap: 8px;
    }

    .tools-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #fff;
        border-color: #e2e8f0;
        flex-shrink: 0;
    }

    .page-hint {
        display: none;
    }

    .zoom-controls {
        gap: 4px;
        padding: 3px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid var(--border-ui);
        margin-left: auto;
    }

    .zoom-btn {
        width: 34px;
        height: 34px;
        border: none;
        background: transparent;
    }

    .zoom-btn:active {
        background: #f1f5f9;
        color: var(--primary);
    }

    #zoomLabel {
        min-width: 38px;
        font-size: 11px;
        font-weight: 800;
        color: var(--text-main);
    }

    .paper-wrap {
        margin: 0 auto;
    }

    .app-footer {
        padding: 10px 12px;
        font-size: 11px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 8px 12px;
        justify-content: center;
    }

    .mobile-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 55;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid rgba(226, 232, 240, 0.9);
        padding-bottom: env(safe-area-inset-bottom, 0);
        box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .mobile-nav-scroll {
        display: flex;
        align-items: stretch;
        padding: 6px 4px;
        gap: 2px;
    }

    .mobile-nav-btn {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 2px;
        border: none;
        background: none;
        color: #94a3b8;
        font-size: 9px;
        font-weight: 700;
        cursor: pointer;
        border-radius: 12px;
        transition: background 0.15s, color 0.15s, transform 0.1s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-btn i {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-nav-btn.active {
        color: var(--primary);
        background: rgba(14, 116, 144, 0.1);
    }

    .mobile-nav-btn.active .km-pdf-action {
        color: var(--primary);
    }

    .mobile-nav-btn:active {
        transform: scale(0.96);
        background: rgba(14, 116, 144, 0.06);
    }

    .mobile-nav-btn--ats {
        color: #94a3b8;
    }

    .mobile-nav-btn--pdf {
        color: #fff;
        background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
        box-shadow: 0 2px 8px rgba(14, 116, 144, 0.3);
        margin: 2px 2px;
        max-width: 64px;
    }

    .mobile-nav-btn--pdf .km-pdf-action,
    .mobile-nav-btn--pdf .km-pdf-action-label {
        color: #fff;
    }

    .mobile-nav-btn--pdf:active {
        background: linear-gradient(135deg, #0f766e 0%, var(--primary) 100%);
        transform: scale(0.96);
    }

    .mobile-nav-btn--ats.active {
        color: var(--primary);
    }

    .mobile-ats-ring {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 800;
        border: 2.5px solid #e2e8f0;
        background: #f8fafc;
    }

    .mobile-ats-ring[data-tier="excellent"] { border-color: #34d399; background: #ecfdf5; color: #047857; }
    .mobile-ats-ring[data-tier="good"] { border-color: #fbbf24; background: #fffbeb; color: #b45309; }
    .mobile-ats-ring[data-tier="low"] { border-color: #f87171; background: #fef2f2; color: #b91c1c; }

    .mobile-sheet {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 85;
        pointer-events: none;
    }

    .mobile-sheet:not([hidden]) {
        pointer-events: auto;
    }

    .mobile-sheet-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        transition: opacity 0.25s;
    }

    .mobile-sheet:not([hidden]) .mobile-sheet-backdrop {
        opacity: 1;
    }

    .mobile-sheet-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-radius: 16px 16px 0 0;
        padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0));
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    }

    .mobile-sheet:not([hidden]) .mobile-sheet-panel {
        transform: translateY(0);
    }

    .mobile-sheet-handle {
        width: 36px;
        height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
        margin: 4px auto 12px;
    }

    .mobile-sheet-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .mobile-sheet-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 0 12px;
        border: none;
        background: none;
        font-size: 15px;
        font-weight: 600;
        color: var(--text-main);
        cursor: pointer;
        border-radius: 10px;
        text-align: left;
    }

    .mobile-sheet-item:active {
        background: #f1f5f9;
    }

    .mobile-sheet-item i {
        width: 20px;
        color: var(--text-muted);
        text-align: center;
    }

    .text-format-toolbar.mobile-fixed {
        position: fixed;
        left: 8px !important;
        right: 8px;
        width: auto;
        top: auto !important;
        bottom: calc(8px + env(safe-area-inset-bottom, 0));
        transform: translateY(12px) scale(0.98);
        max-width: none;
        overflow-x: auto;
        flex-wrap: nowrap;
        z-index: 80;
        padding: 8px 10px;
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .text-format-toolbar.mobile-fixed::-webkit-scrollbar {
        display: none;
    }

    .text-format-toolbar.mobile-fixed.show {
        transform: translateY(0) scale(1);
    }

    .text-format-toolbar.mobile-fixed .tb-btn {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        font-size: 14px;
    }

    .editor-shell {
        padding-bottom: calc(62px + env(safe-area-inset-bottom, 0));
    }

    .ats-live-strip-label {
        display: none;
    }

    .ats-live-strip-inner {
        padding: 6px 10px;
    }

    .ats-live-chip,
    .ats-live-strip-btn {
        min-height: 32px;
    }
}

@media (max-width: 820px) and (orientation: landscape) {
    .tools {
        width: min(55vw, 420px);
    }

    .editor-shell {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }

    .mobile-nav-btn {
        min-width: 48px;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .zoom-controls #zoomLabel {
        min-width: 36px;
        font-size: 11px;
    }

    .mobile-nav-btn span {
        font-size: 8px;
    }
}

/* ── Sayfa Sonu Kılavuz Çizgileri (Sayfa Bölme Boşluğu) ── */
.cv-page-guide {
    position: absolute;
    left: 0;
    right: 0;
    height: 24px;
    background-color: var(--bg-app); /* Arka plan rengi ile eşleşerek kesintiyi simüle eder */
    border-top: 1px solid var(--border-ui);
    border-bottom: 1px solid var(--border-ui);
    box-shadow: inset 0 3px 5px -3px rgba(0,0,0,0.1), inset 0 -3px 5px -3px rgba(0,0,0,0.1);
    pointer-events: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-page-guide span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background-color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-ui);
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ── Sağ Sayfa Navigatörü (Pages Navigator) ───────────── */
.pages-nav {
    width: 140px;
    background-color: #ffffff;
    border-left: 1px solid var(--border-ui);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    z-index: 40;
    padding: 20px 10px;
    box-shadow: -1px 0 3px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.pages-nav .nav-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.pages-nav .nav-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
}

.nav-page-thumb {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--border-ui);
    border-radius: 6px;
    background-color: #f8fafc;
    padding: 4px;
    box-shadow: var(--shadow-ui);
}

.nav-page-thumb:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nav-page-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light), var(--shadow-ui);
}

.thumb-paper {
    width: 88px;
    height: 124px; /* A4 Görüntü Oranı */
    background-color: #ffffff;
    border: 1px solid var(--border-ui);
    position: relative;
    border-radius: 3px;
    overflow: hidden;
}

.thumb-viewport {
    width: 794px;
    height: 1123px;
    transform: scale(0.11);
    transform-origin: top left;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.thumb-num {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    background-color: rgba(241, 245, 249, 0.95);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-ui);
    z-index: 10;
}

.nav-page-thumb.active .thumb-num {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Mobilde ve dar ekranlarda sağ paneli gizle */
@media (max-width: 992px) {
    .pages-nav {
        display: none;
    }
}

/* ── Footer ───────────────────────────────────────────── */
.app-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-ui);
    padding: 14px 16px;
    flex-shrink: 0;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.app-footer p {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

/* ── Metin Biçimlendirme Araç Çubuğu (Floating Toolbar) ─ */
.text-format-toolbar {
    position: absolute;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.text-format-toolbar.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.text-format-toolbar .tb-btn {
    background: none;
    border: none;
    color: #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
}

.text-format-toolbar .tb-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.text-format-toolbar .tb-btn.active {
    background-color: var(--cv-accent, var(--primary));
    color: #ffffff;
}

.text-format-toolbar .tb-divider {
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

.text-format-toolbar .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.15s ease;
}

.text-format-toolbar .tb-btn:hover .color-dot {
    transform: scale(1.2);
}

/* ── Metin Boyutlandırma Kulbu ────────────────────────── */
#cvResizeHandle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: se-resize;
    z-index: 10005;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    display: none;
    transition: transform 0.1s ease;
}

#cvResizeHandle:hover {
    transform: scale(1.3);
}

.resizing {
    user-select: none !important;
    -webkit-user-select: none !important;
    outline: 2px solid var(--cv-accent, var(--primary)) !important;
}

/* ── Sayfa Silme Butonu ────────────────────────────────── */
.thumb-page-del-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.9);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 15;
}

.nav-page-thumb:hover .thumb-page-del-btn {
    opacity: 1;
}

.thumb-page-del-btn:hover {
    background-color: #dc2626;
    transform: scale(1.15);
}

/* ── ATS Uyumlu Şablon Stilleri ───────────────────────── */
/* 7. Şablon: ATS Standart (tpl-ats-standart) */
.tpl-ats-standart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpl-ats-standart .ats-header {
    text-align: center;
    border-bottom: 2px solid #111827;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.tpl-ats-standart .cv-name {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tpl-ats-standart .cv-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--cv-accent, #4b5563);
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tpl-ats-standart .ats-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #4b5563;
}

.tpl-ats-standart .ats-contact .cv-contact-item {
    margin-bottom: 0;
}

.tpl-ats-standart .ats-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #111827;
    padding-bottom: 2px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 8. Şablon: ATS Modern (tpl-ats-modern) */
.tpl-ats-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tpl-ats-modern .ats-header-modern {
    border-left: 4px solid var(--cv-accent, #0284c7);
    padding-left: 14px;
    margin-bottom: 4px;
}

.tpl-ats-modern .cv-name {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 2px 0;
}

.tpl-ats-modern .cv-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--cv-accent, #0284c7);
    margin: 0 0 4px 0;
}

.tpl-ats-modern .ats-contact-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #4b5563;
}

.tpl-ats-modern .ats-contact-modern .cv-contact-item {
    margin-bottom: 0;
}

.tpl-ats-modern .ats-contact-modern i {
    color: var(--cv-accent, #0284c7);
    margin-right: 4px;
}

.tpl-ats-modern .ats-title-modern {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cv-accent, #0284c7);
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 2px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Şablon Sıkıştırma Kuralları (Tek Sayfaya Sığdırma İçin) ── */
.theme-klasik .cv-block,
.theme-minimal .cv-block,
.theme-modern-yesil .cv-block,
.theme-kurumsal-mavi .cv-block,
.theme-ats-standart .cv-block,
.theme-ats-modern .cv-block {
    margin-bottom: 12px;
}

.theme-klasik .cv-sec-title,
.theme-minimal .cv-sec-title,
.theme-modern-yesil .cv-sec-title,
.theme-kurumsal-mavi .cv-sec-title,
.theme-ats-standart .cv-sec-title,
.theme-ats-modern .cv-sec-title {
    margin-bottom: 6px;
}

.theme-klasik .cv-item,
.theme-minimal .cv-item,
.theme-modern-yesil .cv-item,
.theme-kurumsal-mavi .cv-item,
.theme-ats-standart .cv-item,
.theme-ats-modern .cv-item {
    margin-bottom: 4px;
}

.theme-klasik .tpl-klasik,
.theme-minimal .tpl-minimal,
.theme-modern-yesil .tpl-modern-yesil,
.theme-kurumsal-mavi .km-body {
    gap: 12px;
}

.theme-ats-standart .tpl-ats-standart,
.theme-ats-modern .tpl-ats-modern {
    gap: 10px;
}

/* ── Kısayollar paneli ───────────────────────────────── */
.shortcuts-wrap {
    position: relative;
}

.shortcuts-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border: 1px solid var(--border-ui);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 12px 14px;
    z-index: 200;
}

.shortcuts-panel.open {
    display: block;
}

.shortcuts-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.shortcuts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.shortcuts-item-icon {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.shortcuts-list li:last-child {
    border-bottom: none;
}

.shortcuts-list kbd {
    font-family: var(--font-ui);
    font-size: 11px;
    background: #f1f5f9;
    border: 1px solid var(--border-ui);
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
}

/* ── Onboarding — interaktif tur (spotlight) ───────────── */
.tour-root {
    position: fixed;
    inset: 0;
    z-index: 99990;
    pointer-events: none;
}

.tour-root * {
    pointer-events: auto;
}

.tour-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: auto;
}

.tour-root--welcome .tour-backdrop {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
}

.tour-spotlight {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
    border: 2px solid rgba(14, 116, 144, 0.85);
    pointer-events: none;
    z-index: 99991;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tour-pulse 2.2s ease-in-out infinite;
}

@keyframes tour-pulse {
    0%, 100% {
        border-color: rgba(14, 116, 144, 0.85);
        box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72), 0 0 0 0 rgba(14, 116, 144, 0);
    }
    50% {
        border-color: rgba(3, 105, 161, 1);
        box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72), 0 0 0 8px rgba(14, 116, 144, 0.25);
    }
}

.tour-popover {
    position: fixed;
    z-index: 99992;
    width: min(340px, calc(100vw - 24px));
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 22px 18px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: top 0.35s ease, left 0.35s ease;
}

.tour-popover--center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    text-align: center;
    width: min(420px, calc(100vw - 32px));
    padding: 28px 28px 22px;
}

.tour-popover--center .tour-popover-header {
    justify-content: center;
}

.tour-popover--center .tour-actions {
    justify-content: center;
}

.tour-popover::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -1px -1px 0 rgba(0, 0, 0, 0.04);
}

.tour-popover--center::after {
    display: none;
}

.tour-popover--right::after {
    left: -6px;
    top: 50%;
    margin-top: -6px;
}

.tour-popover--left::after {
    right: -6px;
    top: 50%;
    margin-top: -6px;
}

.tour-popover--bottom::after {
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.tour-popover--top::after {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
}

.tour-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tour-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.12), rgba(3, 105, 161, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.tour-step-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.tour-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.tour-popover--center .tour-progress {
    justify-content: center;
}

.tour-dot {
    height: 4px;
    flex: 1;
    max-width: 32px;
    border-radius: 4px;
    background: #e2e8f0;
    transition: background 0.25s, max-width 0.25s;
}

.tour-dot.active {
    background: linear-gradient(90deg, var(--primary), #0369a1);
    max-width: 48px;
}

.tour-dot.done {
    background: #86efac;
}

.tour-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px;
    line-height: 1.3;
}

.tour-popover--center .tour-title {
    font-size: 22px;
}

.tour-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 18px;
}

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tour-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-nav .btn[disabled] {
    opacity: 0.35;
    pointer-events: none;
}

.shortcuts-tour-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed var(--border-ui);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.shortcuts-tour-btn:hover {
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.35);
}

@media (max-width: 820px) {
    .tour-popover:not(.tour-popover--center) {
        left: 12px !important;
        right: 12px;
        width: auto;
        top: auto !important;
        bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }

    .tour-popover:not(.tour-popover--center)::after {
        display: none;
    }
}

/* ── Profil, önizleme, karanlık tema, ATS ekleri ─────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cv-profile-select {
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    max-width: 140px;
}

.section-order-block {
    margin: 16px 0;
    padding-top: 12px;
    border-top: 1px dashed var(--border-ui);
}

.section-order-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.section-order-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-order-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    font-size: 12px;
    cursor: grab;
}

.section-order-item.dragging { opacity: 0.45; }
.section-order-item.drag-over { border-color: var(--primary); background: rgba(14, 116, 144, 0.06); }
.section-order-grip { color: var(--text-muted); }

/* LinkedIn içe aktarma */
.linkedin-import-block {
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-ui);
}

.linkedin-import-help {
    margin-bottom: 12px;
    border: 1px solid var(--border-ui);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.linkedin-import-help summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.linkedin-import-help summary::-webkit-details-marker {
    display: none;
}

.linkedin-import-help summary::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.linkedin-import-help[open] summary::before {
    transform: rotate(90deg);
}

.linkedin-import-help[open] summary {
    border-bottom: 1px solid var(--border-ui);
}

.linkedin-import-steps {
    margin: 0;
    padding: 12px 14px 8px 30px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.linkedin-import-steps li + li {
    margin-top: 8px;
}

.linkedin-import-steps code {
    font-size: 11px;
    background: rgba(14, 116, 144, 0.1);
    color: var(--primary);
    padding: 1px 5px;
    border-radius: 4px;
}

.linkedin-import-note {
    margin: 0 14px 10px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

.linkedin-import-help .btn {
    margin: 0 14px 14px;
}

.linkedin-import-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.linkedin-import-textarea {
    min-height: 120px;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.ats-fill-suggestions,
.ats-title-suggestions,
.ats-keyword-density {
    margin-top: 12px;
}

.ats-fill-item {
    padding: 10px 12px;
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.ats-fill-item p { margin: 6px 0; color: var(--text-muted); }

.ats-title-chip {
    border: 1px solid var(--border-ui);
    background: #fff;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    margin: 2px;
}

.ats-title-chip:hover { border-color: var(--primary); color: var(--primary); }

.ats-density-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ats-density-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    background: #f8fafc;
}

.ats-density--low { color: #b91c1c; background: #fef2f2; }
.ats-density--mid { color: #b45309; background: #fffbeb; }
.ats-density--high { color: #047857; background: #ecfdf5; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Karanlık tema ───────────────────────────────────── */
body.editor-body.theme-dark {
    --bg-app: #0f172a;
    --bg-card: #1e293b;
    --bg-surface: #334155;
    --bg-muted: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-ui: #334155;
    --primary-light: rgba(14, 116, 144, 0.22);
    color: var(--text-main);
    background: var(--bg-app);
    scrollbar-color: #475569 #1e293b;
}

body.editor-body.theme-dark *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.editor-body.theme-dark *::-webkit-scrollbar-track {
    background: #1e293b;
}

body.editor-body.theme-dark *::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

body.editor-body.theme-dark *::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Kabuk ve paneller */
body.editor-body.theme-dark .topbar,
body.editor-body.theme-dark .tools,
body.editor-body.theme-dark .canvas-toolbar,
body.editor-body.theme-dark .mobile-nav,
body.editor-body.theme-dark .pages-nav,
body.editor-body.theme-dark .app-footer,
body.editor-body.theme-dark .shortcuts-panel,
body.editor-body.theme-dark .mobile-sheet-panel,
body.editor-body.theme-dark .tools-drawer-header {
    background: var(--bg-card);
    border-color: var(--border-ui);
}

body.editor-body.theme-dark .canvas-scroll {
    background: #0b1220;
}

body.editor-body.theme-dark .tool-tabs {
    background: #0f172a;
    border-color: var(--border-ui);
}

body.editor-body.theme-dark .tool-tab:hover {
    color: var(--primary-hover);
    background: #334155;
}

body.editor-body.theme-dark .tool-tab.active {
    color: #67e8f9;
    background: #334155;
    border-bottom-color: var(--primary-hover);
}

/* Üst bar */
body.editor-body.theme-dark .topbar-hint {
    background: #334155;
    border-color: #475569;
    color: var(--text-muted);
}

body.editor-body.theme-dark .ats-live-badge {
    background: transparent;
}

body.editor-body.theme-dark .ats-live-ring {
    background: #334155;
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-live-ring[data-tier="excellent"] {
    border-color: #34d399;
    background: rgba(6, 78, 59, 0.45);
    color: #6ee7b7;
}

body.editor-body.theme-dark .ats-live-ring[data-tier="good"] {
    border-color: #fbbf24;
    background: rgba(120, 53, 15, 0.4);
    color: #fcd34d;
}

body.editor-body.theme-dark .ats-live-ring[data-tier="low"] {
    border-color: #f87171;
    background: rgba(127, 29, 29, 0.4);
    color: #fca5a5;
}

body.editor-body.theme-dark .ats-live-strip {
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    border-color: var(--border-ui);
}

body.editor-body.theme-dark .ats-live-chip {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .btn-ghost:hover {
    background: #334155;
    color: var(--text-main);
}

body.editor-body.theme-dark .mobile-only-btn {
    background: #334155;
    border-color: #475569;
    color: var(--text-muted);
}

body.editor-body.theme-dark .btn-pdf {
    background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 4px 14px rgba(14, 116, 144, 0.4);
}

body.editor-body.theme-dark .btn-pdf:hover {
    background: linear-gradient(135deg, #0f766e 0%, var(--primary-hover) 100%);
    color: #fff;
}

body.editor-body.theme-dark .mobile-only-btn:hover {
    background: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .mobile-nav-btn--pdf {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
}

/* Sol panel kartları */
body.editor-body.theme-dark .template-card {
    background: #1e293b;
    border-color: var(--border-ui);
}

body.editor-body.theme-dark .template-card:hover {
    border-color: #475569;
}

body.editor-body.theme-dark .section-toggle {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .section-toggle:hover {
    background: #3f4f66;
    border-color: rgba(14, 116, 144, 0.45);
}

body.editor-body.theme-dark .section-order-item {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .section-order-item.drag-over {
    background: rgba(14, 116, 144, 0.18);
    border-color: var(--primary-hover);
}

body.editor-body.theme-dark .linkedin-import-help {
    background: #334155;
    border-color: #475569;
}

body.editor-body.theme-dark .linkedin-import-help summary {
    color: var(--text-main);
}

body.editor-body.theme-dark .linkedin-import-help[open] summary {
    border-color: #475569;
}

body.editor-body.theme-dark .linkedin-import-steps code {
    background: rgba(14, 116, 144, 0.25);
    color: #67e8f9;
}

body.editor-body.theme-dark .control-input,
body.editor-body.theme-dark .control-textarea,
body.editor-body.theme-dark .control-select,
body.editor-body.theme-dark .cv-profile-select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}

body.editor-body.theme-dark .control-input::placeholder,
body.editor-body.theme-dark .control-textarea::placeholder {
    color: #64748b;
}

body.editor-body.theme-dark .design-status-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f2744 100%);
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .design-status-card.is-multi {
    background: linear-gradient(135deg, #422006 0%, #1e293b 100%);
    border-color: #92400e;
}

body.editor-body.theme-dark .design-warning--ats {
    background: rgba(30, 58, 138, 0.35);
    border-color: #3b82f6;
    color: #bfdbfe;
}

body.editor-body.theme-dark .design-warning--contrast {
    background: rgba(124, 45, 18, 0.35);
    border-color: #f97316;
    color: #fed7aa;
}

body.editor-body.theme-dark .design-warning--photo {
    background: rgba(20, 83, 45, 0.35);
    border-color: #22c55e;
    color: #bbf7d0;
}

body.editor-body.theme-dark .design-preset-btn {
    background: #334155;
    border-color: #475569;
    color: var(--text-muted);
}

body.editor-body.theme-dark .design-preset-btn:hover {
    border-color: var(--primary-hover);
    color: #67e8f9;
}

body.editor-body.theme-dark .design-preset-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-hover);
    color: #67e8f9;
}

body.editor-body.theme-dark .font-preview,
body.editor-body.theme-dark .btn-color-custom,
body.editor-body.theme-dark .shortcuts-tour-btn {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .btn-color-custom:hover,
body.editor-body.theme-dark .shortcuts-tour-btn:hover {
    background: rgba(14, 116, 144, 0.2);
    border-color: rgba(14, 116, 144, 0.5);
}

/* ATS paneli */
body.editor-body.theme-dark .ats-score-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f2744 100%);
    border-color: #475569;
}

body.editor-body.theme-dark .ats-score-card[data-tier="excellent"] {
    background: linear-gradient(135deg, #064e3b 0%, #1e293b 100%);
    border-color: #059669;
}

body.editor-body.theme-dark .ats-score-card[data-tier="good"] {
    background: linear-gradient(135deg, #422006 0%, #1e293b 100%);
    border-color: #d97706;
}

body.editor-body.theme-dark .ats-score-card[data-tier="low"] {
    background: linear-gradient(135deg, #450a0a 0%, #1e293b 100%);
    border-color: #dc2626;
}

body.editor-body.theme-dark .ats-score-value {
    color: #f1f5f9;
}

body.editor-body.theme-dark .ats-criterion {
    background: #334155;
    border-color: #475569;
}

body.editor-body.theme-dark .ats-criterion-title {
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-criterion-bar {
    background: #1e293b;
}

body.editor-body.theme-dark .ats-criterion-meta,
body.editor-body.theme-dark .ats-criterion-note,
body.editor-body.theme-dark .ats-score-hint {
    color: var(--text-muted);
}

body.editor-body.theme-dark .ats-tips {
    background: #334155;
    border-color: #475569;
}

body.editor-body.theme-dark .ats-tips-title {
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-kw-chip.matched {
    background: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
    border-color: #059669;
}

body.editor-body.theme-dark .ats-kw-chip.missing {
    background: rgba(127, 29, 29, 0.45);
    color: #fca5a5;
    border-color: #dc2626;
}

body.editor-body.theme-dark .ats-kw-chip--action:hover {
    background: rgba(127, 29, 29, 0.65);
}

body.editor-body.theme-dark .ats-title-chip {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-title-chip:hover {
    border-color: var(--primary-hover);
    color: #67e8f9;
}

body.editor-body.theme-dark .ats-fill-item {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-fill-item p {
    color: var(--text-muted);
}

body.editor-body.theme-dark .ats-density-item {
    background: #334155;
    color: var(--text-main);
}

body.editor-body.theme-dark .ats-density--low {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.4);
}

body.editor-body.theme-dark .ats-density--mid {
    color: #fcd34d;
    background: rgba(120, 53, 15, 0.4);
}

body.editor-body.theme-dark .ats-density--high {
    color: #6ee7b7;
    background: rgba(6, 78, 59, 0.4);
}

body.editor-body.theme-dark .btn-soft {
    background: rgba(14, 116, 144, 0.25);
    color: #67e8f9;
    border: 1px solid rgba(14, 116, 144, 0.4);
}

body.editor-body.theme-dark .btn-soft:hover {
    background: rgba(14, 116, 144, 0.38);
}

/* Orta alan ve sağ panel */
body.editor-body.theme-dark .zoom-controls {
    background: #334155;
}

body.editor-body.theme-dark .zoom-btn {
    background: #1e293b;
    border-color: #475569;
    color: var(--text-muted);
}

body.editor-body.theme-dark .zoom-btn:hover {
    color: #67e8f9;
    box-shadow: none;
}

body.editor-body.theme-dark .page-hint {
    background: #334155;
    color: var(--text-muted);
}

body.editor-body.theme-dark .nav-page-thumb {
    background: #334155;
    border-color: #475569;
}

body.editor-body.theme-dark .thumb-num {
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-muted);
    border-color: #475569;
}

/* Footer */
body.editor-body.theme-dark .app-footer p,
body.editor-body.theme-dark .footer-links a {
    color: var(--text-muted);
}

body.editor-body.theme-dark .footer-links a:hover {
    color: #67e8f9;
}

/* Kısayollar */
body.editor-body.theme-dark .shortcuts-list li {
    border-color: #334155;
    color: var(--text-main);
}

body.editor-body.theme-dark .shortcuts-list kbd {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

/* Mobil */
body.editor-body.theme-dark .mobile-nav-btn {
    color: var(--text-muted);
}

body.editor-body.theme-dark .mobile-nav-btn.active {
    color: #67e8f9;
    background: rgba(14, 116, 144, 0.2);
}

body.editor-body.theme-dark .mobile-sheet-item {
    color: var(--text-main);
}

body.editor-body.theme-dark .mobile-sheet-item:active {
    background: #334155;
}

body.editor-body.theme-dark .mobile-sheet-handle {
    background: #475569;
}

body.editor-body.theme-dark .tool-tab-badge[data-tier="excellent"] {
    background: rgba(6, 78, 59, 0.6);
    color: #6ee7b7;
}

body.editor-body.theme-dark .tool-tab-badge[data-tier="good"] {
    background: rgba(120, 53, 15, 0.6);
    color: #fcd34d;
}

body.editor-body.theme-dark .tool-tab-badge[data-tier="low"] {
    background: rgba(127, 29, 29, 0.6);
    color: #fca5a5;
}

@media (min-width: 821px) {
    body.editor-body.theme-dark .tools {
        background: var(--bg-card);
        box-shadow: 1px 0 0 rgba(51, 65, 85, 0.85);
    }

    body.editor-body.theme-dark .tool-tabs {
        background: transparent;
    }

    body.editor-body.theme-dark .tool-tab:hover {
        background: #334155;
    }

    body.editor-body.theme-dark .tool-tab.active {
        background: #334155;
        box-shadow: 0 -1px 0 var(--border-ui) inset;
    }

    body.editor-body.theme-dark .section-toggle:hover {
        background: #3f4f66;
    }

    body.editor-body.theme-dark .panel-desc {
        background: #334155;
        border-color: #475569;
        color: var(--text-muted);
    }

    body.editor-body.theme-dark .template-card {
        background: #1e293b;
    }

    body.editor-body.theme-dark .template-card.active {
        background: linear-gradient(180deg, rgba(14, 116, 144, 0.2) 0%, #1e293b 60%);
        box-shadow: 0 0 0 1px var(--primary-hover), 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    body.editor-body.theme-dark .tool-panel {
        scrollbar-color: #475569 transparent;
    }

    body.editor-body.theme-dark .tool-panel::-webkit-scrollbar-thumb {
        background: #475569;
    }

    .linkedin-import-help {
        border-radius: 10px;
    }

    .linkedin-import-textarea {
        font-size: 12px;
    }
}

body.editor-body.preview-mode .topbar,
body.editor-body.preview-mode .tools,
body.editor-body.preview-mode .pages-nav,
body.editor-body.preview-mode .canvas-toolbar,
body.editor-body.preview-mode .mobile-nav,
body.editor-body.preview-mode .ats-live-strip,
body.editor-body.preview-mode .cv-profile-switch {
    display: none !important;
}

body.editor-body.preview-mode .editor-shell {
    padding-bottom: 0;
}

body.editor-body.preview-mode .editor-center::after {
    content: 'Önizleme — Esc ile çık';
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 20px;
}

@media (max-width: 820px) {
    .cv-profile-select { max-width: 110px; font-size: 11px; }
    #btnPreviewMode, #btnThemeToggle { display: none; }
}

/* ── PDF Baskı Kuralları ──────────────────────────────── */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Genel Arayüz Elemanlarını Gizle */
    body,
    .editor-body {
        background-color: #ffffff !important;
        height: auto !important;
        overflow: visible !important;
    }

    .topbar,
    .tools,
    .pages-nav,
    .canvas-toolbar,
    .app-footer,
    .shortcuts-wrap,
    .onboarding-overlay,
    .tour-root,
    .ats-live-strip,
    .mobile-nav,
    .tools-backdrop,
    .mobile-sheet,
    .tools-drawer-header,
    .no-print,
    .cv-del,
    .cv-add {
        display: none !important;
    }

    .editor-center,
    .editor-shell {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .canvas-area,
    .canvas-scroll {
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: #ffffff !important;
        height: auto !important;
    }

    .paper-wrap {
        transform: none !important;
        width: 210mm !important;
        max-width: 210mm !important;
        margin: 0 auto !important;
        height: auto !important;
    }

    .cv-paper {
        box-shadow: none !important;
        padding: var(--cv-pad, 42px) !important;
        margin: 0 !important;
        border: none !important;
        width: 210mm !important;
        max-width: 210mm !important;
        height: var(--cv-print-height, auto) !important;
        min-height: 0 !important;
        page-break-inside: auto !important;
        font-family: var(--font-ui), 'Segoe UI', Arial, sans-serif !important;
        -webkit-font-smoothing: antialiased;
    }

    .cv-paper.cv-fit-scaled {
        zoom: var(--cv-fit-zoom, 1);
        height: 297mm !important;
        overflow: hidden !important;
    }

    .cv-page-guide {
        display: none !important;
    }

    .cv-block,
    .cv-item {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .cv-sec-title {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    img {
        max-width: 100% !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: A4 portrait;
        margin: 0;
    }
}

/* ── CvFaction reklam + PDF kapısı ─────────────────────── */
.cf-ad-hidden,
[data-cf-ad].cf-ad-hidden,
.tools-ad.cf-ad-hidden,
.cf-ad-wrap.cf-ad-hidden,
[data-cf-ad-gate-slot].cf-ad-hidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    min-height: 0 !important;
}

.cf-ad-wrap {
    margin: 8px auto 28px;
    max-width: 728px;
}

.cf-ad-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #78716c;
    margin-bottom: 6px;
}

.cf-ad-placeholder {
    border: 1.5px dashed #a8a29e;
    background: #fafaf9;
    padding: 16px;
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cf-ad-placeholder-text {
    margin: 0;
    font-size: 12px;
    color: #78716c;
    line-height: 1.4;
    max-width: 36ch;
}

.tools-ad {
    flex-shrink: 0;
    border-top: 1px solid var(--border-ui);
    padding: 10px 12px 12px;
    background: #f8fafc;
}

.tools-ad .cf-ad-placeholder {
    min-height: 70px;
    padding: 10px;
}

.cf-ad-gate {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cf-ad-gate[hidden] {
    display: none !important;
}

.cf-ad-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.cf-ad-gate-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    background: #ffffff;
    border: 1px solid var(--border-ui, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    padding: 22px 20px 18px;
    max-height: min(92vh, 720px);
    overflow-y: auto;
}

.cf-ad-gate-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-ui, #e2e8f0);
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.cf-ad-gate-x:hover {
    color: var(--primary, #0e7490);
    border-color: #cbd5e1;
}

.cf-ad-gate-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-right: 36px;
    margin-bottom: 12px;
}

.cf-ad-gate-kicker {
    margin: 0 0 6px;
}

.cf-ad-gate-dialog h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.25;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 16ch;
}

.cf-ad-gate-lead,
.cf-ad-gate-every,
.cf-ad-gate-status {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}

.cf-ad-gate-status {
    color: var(--primary, #0e7490);
    font-weight: 600;
}

.cf-ad-gate-every {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid var(--border-ui, #e2e8f0);
    border-radius: 10px;
    padding: 10px 12px;
}

.cf-ad-gate-slot {
    margin: 4px 0 14px;
    min-height: 90px;
}

.cf-ad-gate-slot.cf-ad-block-detected {
    min-height: 0;
}

.cf-ad-block-note {
    padding: 14px 14px 12px;
    border-radius: 10px;
    border: 1px solid #fda4af;
    background: #fff1f2;
    color: #334155;
}

.cf-ad-block-note-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #9f1239;
    margin-bottom: 6px;
}

.cf-ad-block-note-body {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #4c0519;
}

.cf-ad-block-retry {
    width: 100%;
}

.cf-ad-gate-timer[data-state="blocked"] {
    opacity: 0.45;
}

.cf-ad-gate-timer[data-state="blocked"] .cf-ad-gate-ring-prog {
    stroke: #94a3b8;
}

body.editor-body.theme-dark .cf-ad-block-note {
    background: #4c0519;
    border-color: #fb7185;
    color: #fecdd3;
}

body.editor-body.theme-dark .cf-ad-block-note-title {
    color: #fecdd3;
}

body.editor-body.theme-dark .cf-ad-block-note-body {
    color: #fda4af;
}

.cf-ad-gate-slot.cf-ad-hidden {
    display: none !important;
    margin: 0 !important;
    min-height: 0 !important;
}

.cf-ad-gate-kicker[hidden] {
    display: none !important;
}

.cf-ad-gate-timer {
    position: relative;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid var(--border-ui, #e2e8f0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cf-ad-gate-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cf-ad-gate-ring-track,
.cf-ad-gate-ring-prog {
    fill: none;
    stroke-width: 7;
}

.cf-ad-gate-ring-track {
    stroke: #e2e8f0;
}

.cf-ad-gate-ring-prog {
    stroke: var(--primary, #0e7490);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.9s linear, stroke 0.25s ease;
}

.cf-ad-gate-timer[data-state="ready"] .cf-ad-gate-ring-prog {
    stroke: #059669;
}

.cf-ad-gate-timer-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
}

.cf-ad-gate-count {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.cf-ad-gate-timer[data-state="ready"] .cf-ad-gate-count {
    color: #059669;
}

.cf-ad-gate-count-unit {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-top: 2px;
}

.cf-ad-gate-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cf-ad-gate-actions .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.cf-ad-gate-open {
    overflow: hidden;
}

@media print {
    .cf-ad,
    .cf-ad-wrap,
    .tools-ad,
    .cf-ad-gate {
        display: none !important;
    }

    /* Kapıdan geçmeden tarayıcı yazdırırsa CV basılmaz */
    html:not(.cf-print-armed) .cv-paper {
        display: none !important;
    }

    html:not(.cf-print-armed) body.editor-body::before {
        content: "PDF için sitedeki PDF düğmesini kullanın. Her indirmede kısa reklam gösterilir.";
        display: block;
        padding: 24px;
        font-family: system-ui, sans-serif;
        font-size: 14px;
        color: #0a0a0a;
    }
}