/*
 * LivedStory Panel — koyu menü + açık içerik.
 * livedstory.kodentek.com kimliği: elektrik yeşili (#dfff4b) vurgu, Archivo başlıklar +
 * Instrument Sans gövde, pill butonlar. Marka koyu sol menüde ve giriş ekranında yaşar;
 * çalışma alanı (formlar, tablolar) uzun kullanımda rahat okunsun diye açık zemindedir.
 *
 * Yeşil beyaz üzerinde okunmaz (kontrast ~1.1:1): açık alanda yalnızca DOLGU olarak
 * (siyah yazılı buton, aktif öğe) kullanılır. Yazı / ikon rengi gereken yerde
 * --accent-strong (koyu zeytin yeşili, beyazda ~6:1) kullanılır.
 *
 * NOT: Eski --blue-* değişken adları korundu (sayfalardaki inline style'lar bunlara bağlı).
 */
:root {
    /* Yüzeyler */
    --sidebar-bg: #0a0a0b;
    --bg: #f3f3ef;        /* sayfa zemini — sıcak açık gri */
    --surface: #ffffff;   /* kartlar */
    --surface-2: #f7f7f3; /* input, tablo başlığı, yükseltilmiş yüzey */
    --white: #ffffff;

    /* Metin */
    --ink: #121214;       /* ana metin */
    --muted: #5f5e58;     /* ikincil metin (beyazda ~6:1) */
    --line: #e4e3dd;      /* çerçeveler */
    --line-strong: #cfcec7;

    /* Vurgu (site ile aynı) */
    --accent: #dfff4b;
    --accent-hover: #d2f53a;
    --accent-ink: #0a0a0b;     /* yeşil zemin üzerindeki metin */
    --accent-strong: #4f6a00;  /* açık zeminde yeşil yazı/ikon */
    --accent-soft: rgba(223, 255, 75, .32); /* açık zeminde yeşil vurgu dolgusu */

    /* Durum renkleri */
    --danger: #b42318;
    --danger-bg: #fdecea;
    --success: #3f6212;
    --success-bg: #eef9cc;
    --warning: #b45309;
    --warning-bg: #fef3c7;

    /* Eski --blue-* -> yeni palet eşlemesi */
    --blue-900: #0a0a0b;
    --blue-700: var(--accent-strong);
    --blue-600: var(--accent-strong);
    --blue-500: #a8c700;
    --blue-100: var(--accent-soft);
    --blue-50: #f3f5e6;

    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 16, 20, .05), 0 8px 24px rgba(16, 16, 20, .06);
    --glow: 0 8px 24px -10px rgba(122, 150, 0, .55);

    /* Hareket — tüm geçişler aynı ritimde */
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --dur-fast: .15s;
    --dur: .25s;

    color-scheme: light;
}

/* Koyu bölgeler: sol menü ve giriş ekranı aynı değişkenlerin koyu karşılıklarını kullanır */
.sidebar, .login-wrap {
    --surface: #141416;
    --surface-2: #1b1b1e;
    --ink: #f2f0ea;
    --muted: #97968f;
    --line: #2a2a2e;
    --line-strong: #3a3a3f;
    --accent-strong: var(--accent);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, .12);
    --glow: 0 8px 28px -10px rgba(223, 255, 75, .55);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
    /* Yazı rengi body'den hesaplanmış (koyu) değer olarak miras gelir; bölgede yeniden ver */
    color: var(--ink);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    /* Sağ üstten gelen hafif yeşil ışık — düz siyah zemini canlandırır */
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(223, 255, 75, .22), transparent 60%),
        radial-gradient(700px 480px at 0% 110%, rgba(223, 255, 75, .10), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: Archivo, "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
    margin: 0 0 .5rem;
}
h1, h2 { text-transform: uppercase; letter-spacing: .005em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }

::selection { background: var(--accent); color: var(--accent-ink); }
.sidebar a { color: inherit; }

/* İnce koyu scrollbar */
* { scrollbar-width: thin; scrollbar-color: #c9c8c1 transparent; }
.sidebar * { scrollbar-color: #35353a transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #c9c8c1; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }

/* ---- Uygulama iskeleti ---- */
.app {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0c0c0e 0%, var(--sidebar-bg) 60%);
    color: rgba(242, 240, 234, .72);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, .06);
}
/* Menü uzun olursa kendi içinde kayar; alttaki kullanıcı / çıkış satırı hep görünür kalır */
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; }

.brand {
    display: flex;
    flex-direction: column;
    padding: 4px 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 8px;
}
.brand strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: Archivo, sans-serif;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.brand strong::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(223, 255, 75, .55); }
    70%  { box-shadow: 0 0 0 8px rgba(223, 255, 75, 0); }
    100% { box-shadow: 0 0 0 0 rgba(223, 255, 75, 0); }
}
.brand span { font-size: .68rem; letter-spacing: .28em; color: rgba(242, 240, 234, .42); text-transform: uppercase; }

.nav-group {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(242, 240, 234, .46);
    padding: 4px 12px 3px;
    margin-top: 10px;
}
.nav-group:first-child { margin-top: 6px; }

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(242, 240, 234, .72);
    padding: 7px 12px;
    border-radius: 10px;
    margin-bottom: 2px;
    font-weight: 500;
    transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.nav a .ico { width: 18px; height: 18px; flex: none; opacity: .75; transition: transform var(--dur) var(--ease-out), opacity var(--dur); }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a:hover .ico { opacity: 1; transform: translateX(2px); }
.nav a.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: var(--glow); }
.nav a.active .ico { opacity: 1; }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar-foot .who { display: flex; align-items: center; gap: 10px; padding: 0 2px 0 6px; }
.sidebar-foot form { margin-left: auto; }
.icon-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%;
    background: transparent; color: rgba(242, 240, 234, .75); cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.icon-btn:hover { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .45); color: #fca5a5; }
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn.is-loading .ico { visibility: hidden; }
.icon-btn.is-loading { position: relative; }
.icon-btn.is-loading::after {
    content: ""; position: absolute; width: 14px; height: 14px;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin .7s linear infinite;
}
.avatar {
    width: 36px; height: 36px; flex: none;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #9fd62b);
    color: var(--accent-ink);
    font-family: Archivo, sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .02em;
}
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-text strong { color: var(--ink); font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { color: rgba(242, 240, 234, .5); font-size: .75rem; }

/* ---- İçerik ----
   Eskiden 920px'le sola yaslıydı: geniş ekranda sağın üçte biri boş kalıyordu. Artık
   kolonu doldurur, çok geniş ekranda okunaklı genişlikte ortalanır. */
.main-col { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px clamp(16px, 3.5vw, 48px) 56px; }

/* Üst bar: bulunulan sayfa + siteye kısayol */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px clamp(16px, 3.5vw, 48px);
    background: rgba(243, 243, 239, .78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; min-width: 0; }
.crumb-root { color: var(--muted); }
a.crumb-root:hover { color: var(--ink); text-decoration: none; }
.crumb-sep { color: var(--line-strong); }
.crumb-here { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-link .ico { width: 15px; height: 15px; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.page-title { margin-bottom: 18px; }
.page-title:has(+ .page-sub) { margin-bottom: 4px; }
.page-sub { color: var(--muted); margin: 0 0 24px; }

/* Her sayfanın en üstünde "bu sayfa ne işe yarar" açıklaması (ViewData["PageInfo"]) */
.page-info {
    background: #f7fbe3;
    border: 1px solid #e3eeb4;
    border-left: 3px solid #a8c700;
    color: #3d3c37;
    border-radius: 8px;
    padding: 11px 15px;
    margin-bottom: 22px;
    font-size: .88rem;
    line-height: 1.5;
}

/* ---- Sekmeler ---- */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}
.tabs .tab {
    padding: 9px 16px;
    color: var(--muted);
    font-weight: 600;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--ink); text-decoration: none; }
.tabs .tab.active { color: var(--ink); border-bottom-color: #a8c700; }

/* ---- Kartlar ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color var(--dur) var(--ease-out);
}
.card:hover { border-color: var(--line-strong); }
.card > h2 { margin-bottom: 4px; }
.card > .card-sub { color: var(--muted); margin: 0 0 18px; font-size: .9rem; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 90% at 100% 0%, rgba(223, 255, 75, .30), transparent 55%), var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.stat:hover { transform: translateY(-2px); border-color: #c9dc6a; box-shadow: 0 12px 30px -14px rgba(122, 150, 0, .35); }
.stat .k { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-family: Archivo, sans-serif; font-size: 1.9rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; transition: color var(--dur); }
.stat:hover .v { color: var(--accent-strong); }

/* ---- Formlar ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=number],
.field input[type=url],
.field input[type=tel],
.field input[type=search],
.field input[type=date],
.field input:not([type]),
.field textarea,
.field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    background: var(--surface-2);
    color: var(--ink);
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.field input:hover:not(:focus), .field textarea:hover:not(:focus), .field select:hover:not(:focus) { border-color: #a9a8a1; }
.field textarea,
.field select { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8f8e87; }
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: #a8c700;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.url-preview { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--muted); word-break: break-all; }
.url-preview strong { color: var(--accent-strong); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Sınıfsız açılır menüler (filtre çubukları) da koyu görünsün */
select { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
option { background: var(--surface-2); color: var(--ink); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    background: var(--accent);
    color: var(--accent-ink);
    position: relative;
    transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease,
                transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; box-shadow: var(--glow); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn .ico { width: 16px; height: 16px; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: rgba(16, 16, 20, .04); border-color: var(--ink); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: rgba(16, 16, 20, .05); box-shadow: none; }
.btn-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ---- Uyarılar ---- */
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: .9rem; }
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5c2bc; }
.alert.success { background: var(--success-bg); color: var(--success); border: 1px solid #d6ec8f; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.field-validation-error { color: var(--danger); font-size: .82rem; display: block; margin-top: 5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge.on { background: var(--success-bg); color: var(--success); }
.badge.off { background: #ecebe6; color: var(--muted); }

/* ---- Giriş ekranı ---- */
.login-wrap { position: relative; overflow: hidden; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #17171a, var(--sidebar-bg)); }
/* Arkada yavaşça dolaşan yeşil ışık */
.login-wrap::before {
    content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, rgba(223, 255, 75, .16), transparent 62%);
    filter: blur(20px);
    animation: drift 14s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes drift {
    from { transform: translate(-30%, -25%); }
    to   { transform: translate(30%, 20%); }
}
.login-card { position: relative; animation: rise .5s var(--ease-out) both; width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 32px; }
.login-card .brand { border: 0; padding: 0 0 20px; align-items: center; text-align: center; }
.login-card .brand strong { color: var(--ink); font-size: 1.35rem; }
.login-card .brand span { color: var(--accent); }

/* ---- Tablo ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: var(--surface-2); color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr td { transition: background var(--dur-fast); }
.tbl tbody tr:hover td { background: #fafbf2; }
.muted-sm { color: var(--muted); font-size: .8rem; }

.btn.sm { padding: 7px 14px; font-size: .82rem; }
.btn.danger { background: transparent; color: var(--danger); border-color: #f0b4ad; }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.reorder { display: inline-flex; flex-direction: column; gap: 2px; }
.mini {
    border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted);
    width: 26px; height: 20px; line-height: 1; border-radius: 5px; cursor: pointer; font-size: .7rem;
}
.mini:hover:not(:disabled) { border-color: var(--accent-strong); color: var(--accent-strong); }
.mini:disabled { opacity: .35; cursor: default; }

/* ---- Dil seçici ---- */
.lang-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .88rem;
}
.pill.checked { background: var(--accent-soft); border-color: #a8c700; color: var(--ink); }
.pill input { accent-color: var(--accent); }

/* ---- Medya galerisi ---- */
.media-row { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--surface-2); }
.media-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.media-type { max-width: 120px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.media-row-body { display: grid; grid-template-columns: 132px 1fr; gap: 14px; }
.media-thumb, .media-preview { border-radius: 8px; overflow: hidden; background: #ecebe6; }
.media-thumb { width: 132px; height: 96px; display: grid; place-items: center; }
.media-thumb:empty::after, .media-preview:empty { content: ""; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-preview { margin-top: 10px; max-width: 320px; }
.media-preview img, .media-preview video { width: 100%; display: block; }
.media-fields { min-width: 0; }

.uploader { display: flex; align-items: center; gap: 10px; }
.up-status { font-size: .8rem; color: var(--muted); }

.metric-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.metric-row input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 7px; flex: 1; min-width: 120px; background: var(--surface-2); color: var(--ink); }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; }

/* --- Rol izinleri: toplu seçim UI --- */
.perm-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.perm-toolbar > label { margin: 0; font-weight: 600; }
.btn.link { background: none; border: 0; color: var(--accent-strong); padding: 2px 4px; font: inherit; cursor: pointer; text-decoration: underline; }
.btn.link:hover { color: var(--ink); }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.perm-group-head strong { font-size: .95rem; }
.check.implied { opacity: .7; }
.check.implied input { accent-color: var(--muted); }
.perm-auto { font-size: .68rem; margin-left: 6px; vertical-align: middle; }

@media (max-width: 720px) {
    .media-row-body { grid-template-columns: 1fr; }
    .tbl { font-size: .82rem; }
    .app { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
    .brand { border: 0; margin: 0 14px 0 4px; padding: 0; }
    .nav { display: flex; flex-wrap: wrap; gap: 4px; overflow: visible; margin: 0; padding: 0; }
    .nav a { margin: 0; padding: 7px 10px; }
    .nav-group { display: none; }
    .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
    .row2 { grid-template-columns: 1fr; }
}

/* ---- Medya kartları (Ana Sayfa Videoları) ----
   Alanlar yan yana: üstte sitedeki oranla (16:9) önizleme, altında açıklama ve butonlar. */
.media-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.media-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
    animation: rise .45s var(--ease-out) both;
}
.media-card:nth-child(2) { animation-delay: .07s; }
.media-card:nth-child(3) { animation-delay: .14s; }
.media-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.media-card.is-dirty { border-color: #f0b429; box-shadow: 0 0 0 1px rgba(240, 180, 41, .35), var(--shadow); }

.mc-preview { position: relative; aspect-ratio: 16 / 9; background: #ecebe6; display: grid; place-items: center; }
/* Medya kutuyu doldurur ama boyutunu belirlemez: dikey fotoğraf da 16:9 çerçevede kırpılır */
.mc-preview > video, .mc-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-preview > .mc-empty { position: absolute; inset: 0; }
.mc-preview.just-updated > video, .mc-preview.just-updated > img { animation: media-in .5s var(--ease-out) both; }
@keyframes media-in { from { opacity: 0; transform: scale(1.03); } }
.mc-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    color: var(--muted); font-size: .85rem;
    background:
        radial-gradient(60% 60% at 50% 45%, rgba(223, 255, 75, .35), transparent 70%),
        repeating-linear-gradient(-45deg, rgba(16, 16, 20, .03) 0 10px, transparent 10px 20px);
}
.mc-empty svg { width: 34px; height: 34px; color: var(--accent-strong); }
.mc-badge {
    position: absolute; top: 10px; left: 10px; z-index: 1;
    padding: 3px 10px; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    background: rgba(255, 255, 255, .9); color: var(--muted);
    border: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.has-media .mc-badge { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.is-dirty .mc-badge { background: var(--warning-bg); color: var(--warning); border-color: #f5d27a; }

.mc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mc-body h2 { margin: 0; }
.mc-help { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.mc-spec {
    margin: 0; align-self: flex-start;
    padding: 4px 10px; border-radius: 8px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: .76rem; color: #3d3c37;
}
.mc-body .uploader { flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.mc-url summary { cursor: pointer; font-size: .8rem; color: var(--muted); list-style: none; }
.mc-url summary::-webkit-details-marker { display: none; }
.mc-url summary::before { content: "▸ "; }
.mc-url[open] summary::before { content: "▾ "; }
.mc-url summary:hover { color: var(--ink); }
.mc-url .field { margin: 8px 0 0; }

/* Kaydet çubuğu: ekranın altına yapışır; kaydedilmemiş değişiklik varken vurgulanır */
.save-bar {
    position: sticky; bottom: 16px; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 22px; padding: 12px 14px 12px 20px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
    border: 1px solid var(--line); border-radius: 999px;
    box-shadow: 0 12px 30px rgba(16, 16, 20, .12);
    transition: border-color var(--dur), box-shadow var(--dur);
}
.save-note { color: var(--muted); font-size: .88rem; }
.is-dirty .save-bar { border-color: #f0b429; background: #fffbeb; }
.is-dirty .save-note { color: var(--warning); font-weight: 600; }
.is-dirty .save-bar .btn { animation: save-pulse 1.8s ease-out infinite; }
@keyframes save-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(223, 255, 75, .55); }
    70%  { box-shadow: 0 0 0 12px rgba(223, 255, 75, 0); }
    100% { box-shadow: 0 0 0 0 rgba(223, 255, 75, 0); }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   Canlılık katmanı — yükleme geri bildirimi ve giriş hareketleri
   (panel.js sınıfları yönetir; "hareketi azalt" tercihinde kapanır)
   ============================================================ */

/* Üstte akan ince çubuk: link tıklaması / form gönderiminden yeni sayfa gelene kadar */
.nav-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000;
    overflow: hidden; opacity: 0; pointer-events: none;
    transition: opacity var(--dur) ease;
}
.nav-progress::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 40%;
    background: linear-gradient(90deg, transparent, #a8c700, var(--accent), #a8c700, transparent);
    box-shadow: 0 0 12px var(--accent);
    animation: progress-slide 1.1s var(--ease-out) infinite;
}
.is-navigating .nav-progress { opacity: 1; }
@keyframes progress-slide {
    from { transform: translateX(-100%); }
    to   { transform: translateX(260%); }
}

/* Yeni sayfa beklenirken içerik hafifçe söner ve üzerinden parıltı geçer */
.content { position: relative; transition: opacity var(--dur) ease; }
.is-navigating .content { opacity: .6; }
.is-navigating .content::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, rgba(223, 255, 75, .35) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
    from { background-position: 150% 0; }
    to   { background-position: -50% 0; }
}

/* Basılan butonda spinner; metin yerinde kalır ki genişlik oynamasın */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border: 2px solid currentColor; border-radius: 50%;
    border-color: var(--accent-ink) transparent var(--accent-ink) var(--accent-ink);
    animation: spin .7s linear infinite;
}
.btn.secondary.is-loading::after, .btn.ghost.is-loading::after, .btn.danger.is-loading::after {
    border-color: var(--ink) transparent var(--ink) var(--ink);
}
/* Medya yüklerken (upload scriptleri butonu disabled yapar) butonda dönen halka */
.btn[data-upload-btn]:disabled { opacity: 1; cursor: progress; }
.btn[data-upload-btn]:disabled::before {
    content: ""; width: 12px; height: 12px; flex: none;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Sayfa açılışı: bloklar sırayla yukarı doğru belirir */
@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.content > * { animation: rise .45s var(--ease-out) both; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; }
.content > *:nth-child(5) { animation-delay: .2s; }
.content > *:nth-child(n+6) { animation-delay: .25s; }
.grid-cards > .stat { animation: rise .45s var(--ease-out) both; }
.grid-cards > .stat:nth-child(2) { animation-delay: .06s; }
.grid-cards > .stat:nth-child(3) { animation-delay: .12s; }
.grid-cards > .stat:nth-child(n+4) { animation-delay: .18s; }

/* "Kaydedildi" bildirimi kayarak gelir, 5 sn sonra (panel.js) kayarak gider */
.content > .alert.success { animation: toast-in .4s var(--ease-out) both; }
.alert.is-leaving { animation: toast-out .3s ease-in forwards !important; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(-6px); }
}

/* Boş tablo satırı ("Kayıt yok.") → ikonlu boş durum */
.tbl tbody tr:only-child > td[colspan] { padding-top: 36px !important; padding-bottom: 36px !important; }
.tbl tbody tr:only-child > td[colspan]::before {
    content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px;
    border-radius: 12px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f6a00' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / 22px no-repeat,
        var(--accent-soft);
    border: 1px solid #d6ec8f;
}

/* Analitik: çubuklar alttan büyür; hiç ziyaret yoksa boş çerçeve yerine açıklama */
.timeline rect { transform-box: fill-box; transform-origin: bottom; animation: bar-grow .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.timeline-empty {
    display: flex; align-items: center; gap: 14px;
    padding: 22px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted);
    background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(16, 16, 20, .03) 22px 24px);
}
.timeline-empty strong { color: var(--ink); display: block; font-weight: 600; }

/* Klavye odağı her yerde görünür */
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.sidebar :focus-visible { outline-color: var(--accent); }
.btn:focus-visible { outline-offset: 3px; }

@media (max-width: 720px) {
    .topbar { position: static; }
    .nav a .ico { display: none; }
    .who-text, .avatar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .nav-progress::before { width: 100%; animation: none; }
    .login-wrap::before { animation: none; }
}

