/* ContractCode × LawRag — tasarım sistemi: minimalist, beyaz yüzeyler, gri çizgiler,
   tek vurgu rengi yeşil, başlık ve birincil işlemlerde siyah. Degrade, cam efekti ve süs yok. */
:root {
    --bg: #f4f6f5;
    --bg-2: #eef1ef;
    --surface: #ffffff;
    --surface-2: #f8faf9;
    --glass: var(--surface);
    --glass-strong: var(--surface);
    --line: #e3e7e4;
    --line-strong: #cfd5d1;
    --text: #0f1311;
    --text-2: #454c48;
    --text-3: #7a817d;
    --accent: #15803d;
    --accent-strong: #166534;
    --accent-soft: #ecf6ef;
    --accent-line: #b9dcc4;
    --accent-2: var(--accent);
    --ink: #111412;
    --violet: #2b302d; /* eski mor vurgular: grafit */
    --danger: #c62828;
    --radius: 14px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --shadow: 0 1px 2px rgba(15, 19, 17, .04), 0 4px 16px rgba(15, 19, 17, .04);

    /* LawRag arama çubuğu değişkenleri (search_widget.css) */
    --bg-surface: var(--surface);
    --bg-primary: var(--surface);
    --bg-tertiary: var(--surface-2);
    --border-color: var(--line);
    --border-color-strong: var(--line-strong);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --text-tertiary: var(--text-3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Üst çubuk */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
/* Marka: contract code logosu */
.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: none;
    z-index: 10;
}
.brand-logo { display: block; height: 34px; width: auto; object-fit: contain; }
.brand-mobil { display: none !important; }

/* Ana Menü Butonu - Matematiksel Olarak Tam Ortada */
.topbar-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: auto;
}
.topbar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 650;
    font-family: inherit;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all .18s ease;
}
.topbar-home-btn:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--surface-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: scale(1.02);
}
.topbar-home-btn svg {
    color: currentColor;
    flex-shrink: 0;
}

/* Sağ Alan: Durum Çipi ve Kullanıcı Giriş/Profil Alanı */
.topbar-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    z-index: 10;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: .76rem;
    color: var(--text-2);
    border: 1px solid var(--line);
    background: var(--surface);
    flex-shrink: 0;
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #d4a017; }
.status-chip.ok .dot { background: var(--accent); }
.status-chip.err .dot { background: var(--danger); }

.btn-auth-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 650;
    font-family: inherit;
    color: #ffffff;
    background: var(--accent);
    border: 1px solid var(--accent);
    box-shadow: 0 2px 6px rgba(22, 101, 52, 0.2);
    cursor: pointer;
    transition: all .16s ease;
}
.btn-auth-login:hover {
    background: #14532d;
    box-shadow: 0 4px 10px rgba(22, 101, 52, 0.28);
    transform: translateY(-1px);
}
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px 4px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.user-pill-icon { font-size: .85rem; }
.user-pill-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pill-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 0;
    transition: all .15s ease;
}
.user-pill-logout:hover {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}


/* Düzen */
.layout { max-width: 1080px; margin: 0 auto; padding: 36px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.hero { text-align: center; padding: 12px 0 2px; }
.giris-logo { display: inline-flex; flex-direction: column; align-items: center; gap: 0; }
.giris-logo img { display: block; width: min(320px, 70vw); height: auto; }
.mobil-yazi { display: none !important; }
.hero h1 { font-family: var(--display); font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 500; margin: 18px 0 0; letter-spacing: -.01em; line-height: 1.4; color: var(--text-2); }
.grad { color: var(--accent); }
.hero p { color: var(--text-2); max-width: 720px; margin: 10px auto 0; line-height: 1.6; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ══════════════ FORM WIZARD (3 Adım) ══════════════ */
.wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 0 6px;
    user-select: none;
}
.wizard-step-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all .2s ease;
    color: var(--text-3);
}
.wizard-step-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}
.wizard-step-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.ws-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--bg-2);
    border: 2px solid var(--line);
    color: var(--text-2);
    font-size: .92rem;
    font-weight: 700;
    flex: none;
    transition: all .25s ease;
    position: relative;
}
.ws-circle .ws-check {
    display: none;
    font-size: 1.05rem;
    font-weight: 800;
}
.ws-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ws-label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    transition: color .2s ease;
}
.ws-title {
    font-family: var(--display);
    font-size: .92rem;
    font-weight: 700;
    color: var(--text-2);
    line-height: 1.25;
    transition: color .2s ease;
}
.wizard-step-btn.active .ws-circle {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.wizard-step-btn.active .ws-label {
    color: var(--accent);
}
.wizard-step-btn.active .ws-title {
    color: var(--text);
}
.wizard-step-btn.completed .ws-circle {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-strong);
}
.wizard-step-btn.completed .ws-circle .ws-num {
    display: none;
}
.wizard-step-btn.completed .ws-circle .ws-check {
    display: block;
}
.wizard-step-btn.completed .ws-title {
    color: var(--text);
}

.ws-connector {
    flex: 1;
    height: 3px;
    background: var(--line);
    border-radius: 999px;
    margin: 0 6px;
    position: relative;
    overflow: hidden;
}
.ws-connector-bar {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ws-connector-bar.filled {
    width: 100%;
}

/* Wizard Viewport & Track: Donanım Hızlandırmalı Akıcı Kayma */
.wizard-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius);
    transition: min-height .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wizard-track {
    display: flex;
    width: 300%;
    transform: translateX(0%);
    transition: transform .45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    align-items: flex-start;
}
.wizard-step-pane {
    width: 33.333333%;
    flex: 0 0 33.333333%;
    box-sizing: border-box;
    padding: 0 2px;
    opacity: 0.25;
    pointer-events: none;
    transition: opacity .35s ease;
    visibility: hidden;
}
.wizard-step-pane.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.panel-step-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 2px 9px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.wizard-step-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.wizard-step-nav-footer .ml-auto {
    margin-left: auto;
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); scroll-margin-top: 80px; }
.panel-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.panel-step { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--bg-2); }
.panel-head h2 { font-family: var(--display); margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; }
.panel-head p { margin: 4px 0 0; color: var(--text-3); font-size: .86rem; }
.panel-head-text { flex: 1; min-width: 0; }
/* Hukuki Arama: Belge Oluşturucu başlığının sağındaki düğmeyle açılır */
.arama-ac { flex: none; align-self: center; gap: 7px; }
.arama-ac.active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.arama-alani { margin: -4px 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; animation: rise .2s ease both; }
.arama-alani[hidden] { display: none; }
.arama-not { margin: 0 0 10px; font-size: .84rem; color: var(--text-3); }
.doc-types { scroll-margin-top: 80px; }

/* Arama kartını panele uydur */
.workspace-search-card { max-width: none; margin: 0; border-radius: 12px; border-width: 1px; box-shadow: none; }
.ws-search-input, .ws-submit-btn, .ws-quick-pill, .ws-result-card, .ws-search-badge, .ws-score-pill, .ws-send-assistant-btn, .ws-badge-mevzuat, .ws-badge-emsal { border-radius: 10px; }
.ws-search-badge, .ws-score-pill, .ws-quick-pill, .ws-badge-mevzuat, .ws-badge-emsal { border-radius: 999px; }
.ws-submit-btn { background: var(--accent); box-shadow: none; }
.ws-submit-btn:hover { background: var(--accent-strong); }
.ws-badge-mevzuat { color: var(--accent-strong); }
.ws-badge-emsal { color: var(--text-2); }

/* Belge türleri */
.doc-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.doc-type { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center;
    padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
    transition: border-color .15s, background .15s; font-family: inherit; }
.doc-type:hover { border-color: var(--line-strong); }
.doc-type.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dt-ico { grid-row: span 2; display: grid; place-items: center; color: var(--text-2); }
.doc-type.active .dt-ico { color: var(--accent); }
.dt-t { font-family: var(--display); font-weight: 650; font-size: .98rem; }
.dt-s { font-size: .74rem; color: var(--text-3); }

.talep-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; transition: border-color .15s, box-shadow .15s; }
.talep-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.talep-box label, .sign-form label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.talep-box textarea { width: 100%; resize: vertical; background: transparent; border: none; color: var(--text); font: 400 .96rem/1.55 var(--font); outline: none; }
.talep-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); flex-wrap: nowrap; min-width: 0; }
.talep-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-shrink: 0; min-width: 0; }
#talepCount { white-space: nowrap; flex-shrink: 0; font-size: .78rem; }
#btnTemizle, #btnUret { padding: 7px 14px; font-size: .82rem; min-height: 34px; border-radius: 8px; white-space: nowrap; flex: 0 0 auto; width: auto; }
.muted { color: var(--text-3); font-size: .8rem; }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Düğmeler: varsayılan beyaz, birincil yeşil, imza siyah */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong);
    font: 600 .88rem var(--font); color: var(--text); background: var(--surface); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.sm { padding: 7px 12px; font-size: .8rem; border-radius: 8px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.sign { width: 100%; margin-top: 18px; padding: 14px; font-size: .96rem; color: #fff; border: 1px solid var(--ink); background: var(--ink); }
.btn.sign:hover { background: #000; }

/* Üretim durumu: ajanlar arka planda, tek satır ilerleme */
.uretim-durum { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 10px 14px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem; font-weight: 500; color: var(--text-2); }
.uretim-durum[hidden] { display: none; }
.ud-spin { flex: none; width: 14px; height: 14px; border: 2px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; animation: ws-spin .8s linear infinite; }
.uretim-durum.hata { color: var(--danger); border-color: #f1c7c7; background: #fdf3f3; }
.uretim-durum.hata .ud-spin { display: none; }

/* ══════════════ Canlı Üretim & Yükleme Animasyonu (Adım 2) ══════════════ */
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}
@keyframes shimmerBar {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.editor-loading-card {
    margin: 10px 0 18px;
    padding: 22px 24px;
    background: linear-gradient(135deg, var(--surface) 0%, #f4faf6 100%);
    border: 1.5px solid var(--accent-line);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(21, 128, 61, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    animation: fadeInCard .28s ease both;
}
.el-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.el-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 6px;
}
.el-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    color: var(--accent-strong);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}
.el-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulseDot 1.4s infinite ease-in-out;
    flex-shrink: 0;
}
.el-sub-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}
.el-sub-badge.paper {
    background: rgba(21, 128, 61, 0.08);
    border-color: rgba(21, 128, 61, 0.25);
    color: var(--accent-strong);
}
.el-status-msg {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-top: 2px;
}
.el-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 8px;
    margin: 16px 0 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.el-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: .45;
    transition: all .25s ease;
    min-width: 0;
}
.el-step.active {
    opacity: 1;
    transform: scale(1.02);
}
.el-step.completed {
    opacity: .85;
}
.el-step-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1.5px solid var(--line-strong);
    display: grid;
    place-items: center;
    font-size: .74rem;
    font-weight: 700;
    color: var(--text-3);
    flex: none;
    transition: all .2s ease;
}
.el-step.active .el-step-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.el-step.completed .el-step-icon {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
}
.el-icon-check { display: none; }
.el-icon-num { display: inline; }
.el-step.completed .el-icon-check { display: inline; }
.el-step.completed .el-icon-num { display: none; }
.el-step-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.el-step-text strong {
    font-size: .78rem;
    color: var(--text);
}
.el-step-text small {
    font-size: .66rem;
    color: var(--text-3);
}
.el-step.active .el-step-text strong {
    color: var(--accent-strong);
}
.el-step-divider {
    display: none;
}
@media (max-width: 640px) {
    .el-stepper {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 8px;
    }
}
.el-progress-track {
    width: 100%;
    height: 5px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
    margin: 14px 0 16px;
}
.el-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #15803d, #22c55e, #15803d);
    background-size: 200% 100%;
    animation: shimmerBar 2.2s infinite linear;
    border-radius: 999px;
    transition: width .35s cubic-bezier(0.4, 0, 0.2, 1);
}
.el-stream-card {
    background: #0f1412;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}
.el-stream-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.el-stream-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: #4ade80;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.el-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulseDot 1s infinite ease-in-out;
}
.el-stream-counter {
    font-family: var(--mono);
    font-size: .7rem;
    color: #94a3b8;
}
.el-stream-text {
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: #f1f5f9;
}
.el-stream-text::after {
    content: '▍';
    color: #4ade80;
    animation: blinkCursor .8s infinite;
    margin-left: 2px;
}
.el-error-box {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fdf3f3;
    border: 1px solid #f1c7c7;
    color: var(--danger);
    font-size: .84rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.el-error-box p { margin: 0; }

/* Editör */
.editor-wrap { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.editor-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    background: var(--surface-2);
}
.editor-title-box {
    display: flex;
    align-items: stretch;
    flex: 1 1 320px;
    max-width: 520px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 19, 17, 0.04);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.editor-title-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.editor-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--accent-soft);
    border-right: 1.5px solid var(--accent-line);
    color: var(--accent-strong);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}
.editor-title-badge svg {
    color: var(--accent);
    flex-shrink: 0;
}
.title-input {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px 12px;
    font: 700 .88rem var(--font);
    min-width: 0;
    flex: 1;
    outline: none;
}
.title-input::placeholder {
    font-weight: 500;
    color: var(--text-3);
}
.editor-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); }
.seg.full { display: flex; width: 100%; margin-bottom: 12px; }
.seg.full .seg-btn { flex: 1; }
.seg-btn { padding: 7px 14px; border-radius: 7px; border: none; background: transparent; color: var(--text-3); font: 600 .8rem var(--font); cursor: pointer; transition: background .15s, color .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--accent-strong); font-weight: 700; box-shadow: 0 1px 3px rgba(15, 19, 17, .1); }
.editor { display: block; width: 100%; min-height: 380px; max-height: 620px; overflow: auto; padding: 22px 26px; border: none; resize: vertical; outline: none;
    background: transparent; color: var(--text); font: 400 .93rem/1.7 var(--font); }
textarea.editor { font-family: var(--font); }
.editor.rendered h1, .editor.rendered h2, .editor.rendered h3 { font-family: var(--display); }
.editor.rendered table { border-collapse: collapse; margin: 10px 0; }
.editor.rendered td, .editor.rendered th { border: 1px solid var(--line-strong); padding: 6px 8px; }
.editor.rendered code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* İmza */
/* 3. Adım: Doğrudan İndirme (Mobil İmzasız) & Ayırıcı */
.direct-download-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7faf8 100%);
    border: 1.5px solid var(--accent-line);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 4px 20px rgba(21, 128, 61, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 22px;
}
.ddc-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ddc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 750;
    color: var(--accent-strong);
}
.ddc-hint {
    font-size: .84rem;
    color: var(--text-3);
    line-height: 1.45;
}
.ddc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}
.ddc-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    cursor: pointer;
    transition: all .2s cubic-bezier(0.2, 0, 0, 1);
    font-family: inherit;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.ddc-btn-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ddc-icon {
    font-size: 1.4rem;
    flex: none;
}
.ddc-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ddc-text strong {
    font-size: .88rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ddc-text small {
    font-size: .7rem;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ddc-action {
    font-size: .74rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 4px 8px;
    border-radius: 7px;
    white-space: nowrap;
    flex: none;
    transition: all .15s ease;
}
.ddc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    border-color: var(--accent);
}
.ddc-btn:hover .ddc-action {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.ddc-btn:active {
    transform: scale(.98);
}
.ddc-btn.udf:hover { border-color: #0f766e; }
.ddc-btn.pdf:hover { border-color: #dc2626; }
.ddc-btn.docx:hover { border-color: #2563eb; }
.ddc-btn.save:hover { border-color: var(--accent); }

.step3-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 22px;
    color: var(--text-3);
    font-size: .82rem;
    font-weight: 600;
}
.step3-divider::before, .step3-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed var(--line-strong);
}
.step3-divider span {
    padding: 0 16px;
    background: var(--surface);
    border-radius: 999px;
}

.sign-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; }
.sign-form input[type=tel], .udf-pick select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
    color: var(--text); font: 600 1rem var(--font); letter-spacing: .5px; outline: none; margin-bottom: 14px; transition: border-color .15s, box-shadow .15s; }
.sign-form input[type=tel]:focus, .udf-pick select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.udf-pick { display: flex; gap: 8px; align-items: flex-start; }
.udf-pick select { flex: 1; font-size: .85rem; }
.upload { white-space: nowrap; margin-top: 4px; }
.operators { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.op input { display: none; }
.op span { display: block; text-align: center; padding: 11px 6px; border-radius: 10px; border: 1px solid var(--line-strong); font-weight: 600; font-size: .86rem; cursor: pointer;
    transition: border-color .15s, background .15s; color: var(--text-2); background: var(--surface); }
.op input:checked + span { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.hint { font-size: .74rem; color: var(--text-3); margin: 10px 0 0; line-height: 1.5; }

.sign-status { border-radius: 12px; border: 1px dashed var(--line-strong); display: grid; place-items: center; padding: 26px; text-align: center; min-height: 340px; background: var(--surface-2); }
.sign-status > div { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: rise .25s ease both; }
.sign-status p { color: var(--text-2); max-width: 300px; line-height: 1.55; font-size: .9rem; }
.phone-art { width: 84px; height: 148px; border-radius: 18px; border: 2px solid var(--line-strong); padding: 7px; background: var(--surface); }
.phone-screen { height: 100%; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.ss-label { font-family: var(--display); font-weight: 700; font-size: 1.06rem; }
.code-box { font-family: var(--mono); font-weight: 700; font-size: 2.5rem; letter-spacing: 10px; padding: 12px 24px; border-radius: 12px;
    background: var(--surface); border: 1.5px solid var(--ink); color: var(--ink); }
.pulse-row { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .88rem; }
.pulse-row .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: ping 1.4s infinite; flex-shrink: 0; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .45); } 100% { box-shadow: 0 0 0 10px transparent; } }
.ss-meta { color: var(--text-3); font-size: .82rem; line-height: 1.6; max-width: 340px; word-break: break-word; }
.check, .cross { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; }
.check { background: var(--accent-soft); color: var(--accent); border: 2px solid var(--accent); animation: pop .3s ease; }
.cross { background: #fdf3f3; color: var(--danger); border: 2px solid var(--danger); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.udf-list-wrap { margin-top: 22px; }
.udf-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.udf-list-head h3 { margin: 0; font-family: var(--display); font-size: 1rem; font-weight: 700; }
.udf-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; }
.udf-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem; transition: border-color .15s; }
.udf-row:hover { border-color: var(--line-strong); }
.udf-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.udf-row .dt { color: var(--text-3); font-size: .76rem; }
.badge { padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
.badge.signed { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }
.badge.unsigned { background: var(--bg-2); color: var(--text-3); }
.badge.tur { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); font-family: var(--mono); font-size: .66rem; }
.udf-row a, .udf-row button { display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); background: none; border: none; cursor: pointer;
    font: 600 .78rem var(--font); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.udf-row a:hover, .udf-row button:hover { color: var(--text); background: var(--bg-2); }
.udf-row button.sil { color: var(--danger); }
.udf-row button.sil:hover { color: #fff; background: var(--danger); }
.empty { color: var(--text-3); font-size: .85rem; padding: 14px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 10px; }

.foot {
    text-align: center;
    color: var(--text-3);
    font-size: .8rem;
    padding: 16px 16px 32px;
    border: none;
    margin-top: 24px;
    background: transparent;
}
.foot-inner {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    max-width: 960px;
    margin: 0 auto;
    line-height: 1.6;
}
.foot-item {
    display: inline-flex;
    align-items: center;
    font-size: .8rem;
    color: var(--text-2);
}
.foot-sep {
    color: var(--line-strong, #cbd5e1);
    font-weight: 700;
    user-select: none;
}
.foot-link {
    color: var(--text-2);
    text-decoration: none;
    transition: color .15s ease;
}
.foot-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.foot-site {
    color: var(--accent-strong, #166534);
    font-weight: 600;
}
.foot-site:hover {
    color: var(--accent, #15803d);
}
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 10px;
    background: var(--ink); color: #fff; font-size: .86rem; font-weight: 500; transition: opacity .25s, transform .25s; z-index: 70; box-shadow: 0 8px 24px rgba(15, 19, 17, .18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

.step-pill.active { color: var(--accent-strong); background: var(--accent-soft); }
.step-pill.active b { background: var(--accent); color: #fff; }
.status-short { display: none; }

/* ══════════════ Duyarlı tasarım ══════════════ */

/* Dokunmatik cihazlar: hover kaymalarını kapat, dokunma geri bildirimi ver */
@media (hover: none) {
    .btn:hover, .doc-type:hover, .ws-submit-btn:hover { transform: none; }
    .btn:active, .doc-type:active, .op span:active, .seg-btn:active { transform: scale(.97); }
}

/* Tablet */
@media (max-width: 960px) {
    .layout { padding: 24px 18px 48px; gap: 20px; }
    .sign-grid { grid-template-columns: 1fr; }
    .sign-status { min-height: 260px; }
    .steps-nav { gap: 6px; }
    .step-pill { padding: 6px 11px; }
}

/* Telefon */
@media (max-width: 720px) {
    body { -webkit-tap-highlight-color: transparent; }
    /* Üst çubuk: kompakt */
    .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
    .brand-logo { height: 28px; }
    .brand-mobil { font-size: .5rem; }
    .status-chip { margin-left: auto; padding: 6px 10px; }
    .status-long { display: none; }
    .status-short { display: inline; }

    /* Adım gezinmesi: alt sekme çubuğu (uygulama gibi) */
    .steps-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; gap: 0; justify-content: space-around;
        padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom));
        background: var(--surface); border-top: 1px solid var(--line); }
    .step-pill { flex: 1; flex-direction: column; gap: 3px; border: none; border-radius: 10px; padding: 6px 4px; font-size: .72rem; min-height: 48px; justify-content: center; }
    .step-pill b { width: 22px; height: 22px; }

    .layout { padding: 16px 12px calc(84px + env(safe-area-inset-bottom)); gap: 16px; }
    .hero { padding: 6px 2px 0; }
    .hero h1 { font-size: 1rem; margin-top: 14px; }
    .giris-logo img { width: min(240px, 64vw); }
    .hero p { font-size: .9rem; }

    /* Wizard mobil uyarlaması */
    .wizard-stepper { padding: 8px 10px; gap: 4px; }
    .wizard-step-btn { padding: 6px 8px; gap: 6px; }
    .ws-circle { width: 30px; height: 30px; font-size: .8rem; }
    .ws-label { font-size: .58rem; }
    .ws-title { font-size: .78rem; }
    .wizard-step-nav-footer { flex-direction: column; align-items: stretch; gap: 10px; }
    .wizard-step-nav-footer .btn { width: 100%; min-height: 46px; }
    .wizard-step-nav-footer .ml-auto { margin-left: 0; }

    .panel { padding: 16px 14px; border-radius: 12px; scroll-margin-top: 70px; }
    .panel-head { gap: 10px; margin-bottom: 14px; }
    .panel-step { width: 32px; height: 32px; }
    .panel-head h2 { font-size: 1.12rem; }
    .panel-head p { font-size: .8rem; }
    .arama-ac { padding: 9px 11px; min-height: 40px; }
    .arama-alani { margin-bottom: 14px; padding-bottom: 14px; scroll-margin-top: 70px; }
    .doc-types { scroll-margin-top: 70px; }

    /* Arama çubuğu (LawRag widget) */
    .workspace-search-card { padding: 14px 12px; }
    .workspace-search-tabs { flex-wrap: wrap; gap: 4px; padding-bottom: 8px; }
    .ws-search-tab { flex: 1; justify-content: center; padding: 9px 6px; font-size: .72rem; min-height: 42px; }
    .ws-search-badge { display: none; }
    .ws-search-form { flex-direction: column; }
    .ws-search-input { font-size: 16px; padding: 13px 40px 13px 14px; }
    .ws-clear-btn { padding: 10px; }
    .ws-submit-btn { justify-content: center; padding: 13px; min-height: 46px; }
    .ws-quick-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .ws-quick-pills::-webkit-scrollbar { display: none; }
    .ws-quick-pill { flex: none; padding: 7px 12px; }
    .ws-results-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ws-results-list { max-height: 60vh; }
    .ws-card-btn, .ws-send-assistant-btn { min-height: 38px; padding: 8px 10px; }

    /* Belge türleri: yan yana kompakt kartlar */
    .doc-types { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .doc-type { grid-template-columns: 1fr; grid-template-rows: auto auto; justify-items: center; text-align: center; padding: 12px 6px; row-gap: 4px; }
    .dt-ico { grid-row: auto; font-size: 1.4rem; }
    .dt-t { font-size: .86rem; }
    .dt-s { display: none; }

    .talep-box { padding: 12px; overflow: hidden; box-sizing: border-box; }
    .talep-box textarea { font-size: 16px; max-width: 100%; box-sizing: border-box; }
    .talep-foot { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px; width: 100%; box-sizing: border-box; }
    #talepCount { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 115px; flex-shrink: 1; }
    .talep-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
    #btnTemizle, #btnUret { flex: 0 0 auto !important; width: auto !important; min-height: 34px !important; padding: 6px 12px !important; font-size: .8rem !important; border-radius: 8px; }

    /* Editör */
    .editor-bar { flex-direction: column; align-items: stretch; padding: 10px; gap: 10px; }
    .editor-title-box { max-width: 100%; flex: none; width: 100%; }
    .editor-actions-right { width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; }
    .editor-actions-right .seg { flex: 1; display: flex; }
    .editor-bar .seg-btn { flex: 1; padding: 9px 6px; min-width: 0; white-space: normal; }
    .editor-bar > * { min-width: 0; }
    .editor-bar .btn.sm { flex: none; padding: 9px 10px; }
    .title-input { flex: 1; width: 100%; min-width: 0; font-size: 16px; padding: 9px 10px; }
    .editor { min-height: 300px; max-height: 70vh; padding: 16px 14px; font-size: 16px; line-height: 1.6; }
    .editor-loading-card { margin: 8px 0 14px; padding: 14px 12px; }
    .el-stepper {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 8px 6px;
    }
    .el-step {
        flex-direction: column;
        text-align: center;
        gap: 4px;
        align-items: center;
    }
    .el-step-text small { display: none; }
    .el-step-text strong { font-size: .68rem; }
    .el-step-icon { width: 22px; height: 22px; font-size: .68rem; }
    .el-step-divider { display: none; }
    .el-stream-text { max-height: 160px; font-size: .78rem; }
    .uretim-durum { font-size: .82rem; }

    /* Mobil imza & İndirme */
    .direct-download-card { padding: 14px 14px; margin-bottom: 16px; }
    .ddc-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .ddc-btn { padding: 10px 8px; }
    .ddc-btn-main { gap: 6px; }
    .ddc-icon { font-size: 1.2rem; }
    .ddc-text strong { font-size: .8rem; }
    .ddc-text small { display: none; }
    .ddc-action { font-size: .7rem; padding: 3px 6px; }
    .step3-divider { margin: 16px 0; font-size: .76rem; }
    .step3-export-card { flex-direction: column; align-items: stretch; gap: 10px; }
    .step3-export-card .indir-btnler { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .step3-export-card .indir-btnler .btn { width: 100%; min-height: 40px; }
    .seg-btn { min-height: 40px; }
    .sign-form input[type=tel], .udf-pick select { font-size: 16px; min-height: 48px; }
    .udf-pick { flex-direction: column; align-items: stretch; }
    .upload { margin-top: 0; min-height: 44px; }
    .op span { padding: 13px 4px; font-size: .8rem; }
    .btn.sign { min-height: 52px; }
    .sign-status { min-height: 220px; padding: 20px 14px; }
    .phone-art { width: 70px; height: 122px; border-radius: 16px; }
    .code-box { font-size: 2rem; letter-spacing: 7px; padding: 12px 18px; }
    .sign-status .btn { min-height: 44px; }

    /* UDF listesi: iki satırlı kartlar */
    .udf-list { max-height: none; }
    .udf-row { flex-wrap: wrap; row-gap: 4px; padding: 10px; }
    .udf-row .nm { flex: 1 1 calc(100% - 90px); order: 1; }
    .udf-row .badge { order: 2; }
    .udf-row .dt { order: 3; flex: 1; }
    .udf-row a, .udf-row button { order: 4; min-height: 36px; padding: 8px 10px; background: var(--bg-2); }

    .foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    .toast { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 28px); text-align: center; }
}

@media (max-width: 520px) {
    .wizard-stepper .ws-meta { display: none; }
    .wizard-step-btn { padding: 4px; }
    .wizard-stepper { justify-content: center; padding: 10px 14px; gap: 8px; }
    .ddc-grid { grid-template-columns: 1fr; gap: 8px; }
    .ddc-btn-main { gap: 10px; }
    .ddc-text small { display: block; }
}

/* Çok dar telefonlar */
@media (max-width: 380px) {
    .hero h1 { font-size: .94rem; }
    .doc-type { padding: 10px 4px; }
    .dt-t { font-size: .78rem; }
    .op span { font-size: .74rem; }
    .code-box { font-size: 1.7rem; letter-spacing: 5px; }
}

/* Yatay telefon */
@media (max-height: 500px) and (orientation: landscape) {
    .topbar { position: static; }
    .sign-status { min-height: 180px; }
    .phone-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* Mobil uygulama kabuğu (mobil_app/) içinde */
.in-app .status-chip { cursor: pointer; }
.in-app .foot { display: none; }

/* ══════════════════════════════════════════════════════
   ANA MENÜ & ÇOKLU GÖRÜNÜM (HUB NAVIGATION) SİSTEMİ
   ══════════════════════════════════════════════════════ */

/* Üst Çubuk Tekil Ana Menü Butonu (Navbarın Tam Ortasında) */
.topbar-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: auto;
}
.topbar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text-2);
    font: 600 .82rem var(--font);
    cursor: pointer;
    transition: all .16s ease;
    text-decoration: none;
}
.topbar-home-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.topbar-home-btn svg {
    color: var(--accent);
    flex-shrink: 0;
}
.topbar-home-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-strong);
}

/* Görünüm Geçiş Animasyonu */
.app-view {
    animation: viewFadeIn .22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Geri Dönüş / Üst Alt Başlık */
.view-header-bar, .view-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.back-to-menu-btn {
    font-weight: 600;
}
.vh-badge {
    font-size: .78rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
}

/* ── 1. Ana Menü (Hub) Tasarımı ── */
.hero-hub {
    text-align: center;
    margin: 20px 0 28px;
}
.hero-hub h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-top: 12px;
    line-height: 1.35;
}
.hero-sub {
    font-size: .9rem;
    color: var(--text-3);
    margin-top: 6px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.hub-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    transition: all .24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}
.hub-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: transparent;
    transition: background .2s ease;
}
.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    border-color: var(--accent);
}
.hub-card:hover::before {
    background: var(--accent);
}
.hub-card.primary {
    border-color: var(--accent-line);
    background: linear-gradient(145deg, #ffffff 0%, #f6faf7 100%);
}
.hub-card.primary::before {
    background: var(--accent);
}

.hc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 1px solid var(--line);
    transition: transform .2s ease;
}
.hub-card:hover .hc-icon {
    transform: scale(1.06);
}
.hc-icon-arama { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.hc-icon-olustur { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.hc-icon-editor { background: #fefce8; border-color: #fef08a; color: #ca8a04; }
.hc-icon-arsiv { background: #f0fdfa; border-color: #99f6e4; color: #0d9488; }
.hc-icon svg {
    display: block;
    stroke: currentColor;
}

.hc-badge {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-3);
    background: var(--bg-2);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.hub-card.primary .hc-badge {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

.hc-body h3 {
    font-size: 1.12rem;
    font-weight: 750;
    margin: 0 0 6px;
    color: var(--text);
}
.hc-body p {
    font-size: .84rem;
    color: var(--text-3);
    margin: 0;
    line-height: 1.5;
}

.hc-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.hc-cta {
    font-size: .82rem;
    font-weight: 700;
    color: var(--accent);
    transition: transform .15s ease;
}
.hub-card:hover .hc-cta {
    transform: translateX(3px);
}

/* Ana Menü Kilitli Kart (Başlangıç Paketi için Arşiv) */
.hub-card.locked {
    border-color: rgba(217, 119, 6, 0.35);
    background: linear-gradient(145deg, var(--surface) 0%, rgba(245, 158, 11, 0.03) 100%);
    position: relative;
}
.hub-card.locked::before {
    background: #d97706;
}
.hub-card.locked:hover {
    border-color: #d97706;
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.12);
}
.hub-card.locked .hc-icon {
    background: #fef3c7;
    border-color: #fde68a;
    color: #b45309;
}
.hc-badge.locked {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.3);
    font-weight: 750;
}
.hub-lock-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 750;
    padding: 2px 7px;
    border-radius: 6px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    vertical-align: middle;
    margin-left: 6px;
}
.hc-cta.upgrade-cta {
    color: #b45309;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hub-card.locked:hover .hc-cta.upgrade-cta {
    color: #92400e;
    text-decoration: underline;
}

.ac-creator {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: var(--surface-2);
    border-radius: 6px;
    border: 1px solid var(--line);
}
.hub-features-bar {
    display: none !important;
}

/* ── 4. Belgelerim (Arşiv) Ekranı ── */
.arsiv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.arsiv-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    padding: 6px 12px;
    flex: 1;
    min-width: 220px;
    max-width: 380px;
}
.arsiv-search-input {
    border: none;
    background: transparent;
    font: inherit;
    font-size: .84rem;
    color: var(--text);
    width: 100%;
    outline: none;
}
.arsiv-filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.aft-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-3);
    font: 600 .78rem var(--font);
    padding: 5px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: all .15s ease;
}
.aft-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
}
.aft-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
    font-weight: 700;
}

.arsiv-list-wrap {
    margin-top: 10px;
}
.arsiv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.arsiv-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: all .16s ease;
}
.arsiv-card:hover {
    border-color: var(--accent-line);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}
.ac-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.ac-type-icon {
    font-size: 1.35rem;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
}
.ac-type-icon.udf { background: #eff6ff; }
.ac-type-icon.pdf { background: #fef2f2; }
.ac-type-icon.docx { background: #eff6ff; }

.ac-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ac-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    color: var(--text-3);
    margin-top: 3px;
    flex-wrap: wrap;
}
.ac-date { color: var(--text-3); }
.ac-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

/* UDF Editörü Araç Çubuğu Butonları */
.ue-upload-btn {
    cursor: pointer;
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    font-weight: 600;
}
.ue-sign-btn {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    font-weight: 600;
}

/* Mobil Uyumlu Kurallar */
@media (max-width: 720px) {
    .topbar {
        padding: 10px 14px;
        gap: 10px;
    }
    .topbar-home-btn {
        padding: 6px 11px;
        font-size: .76rem;
        gap: 6px;
    }
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hub-card {
        padding: 18px 18px;
    }
    .arsiv-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .arsiv-search-wrap {
        max-width: none;
    }
    .arsiv-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .ac-actions {
        justify-content: flex-end;
    }
}

/* ══════════════ MSSQL KULLANICI GİRİŞ & KAYIT MODALI ══════════════ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .2s ease-out;
}
.auth-modal-overlay[hidden] {
    display: none !important;
}
.auth-modal-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 440px;
    padding: 28px;
    position: relative;
    animation: modalPop .24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}
.auth-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.auth-brand-badge {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}
.auth-modal-header h2 {
    font-size: 1.35rem;
    font-weight: 750;
    margin: 0;
    color: var(--text);
}
.auth-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .15s ease;
}
.auth-modal-close:hover {
    background: var(--line);
    color: var(--text);
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--surface-2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 20px;
}
.auth-tab-btn {
    border: none;
    background: transparent;
    padding: 9px;
    border-radius: 8px;
    font-size: .86rem;
    font-weight: 650;
    font-family: inherit;
    color: var(--text-2);
    cursor: pointer;
    transition: all .16s ease;
}
.auth-tab-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .84rem;
    margin-bottom: 16px;
}
.auth-alert.err {
    display: block !important;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.auth-alert.ok {
    display: block !important;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-form label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-2);
}
.auth-form input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: .9rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-submit-btn {
    margin-top: 6px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
}
.auth-quick-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: .78rem;
    color: var(--text-3);
}
.auth-quick-hint button {
    font-size: .75rem;
    padding: 3px 8px;
}

/* ══════════════ ADAPTE LOGIN & KAYIT EKRANI (VIEW LOGIN) ══════════════ */
.login-wrapper {
    max-width: 680px;
    margin: 10px auto 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: rise .28s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    padding: 38px 42px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, #10b981 50%, #3b82f6 100%);
}
.login-header {
    text-align: center;
    margin-bottom: 26px;
}
.login-header .giris-logo {
    margin-bottom: 12px;
}
.login-header h2 {
    font-size: 1.4rem;
    font-weight: 750;
    color: var(--text);
    margin: 10px 0 6px;
    letter-spacing: -.01em;
}
.login-sub {
    font-size: .88rem;
    color: var(--text-2);
    margin: 0 auto;
    max-width: 460px;
    line-height: 1.5;
}
.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--surface-2);
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
}
.login-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 650;
    color: var(--text-2);
    cursor: pointer;
    transition: all .18s ease;
    font-family: inherit;
}
.login-tab-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.login-tab-btn svg {
    color: currentColor;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: .82rem;
    font-weight: 650;
    color: var(--text-2);
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: .92rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.input-with-icon svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-3);
    pointer-events: none;
    z-index: 2;
    flex-shrink: 0;
    transition: color .15s ease;
}
.input-with-icon:focus-within svg {
    color: var(--accent);
}
.form-group .input-with-icon input,
.input-with-icon input {
    width: 100%;
    padding: 12px 14px 12px 44px !important;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: .92rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.input-with-icon input:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-2);
    margin: 4px 0 2px;
}
.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.remember-me input {
    accent-color: var(--accent);
    cursor: pointer;
}
.db-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 650;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--accent-line);
}
.btn-login-submit {
    margin-top: 4px;
    width: 100%;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(22, 101, 52, 0.22);
}

.login-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.lf-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.lf-icon {
    font-size: 1.5rem;
}
.lf-text b {
    display: block;
    font-size: .86rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.lf-text span {
    font-size: .76rem;
    color: var(--text-3);
    line-height: 1.45;
}

@media (max-width: 680px) {
    .login-card {
        padding: 26px 20px;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    .login-features {
        grid-template-columns: 1fr;
    }

}

/* ══════════════ KULLANICI DROPDOWN MENÜSÜ ══════════════ */
.user-pill-wrap {
    position: relative;
}
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 650;
    font-family: inherit;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all .16s ease;
}
.user-pill:hover {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.pill-arrow {
    color: var(--text-3);
    transition: transform .18s ease;
}
.user-pill.open .pill-arrow {
    transform: rotate(180deg);
}
.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
    padding: 14px;
    z-index: 100;
    animation: modalPop .18s cubic-bezier(0.16, 1, 0.3, 1);
}
.ud-header {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.ud-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.ud-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ud-name {
    font-size: .88rem;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ud-username {
    font-size: .74rem;
    color: var(--text-3);
}
.ud-details {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .76rem;
    border-bottom: 1px solid var(--line);
}
.ud-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.ud-label {
    color: var(--text-3);
}
.ud-val {
    font-weight: 650;
    color: var(--text);
    text-align: right;
}
.ud-actions {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ud-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 650;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all .15s ease;
}
.ud-btn svg {
    color: currentColor;
    flex-shrink: 0;
}
.ud-btn.pkg-btn {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(180, 83, 9, 0.18) 100%);
    border: 1px solid rgba(217, 119, 6, 0.32);
    color: #b45309;
}
.ud-btn.pkg-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
.ud-btn.primary {
    background: var(--accent-soft);
    color: var(--accent);
}
.ud-btn.primary:hover {
    background: var(--accent);
    color: #ffffff;
}
.ud-btn.logout {
    background: transparent;
    color: #dc2626;
}
.ud-btn.logout:hover {
    background: #fef2f2;
}

/* ══════════════ SAYFA BAŞI SOL ÜST GERİ DÖNÜŞ (PAGE TOP NAV) ══════════════ */
.page-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    width: 100%;
}
.btn-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    font-size: .84rem;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    font-family: inherit;
    transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    user-select: none;
}
.btn-page-back svg {
    color: currentColor;
    flex-shrink: 0;
    transition: transform .18s ease;
}
.btn-page-back:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.btn-page-back:hover svg {
    transform: translateX(-2px);
}
.btn-page-back:active {
    transform: scale(0.97);
}
.ue-home-back-btn {
    padding: 6px 14px;
    font-size: .78rem;
}
.page-top-nav .vh-badge {
    margin-left: auto;
}

/* ══════════════ PROFİL & HESAP AYARLARI EKRANI (VIEW PROFIL) ══════════════ */
.profil-container {
    max-width: 980px;
    margin: 0 auto 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: rise .25s ease-out;
}
.profil-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-profil-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    font-size: .82rem;
    font-weight: 650;
    color: var(--text-2);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s ease;
}
.btn-profil-back:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateX(-2px);
}
.profil-topbar h1 {
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--text);
    margin: 0;
}
.profil-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 22px;
    align-items: start;
}
.profil-summary-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}
.profil-summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
}
.psc-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 2px solid var(--accent-line);
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
}
.psc-name {
    font-size: 1.2rem;
    font-weight: 750;
    color: var(--text);
    margin: 0 0 3px;
}
.psc-user {
    font-size: .82rem;
    color: var(--text-3);
    display: block;
    margin-bottom: 8px;
}
.psc-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
}
.psc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 6px;
    margin: 20px 0;
}
.psc-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.psi-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}
.psi-lbl {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-3);
}
.psc-meta-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    text-align: left;
    font-size: .76rem;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.pml-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.pml-lbl {
    color: var(--text-3);
}
.pml-val {
    font-weight: 650;
    color: var(--text);
}
.profil-forms-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.profil-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    padding: 26px 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.pc-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.pc-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.pc-head h3 {
    font-size: 1.08rem;
    font-weight: 750;
    color: var(--text);
    margin: 0 0 3px;
}
.pc-head p {
    font-size: .8rem;
    color: var(--text-3);
    margin: 0;
}
.pc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pc-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: .92rem;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
}
.pc-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.pc-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

@media (max-width: 800px) {
    .profil-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════ PAKET YÖNETİMİ & ABONELİK STİLLERİ ══════════════ */
.btn-top-packages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.18));
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-top-packages:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.3));
    border-color: rgba(245, 158, 11, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}
.dark-theme .btn-top-packages {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}
.ud-pkg-badge {
    color: var(--accent) !important;
    font-weight: 700 !important;
}

/* Profil Kartı Abonelik Bloğu */
.psc-package-card {
    margin-top: 14px;
    padding: 16px;
    background: var(--surface-2);
    border-radius: 14px;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ppc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ppc-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-3);
}
.ppc-tier-badge {
    font-size: .76rem;
    font-weight: 750;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}
.ppc-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.ppc-price small {
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-3);
}
.ppc-quotas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.ppc-quota-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ppc-quota-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--text-2);
}
.ppc-quota-head b {
    color: var(--text);
    font-weight: 700;
}
.ppc-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}
.ppc-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width .3s ease;
}
.ppc-upgrade-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arşiv Kilit Ekranı */
.archive-locked-card {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border-radius: 20px;
    border: 1px dashed var(--line-strong);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.alc-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 4px;
}
.archive-locked-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 750;
    color: var(--text);
}
.archive-locked-card p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--text-2);
}
.alc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

/* Paket Yönetimi Sayfası */
.current-user-pkg-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--line);
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
}
.cupb-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cupb-icon {
    font-size: 24px;
}
.cupb-sub {
    font-size: .78rem;
    color: var(--text-3);
    display: block;
    font-weight: 600;
}
.cupb-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}
.cupb-status {
    display: inline-block;
    margin-left: 8px;
    font-size: .75rem;
    font-weight: 750;
    color: var(--accent);
}
.cupb-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cupb-stat-chip {
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .82rem;
    color: var(--text-2);
}
.cupb-stat-chip b {
    color: var(--text);
    font-weight: 750;
}

/* 3'lü Fiyatlandırma Kartları Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 24px;
}
@media (max-width: 960px) {
    .packages-grid {
        grid-template-columns: 1fr;
    }
}
.pkg-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--line);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all .25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.pkg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.pkg-card.popular {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--surface) 0%, rgba(22, 101, 52, 0.04) 100%);
    box-shadow: 0 8px 30px rgba(22, 101, 52, 0.12);
}
.pkg-popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent) 0%, #15803d 100%);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 4px 10px rgba(22, 101, 52, 0.3);
}
.pkg-card.enterprise {
    background: linear-gradient(180deg, var(--surface) 0%, rgba(245, 158, 11, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}
.pkg-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 750;
    margin-bottom: 10px;
}
.pkg-badge.starter {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--line);
}
.pkg-badge.pro {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}
.pkg-badge.enterprise {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.pkg-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text);
}
.pkg-desc {
    font-size: .84rem;
    line-height: 1.45;
    color: var(--text-3);
    margin: 0 0 16px;
    min-height: 40px;
}
.pkg-price-wrap {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.pkg-price-val {
    font-size: 2.2rem;
    font-weight: 850;
    color: var(--text);
    letter-spacing: -.03em;
    line-height: 1;
}
.pkg-currency {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.pkg-period {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text-3);
}
.contact-price-box {
    flex-direction: column;
    gap: 4px;
}
.pkg-contact-heading {
    font-size: 1.45rem;
    font-weight: 850;
    color: #d97706;
    letter-spacing: -.02em;
}
.pkg-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}
.pf-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: var(--text-2);
    line-height: 1.4;
}
.pf-item.pf-yes-strong {
    color: var(--text);
    font-weight: 600;
}
.pf-item.pf-no {
    color: var(--text-3);
    text-decoration: none;
    opacity: .75;
}
.pf-check {
    color: var(--accent);
    font-weight: 800;
    font-size: .95rem;
}
.pf-cross {
    color: #ef4444;
    font-weight: 800;
    font-size: .95rem;
}
.pkg-action-wrap {
    margin-top: auto;
}
.pkg-btn-action {
    width: 100%;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 750;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}
.pkg-btn-action.current {
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    cursor: default;
}
.btn.gold {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}
.btn.gold:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}
.contact-desc {
    font-size: .88rem;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 14px;
}
.auth-brand-badge.gold {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ══════════════ GELİŞMİŞ MOBİL UYUMLULUK VE RESPONSIVE İYİLEŞTİRMELERİ ══════════════ */
@media (max-width: 860px) {
    .profil-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .profil-summary-card {
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }
    .packages-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 720px) {
    .layout {
        padding: 16px 12px 50px;
        gap: 16px;
    }
    .topbar {
        padding: 10px 14px;
        justify-content: space-between;
    }
    .brand-logo {
        height: 26px;
        width: auto;
    }
    .brand-mobil {
        font-size: .62rem;
        letter-spacing: .35em;
    }
    .panel {
        padding: 18px 14px;
        border-radius: 16px;
    }
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    .panel-head h2 {
        font-size: 1.15rem;
    }
    .panel-head p {
        font-size: .82rem;
    }
    .panel-head .row-gap {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .panel-head .row-gap .btn,
    .panel-head .row-gap .upload {
        flex: 1 1 calc(50% - 6px);
        min-height: 38px;
        font-size: .78rem;
        padding: 6px 10px;
        text-align: center;
        justify-content: center;
    }
    .hero-hub h1 {
        font-size: 1.3rem;
        line-height: 1.35;
    }
    .hero-sub {
        font-size: .84rem;
        line-height: 1.45;
    }
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hub-card {
        padding: 18px 16px;
    }
    .hub-card h3 {
        font-size: 1.05rem;
    }
    .hub-features-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px;
    }
    .hfb-item {
        font-size: .74rem;
        gap: 6px;
    }
    /* Belge Sihirbazı */
    .wizard-stepper {
        padding: 10px 12px;
        gap: 4px;
    }
    .wizard-step-btn {
        padding: 6px 6px;
        gap: 6px;
    }
    .ws-circle {
        width: 32px;
        height: 32px;
        font-size: .82rem;
    }
    .ws-label {
        display: none;
    }
    .ws-title {
        font-size: .78rem;
    }
    .doc-types {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .doc-type {
        padding: 12px 14px;
    }
    .wizard-step-nav-footer {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 18px;
        padding-top: 14px;
    }
    .wizard-step-nav-footer .btn {
        width: 100%;
        min-height: 44px;
    }
    .wizard-step-nav-footer .ml-auto {
        margin-left: 0;
        width: 100%;
    }
    /* Paket Yönetimi */
    .current-user-pkg-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px 14px;
    }
    .cupb-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .cupb-stat-chip {
        padding: 8px 10px;
        font-size: .78rem;
        text-align: center;
    }
    .pkg-card {
        padding: 24px 18px;
    }
    /* Belgelerim / Arşiv */
    .arsiv-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .arsiv-filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .arsiv-filter-tabs::-webkit-scrollbar {
        display: none;
    }
    .aft-btn {
        flex-shrink: 0;
        font-size: .78rem;
        padding: 6px 12px;
    }
    .arsiv-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    .ac-main {
        width: 100%;
    }
    .ac-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .ac-actions .btn {
        width: 100%;
        padding: 8px 6px;
        font-size: .75rem;
    }
    /* Kullanıcı Profili */
    .profil-topbar h1 {
        font-size: 1.15rem;
    }
    .profil-card {
        padding: 20px 16px;
    }
    .pc-head h3 {
        font-size: 1rem;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pc-actions .btn {
        width: 100%;
        min-height: 42px;
    }
    /* Modal Pencereler */
    .auth-modal-card {
        padding: 22px 18px;
        border-radius: 18px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hub-features-bar {
        grid-template-columns: 1fr;
    }
    .ws-meta {
        display: none;
    }
    .ws-connector {
        margin: 0 2px;
    }
    .page-top-nav .vh-badge {
        font-size: .68rem;
        padding: 3px 8px;
    }
    .btn-page-back {
        padding: 6px 14px;
        font-size: .78rem;
    }
    .cupb-stats {
        grid-template-columns: 1fr;
    }
    .user-dropdown-menu {
        right: -8px;
        min-width: 270px;
    }
}

/* ══════════════ iOS & ANDROID HİBRİT UYGULAMA (IN-APP) OPTİMİZASYONLARI ══════════════ */
html.in-app {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overscroll-behavior-y: none;
}
html.in-app body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.in-app input,
html.in-app textarea,
html.in-app select {
    font-size: 16px; /* iOS Safari/WKWebView otomatik yakınlaştırmasını (auto-zoom) önler */
}


/* ══════════════ SWEETALERT2 ÖZEL TEMA UYUMU ══════════════ */
.swal2-container {
    z-index: 99999 !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.swal2-popup {
    font-family: var(--font, 'Inter', sans-serif) !important;
    border-radius: 20px !important;
    padding: 26px 24px 22px !important;
    border: 1px solid var(--line-strong, #cbd5e1) !important;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
    background: var(--surface, #ffffff) !important;
    color: var(--text, #0f172a) !important;
}
.swal2-title {
    font-family: var(--display, 'Outfit', sans-serif) !important;
    font-size: 1.25rem !important;
    font-weight: 750 !important;
    color: var(--text, #0f172a) !important;
    padding-top: 6px !important;
}
.swal2-html-container {
    font-size: .92rem !important;
    line-height: 1.55 !important;
    color: var(--text-2, #334155) !important;
    margin-top: 8px !important;
}
.swal2-actions {
    gap: 10px !important;
    margin-top: 20px !important;
}
.swal2-styled.swal2-confirm {
    background: var(--accent, #15803d) !important;
    color: #ffffff !important;
    border-radius: 11px !important;
    padding: 10px 22px !important;
    font-size: .88rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.22) !important;
    border: none !important;
    transition: transform .15s ease, filter .15s ease !important;
}
.swal2-styled.swal2-confirm.swal-danger-btn {
    background: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.24) !important;
}
.swal2-styled.swal2-confirm:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.swal2-styled.swal2-cancel {
    background: var(--surface-2, #f1f5f9) !important;
    color: var(--text-2, #334155) !important;
    border: 1px solid var(--line-strong, #cbd5e1) !important;
    border-radius: 11px !important;
    padding: 10px 20px !important;
    font-size: .88rem !important;
    font-weight: 650 !important;
}
.swal2-styled.swal2-cancel:hover {
    background: #e2e8f0 !important;
    color: var(--text, #0f172a) !important;
}

.ddc-btn.locked-pro {
    border-color: rgba(217, 119, 6, 0.45);
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}
.ddc-btn.locked-pro .ddc-text strong {
    color: #92400e;
}
.ddc-btn.locked-pro .ddc-text small {
    color: #b45309;
    font-weight: 600;
}
.ddc-btn.locked-pro .ddc-action {
    background: #fef3c7;
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.4);
}
.ddc-btn.locked-pro:hover {
    border-color: #d97706;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.14);
}
.ddc-btn.locked-pro:hover .ddc-action {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
}

/* Mobil İmzalı Belge Hazır Durumu (3. Adım) */
.direct-download-card.signed-active {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 55%, #ffffff 100%);
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12), 0 1px 4px rgba(16, 185, 129, 0.08);
}
.direct-download-card.signed-active .ddc-badge {
    color: #047857;
}
.ddc-btn.signed-ready {
    border: 1.5px solid #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}
.ddc-btn.signed-ready .ddc-text strong {
    color: #065f46;
}
.ddc-btn.signed-ready .ddc-text small {
    color: #047857;
    font-weight: 650;
}
.ddc-btn.signed-ready .ddc-action {
    background: #059669;
    color: #ffffff;
    border-color: #047857;
}
.ddc-btn.signed-ready:hover {
    border-color: #047857;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.2);
}
.ddc-btn.signed-ready:hover .ddc-action {
    background: #047857;
    color: #ffffff;
}
.ss-done-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}
.sign-save-btn {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #10b981;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s ease;
}
.sign-save-btn:hover {
    background: #059669;
    color: #ffffff;
    border-color: #047857;
}

/* ── İmza Türü Seçici (Mobil İmza vs Elektronik İmza / Dongle) ── */
.sign-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.sign-type-tab {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.18s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(15, 19, 17, 0.04);
    min-width: 0;
}

.sign-type-tab:hover {
    border-color: var(--accent);
    background: var(--surface-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 19, 17, 0.06);
}

.sign-type-tab.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent), 0 4px 14px rgba(21, 128, 61, 0.08);
}

.sign-type-tab .stt-icon {
    font-size: 1.35rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.sign-type-tab.active .stt-icon {
    background: var(--surface);
    border-color: var(--accent-line);
    box-shadow: 0 2px 6px rgba(21, 128, 61, 0.1);
}

.sign-type-tab .stt-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.sign-type-tab .stt-body strong {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

.sign-type-tab.active .stt-body strong {
    color: var(--accent-strong);
}

.sign-type-tab .stt-body small {
    font-size: 0.76rem;
    color: var(--text-3);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sign-type-tab.active .stt-body small {
    color: var(--text-2);
}

.sign-type-tab .stt-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.sign-type-tab.active .stt-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* Mobil İmza & E-İmza Form Düzeni */
.sign-grid {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.sign-form {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(15, 19, 17, 0.03);
    min-width: 0;
}

.sign-form > label,
.eimza-header-row label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-2);
    margin: 0 0 7px;
}

.operators {
    margin-bottom: 4px;
}

.operators label.op {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.86rem;
}

.sign-form input[type="tel"],
.sign-form input[type="text"],
.sign-form input[type="password"],
.eimza-select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font: 500 0.92rem var(--font);
    outline: none;
    margin-bottom: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.sign-form input[type="tel"] {
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.4px;
}

.sign-form input[type="tel"]:focus,
.sign-form input[type="text"]:focus,
.sign-form input[type="password"]:focus,
.eimza-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.sign-form input::placeholder {
    color: var(--text-3);
    font-weight: 400;
    letter-spacing: normal;
}

.eimza-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.eimza-header-row label {
    margin-bottom: 0;
}

.btn.xs {
    padding: 5px 10px;
    font-size: 0.74rem;
    border-radius: 7px;
    font-weight: 600;
    white-space: nowrap;
}

.eimza-dongle-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 14px;
    padding: 9px 12px;
    border-radius: 9px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-strong);
    line-height: 1.4;
}

.eimza-dongle-status .eds-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.18);
    flex-shrink: 0;
}

.code-box.eimza-mode {
    font-size: 1.35rem;
    letter-spacing: 2px;
    padding: 10px 20px;
}

/* Arşiv İmza Türü Rozetleri (İmzasız / Mobil İmza / E-İmza) */
.badge.sig-mobil {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 650;
}

.badge.sig-eimza {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 650;
}

.badge.unsigned {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

@media (max-width: 960px) {
    .sign-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .sign-type-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .sign-type-tab {
        padding: 12px 14px;
    }
    .sign-type-tab .stt-body small {
        white-space: normal;
    }
    .sign-form {
        padding: 16px 14px;
    }
    .sign-form input[type="tel"],
    .sign-form input[type="text"],
    .sign-form input[type="password"],
    .eimza-select {
        font-size: 16px;
        min-height: 46px;
    }
}
