/* ══════════════════════════════════════════════════════════════════════════
   Sunum Stüdyosu — admin editör kabuğu. Tümü ".studio" altında kapsüllenmiştir
   (app.css ile çakışmaz). İki panel: solda kontrol rayı, sağda büyük canlı
   önizleme sahnesi (gerçek belge presentation.css ile render olur).
   ══════════════════════════════════════════════════════════════════════════ */
.studio {
    --stu-navy: #1B263B;
    --stu-navy-2: #22324c;
    --stu-accent: #E07A5F;
    --stu-line: #e6e9f1;
    --stu-soft: #f6f8fc;
    --stu-muted: #6b7688;
    --stu-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: calc(100vh - 130px);
    min-height: 620px;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--stu-navy);
}

/* ── Üst bar ─────────────────────────────────────────────────────────── */
.studio-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--stu-navy), var(--stu-navy-2));
    color: #fff;
    padding: 14px 18px;
    border-radius: var(--stu-radius);
    box-shadow: 0 14px 34px -22px rgba(16, 26, 43, .8);
}

.studio-top > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.studio-top .btn-outline-secondary {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .3);
    --bs-btn-hover-bg: rgba(255, 255, 255, .12);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .5);
    --bs-btn-hover-color: #fff;
    border-radius: 999px;
}

.studio-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.18rem;
    letter-spacing: -.2px;
}

.studio-title i {
    color: var(--stu-accent);
    margin-right: 4px;
}

.studio-top .text-muted {
    color: rgba(255, 255, 255, .6) !important;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-top-actions {
    display: flex;
    gap: 8px;
}

/* ── Iki panel ───────────────────────────────────────────────────────── */
.studio-grid {
    display: grid;
    grid-template-columns: 384px minmax(0, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 0;
}

/* ── Sol: kontrol rayı ───────────────────────────────────────────────── */
.studio-panel {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 6px;
}

.studio-panel::-webkit-scrollbar { width: 8px; }
.studio-panel::-webkit-scrollbar-thumb { background: #d5dae4; border-radius: 8px; }

.sp-block {
    border: 1px solid var(--stu-line);
    border-radius: var(--stu-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 24px -20px rgba(16, 26, 43, .5);
}

.sp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--stu-soft);
    border-bottom: 1px solid #eef1f7;
    font-weight: 650;
    font-size: .82rem;
    letter-spacing: .2px;
}

.sp-head i { color: var(--stu-accent); margin-right: 6px; }

.sp-body { padding: 14px; }

.fl {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--stu-muted);
    margin: 12px 0 4px;
    font-weight: 700;
}

.fl:first-child { margin-top: 0; }

.studio .form-select,
.studio .form-control {
    border-color: var(--stu-line);
    border-radius: 10px;
    font-size: .88rem;
}

.studio .form-select:focus,
.studio .form-control:focus {
    border-color: var(--stu-accent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--stu-accent) 22%, transparent);
}

.studio .form-check-input:checked {
    background-color: var(--stu-accent);
    border-color: var(--stu-accent);
}

/* ── Belge listesi ───────────────────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; }

.doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #f1f3f8;
    background: #fff;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background .12s ease, box-shadow .12s ease;
}

.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: var(--stu-soft); }

.doc-row.active {
    background: color-mix(in oklab, var(--stu-accent) 8%, #fff);
    box-shadow: inset 3px 0 0 var(--stu-accent);
}

.doc-row-main { display: flex; flex-direction: column; min-width: 0; }

.doc-name {
    font-weight: 650;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta { font-size: .72rem; color: #97a1b3; }

.chip {
    font-size: .66rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
    letter-spacing: .2px;
}

.chip-live { background: #e6f6ec; color: #1f7a44; }
.chip-expired { background: #fdecec; color: #b42318; }
.chip-draft { background: #eef1f7; color: #55617a; }

/* ── Müşteri / greeting ──────────────────────────────────────────────── */
.greeting-preview {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, color-mix(in oklab, var(--stu-accent) 10%, var(--stu-soft)), var(--stu-soft));
    border: 1px solid color-mix(in oklab, var(--stu-accent) 20%, transparent);
    border-radius: 10px;
    font-size: .84rem;
    color: #4a5468;
}

/* ── Bölümler ────────────────────────────────────────────────────────── */
.sec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eef1f7;
}

.sec-row:last-child { border-bottom: 0; }
.sec-row .form-check-label { font-size: .86rem; font-weight: 500; }
.sec-move { display: flex; gap: 4px; }

.btn-xs {
    padding: 2px 7px;
    font-size: .72rem;
    line-height: 1.4;
    border-radius: 8px;
}

/* ── Web yayını ──────────────────────────────────────────────────────── */
.pub-live {
    font-size: .84rem;
    font-weight: 600;
    color: #1f7a44;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-url { display: flex; gap: 6px; }
.share-url .form-control { font-size: .78rem; background: var(--stu-soft); }

/* ── Sağ: önizleme sahnesi ───────────────────────────────────────────── */
.studio-preview {
    border: 1px solid var(--stu-line);
    border-radius: var(--stu-radius);
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(224, 122, 95, .06), transparent 60%),
        linear-gradient(180deg, #eef1f6, #e6eaf1);
    overflow: hidden;
    min-height: 0;
    position: relative;
    box-shadow: inset 0 2px 18px -8px rgba(16, 26, 43, .25);
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.preview-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8a94a6;
    text-align: center;
    padding: 24px;
}

.preview-empty i { font-size: 3.4rem; color: #b7c0cf; }

/* ── Dar ekran ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .studio { height: auto; }
    .studio-grid { grid-template-columns: 1fr; }
    .studio-preview { height: 78vh; }
}
