/* ============================================================
   GreenCloud Video — Panel stilleri
   ============================================================ */

/* ── Tasarım belirteçleri ────────────────────────────────── */
:root {
  --brand:        #16a34a;
  --brand-600:    #15803d;
  --brand-700:    #166534;
  --brand-soft:   #dcfce7;
  --brand-glow:   rgba(22, 163, 74, .18);

  --ink:          #0f172a;
  --ink-2:        #334155;
  --ink-3:        #64748b;
  --ink-4:        #94a3b8;

  --bg:           #f1f5f9;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --line:         #e2e8f0;
  --line-2:       #cbd5e1;

  --sidebar:      #0b1220;
  --sidebar-2:    #131f36;
  --sidebar-ink:  #cbd5e1;

  --ok:           #16a34a;
  --warn:         #d97706;
  --danger:       #dc2626;
  --info:         #0284c7;
  --purple:       #7c3aed;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --sh-1: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --sh-2: 0 4px 12px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --sh-3: 0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);

  --sidebar-w: 252px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e2e8f0; --ink-2: #cbd5e1; --ink-3: #94a3b8; --ink-4: #64748b;
    --bg: #0b1220; --surface: #131c2e; --surface-2: #1a2438;
    --line: #24304a; --line-2: #33415c;
    --brand-soft: #052e16;
    --sh-1: 0 1px 2px rgba(0,0,0,.3);
    --sh-2: 0 4px 12px rgba(0,0,0,.35);
    --sh-3: 0 12px 32px rgba(0,0,0,.45);
  }
}

/* ── Temel ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, video { max-width: 100%; }
h1,h2,h3,h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--brand-glow); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ── Düzen ────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a3852; border-radius: 3px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff; font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  background: linear-gradient(135deg, var(--brand), #059669);
  display: grid; place-items: center; box-shadow: 0 3px 10px rgba(22,163,74,.35);
}
.brand .logo svg { width: 18px; height: 18px; }

.nav { padding: 12px 10px; flex: 1; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: #55647f; padding: 14px 12px 6px; font-weight: 700;
}
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; color: var(--sidebar-ink);
  font-size: 14px; font-weight: 500; margin-bottom: 1px;
  transition: background .13s, color .13s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 2px 10px rgba(22,163,74,.32); }
.nav a svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav a.active svg { opacity: 1; }
.nav .badge-nav {
  margin-left: auto; background: rgba(255,255,255,.14); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.nav a.active .badge-nav { background: rgba(0,0,0,.22); }

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.userbox {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 10px; background: rgba(255,255,255,.05); color: #fff;
}
.userbox:hover { background: rgba(255,255,255,.09); text-decoration: none; }
.userbox .av {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #0891b2);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
}
.userbox .meta { min-width: 0; }
.userbox .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .r { font-size: 11px; color: #7d8ba5; }

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

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 0 26px; height: 60px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { margin: 0; font-size: 17px; font-weight: 700; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink-2); }

.content { padding: 26px; max-width: 1520px; width: 100%; }

/* ── Kartlar ──────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
/* Üst üste dizilen kartlar arasında boşluk. Izgara/esnek kapsayıcı içinde
   boşluğu zaten `gap` verir; oradaki bu kenar boşluğu ikinci kartı aşağı
   kaydırıp sütunları hizasız bırakırdı. */
.card + .card { margin-top: 18px; }
.grid > .card + .card,
.grid .card + .card,
.flex > .card + .card { margin-top: 0; }
.card-h {
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-h h2, .card-h h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-h .spacer { flex: 1; }
.card-b { padding: 20px; }
.card-b.tight { padding: 0; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }

/* ── İstatistik kutuları ──────────────────────────────────── */
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 17px 19px; box-shadow: var(--sh-1);
  position: relative; overflow: hidden;
}
.stat .lbl { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; }
.stat .lbl svg { width: 15px; height: 15px; opacity: .7; }
.stat .val { font-size: 27px; font-weight: 750; letter-spacing: -.025em; margin-top: 6px; line-height: 1.1; }
.stat .sub { font-size: 12px; color: var(--ink-4); margin-top: 5px; }
.stat .trend { font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.trend.up { color: var(--ok); } .trend.down { color: var(--danger); } .trend.flat { color: var(--ink-4); }

/* ── Rozet & etiketler ────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 20px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap; line-height: 1.5;
}
.badge.ok      { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.badge.warn    { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.badge.danger  { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }
.badge.info    { background: #dbeafe; color: #1e3a8a; border-color: #bfdbfe; }
.badge.purple  { background: #ede9fe; color: #4c1d95; border-color: #ddd6fe; }
.badge.muted   { background: var(--surface-2); color: var(--ink-3); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.ok     { background: #052e16; color: #86efac; border-color: #14532d; }
  :root:not([data-theme="light"]) .badge.warn   { background: #422006; color: #fcd34d; border-color: #78350f; }
  :root:not([data-theme="light"]) .badge.danger { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
  :root:not([data-theme="light"]) .badge.info   { background: #082f49; color: #7dd3fc; border-color: #0c4a6e; }
  :root:not([data-theme="light"]) .badge.purple { background: #2e1065; color: #c4b5fd; border-color: #4c1d95; }
}

/* ── Butonlar ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .14s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 3px var(--brand-glow); }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.lg { padding: 12px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* ── Formlar ──────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label.lbl { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=search], input[type=date], input[type=datetime-local],
input[type=time], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-2);
  border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
}
input[type=color] { width: 46px; height: 38px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--brand); }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--brand); flex: 0 0 17px; cursor: pointer; }
.check .t { font-size: 14px; }
.check .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }

/* ── Parola alanı: göster/gizle düğmesi alanın içinde hizalanır ── */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 7px; cursor: pointer;
  color: var(--ink-3); line-height: 0; transition: background .13s, color .13s;
}
.pw-toggle:hover { background: var(--surface-2); color: var(--ink); }
.pw-toggle:active { background: var(--line); }
.pw-toggle svg { width: 18px; height: 18px; display: block; flex: 0 0 18px; }

.pw-meter { margin-top: 8px; }
.pw-meter .bars { display: flex; gap: 4px; }
.pw-meter .bars i { flex: 1; height: 4px; border-radius: 20px; background: var(--line); transition: background .2s; }
.pw-meter .txt { font-size: 12px; margin-top: 5px; color: var(--ink-3); }

.code-input {
  letter-spacing: .55em; text-align: center; font-size: 24px !important;
  font-family: var(--mono); font-weight: 650; padding: 13px !important;
}

.recovery-codes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  font-family: var(--mono); font-size: 13.5px;
}
.recovery-codes span {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 11px; text-align: center; letter-spacing: .04em;
}

.radio-cards { display: grid; gap: 9px; }
.radio-card {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; transition: .14s;
  background: var(--surface);
}
.radio-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.radio-card input { margin: 2px 0 0; accent-color: var(--brand); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio-card .t { font-weight: 650; font-size: 14px; }
.radio-card .d { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

.inline-form { display: flex; gap: 9px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1; min-width: 180px; }

/* ── Tablolar ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); font-weight: 700; padding: 11px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .t-main { font-weight: 600; }
table.tbl .t-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }


/* Adlar kısaltılmaz (… yok): satır kaydırılarak tamamı gösterilir.
   max-width yalnızca sütunun aşırı genişlemesini engeller; metin alt
   satıra sarar, hiçbir karakter gizlenmez. */
/* Uzun metinleri kısaltmadan sarmalar (başlık, dosya adı, hata mesajı). */
.c-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}
table.tbl .c-wrap {
  display: block;
  max-width: 460px;
}
@media (max-width: 1400px) { table.tbl .c-wrap { max-width: 340px; } }
@media (max-width: 1100px) { table.tbl .c-wrap { max-width: 250px; } }
@media (max-width: 760px)  { table.tbl .c-wrap { max-width: 190px; } }

/* ── Uyarı kutuları ───────────────────────────────────────── */
.alert {
  display: flex; gap: 11px; padding: 13px 16px; border-radius: var(--r);
  font-size: 14px; margin-bottom: 16px; border: 1px solid; line-height: 1.55;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert.error   { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert.warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert.info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert.success { background: #052e16; border-color: #14532d; color: #86efac; }
  :root:not([data-theme="light"]) .alert.error   { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }
  :root:not([data-theme="light"]) .alert.warning { background: #422006; border-color: #78350f; color: #fcd34d; }
  :root:not([data-theme="light"]) .alert.info    { background: #082f49; border-color: #0c4a6e; color: #7dd3fc; }
}

/* ── İlerleme çubukları ───────────────────────────────────── */
.bar { height: 7px; background: var(--line); border-radius: 20px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 20px; transition: width .4s ease; }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }
.bar.lg { height: 10px; }

.quota { display: flex; flex-direction: column; gap: 5px; }
.quota .row { display: flex; justify-content: space-between; font-size: 12.5px; }
.quota .row .k { color: var(--ink-3); font-weight: 600; }
.quota .row .v { font-variant-numeric: tabular-nums; }

/* ── Video kartları ───────────────────────────────────────── */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }
.vcard {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-1); transition: .16s; display: flex; flex-direction: column;
}
.vcard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line-2); }
.vthumb {
  position: relative; aspect-ratio: 16/9; background: #0f172a; display: block; overflow: hidden;
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .dur {
  position: absolute; right: 7px; bottom: 7px; background: rgba(0,0,0,.82); color: #fff;
  font-size: 11.5px; font-weight: 650; padding: 2px 6px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.vthumb .st { position: absolute; right: 7px; top: 7px; }

/* ── Toplu seçim ──────────────────────────────────────────── */
.vsel {
  position: absolute; left: 7px; top: 7px; z-index: 4;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .28);
  opacity: 0; transition: opacity .14s, background .14s;
}
.vcard:hover .vsel,
.vsel:focus-within { opacity: 1; }
.vsel input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.vsel:has(input:checked) { opacity: 1; background: var(--brand); border-color: var(--brand); }
.vcard:has(.vsel input:checked) {
  border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-glow), var(--sh-2);
}
/* Seçim varken tüm kutular görünsün */
.vgrid:has(.vsel input:checked) .vsel { opacity: 1; }

.bulkbar {
  position: sticky; bottom: 16px; z-index: 40; margin-top: 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--brand);
  box-shadow: var(--sh-3);
}
.bulkbar[hidden] { display: none; }
.bulkbar svg { color: var(--brand); }
@media (max-width: 700px) {
  .bulkbar { gap: 10px; padding: 12px; }
  .bulkbar select { min-width: 0 !important; flex: 1; }
}
.vthumb .play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .16s;
  background: linear-gradient(transparent, rgba(0,0,0,.35));
}
.vcard:hover .vthumb .play { opacity: 1; }
.vthumb .play span {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.94);
  display: grid; place-items: center; box-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.vbody { padding: 13px 15px; flex: 1; display: flex; flex-direction: column; }
.vbody .t {
  font-weight: 650; font-size: 12.5px; line-height: 1.42; margin-bottom: 5px; color: var(--ink);
  overflow-wrap: anywhere; word-break: break-word;
}
.vbody .t:hover { color: var(--brand-600); }
.vmeta { font-size: 12px; color: var(--ink-3); display: flex; gap: 11px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.vmeta span { display: inline-flex; align-items: center; gap: 4px; }
.vmeta svg { width: 13px; height: 13px; opacity: .75; }

.vprog { padding: 0 15px 13px; }
.vprog .lbl { font-size: 11.5px; color: var(--ink-3); display: flex; justify-content: space-between; margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════════
   Videolar: kart / liste / tablo görünümü
   Üç görünüm de TEK işaretleme üzerinden CSS ile kurulur;
   böylece seçim kutuları çiftlenmez ve geçiş anında olur.
   ══════════════════════════════════════════════════════════ */

.vswitch {
  display: inline-flex; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.vswitch button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3);
  background: none; border: 0; border-right: 1px solid var(--line); cursor: pointer;
  transition: background .14s, color .14s;
}
.vswitch button:last-child { border-right: 0; }
.vswitch button:hover { background: var(--surface-2); color: var(--ink); }
.vswitch button.on { background: var(--brand); color: #fff; }
.vswitch svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .vswitch button span { display: none; } }

/* Sütun başlığı satırı yalnızca tablo görünümünde vardır; kart ve liste
   görünümünde boş bir ızgara hücresi bırakmaması için gizlenir. */
.vhead { display: none; }

/* Durum hücresi yalnızca tabloda gerekli (kartta kapak üstünde zaten var) */
.vmeta > .vst { display: none; }
/* Boş alanlar kart/liste görünümünde gizlenir; tabloda sütun hizası
   bozulmasın diye "—" olarak yerinde kalır. */
.vgrid:not(.v-tablo) .vfld.bos,
.vgrid:not(.v-tablo) .vkul.bos { display: none; }

/* ── Liste görünümü ──────────────────────────────────────── */
.vgrid.v-liste { grid-template-columns: 1fr; gap: 10px; }
.vgrid.v-liste .vcard {
  display: grid; grid-template-columns: 190px 1fr; align-items: stretch;
}
.vgrid.v-liste .vcard:hover { transform: none; }
.vgrid.v-liste .vthumb { border-radius: 0; }
.vgrid.v-liste .vbody { padding: 11px 16px; }
.vgrid.v-liste .vmeta { margin-top: 6px; }
.vgrid.v-liste .vbody .t { font-size: 13.5px; }
.vgrid.v-liste .vprog { grid-column: 1 / -1; padding: 0 16px 12px; }
@media (max-width: 620px) {
  .vgrid.v-liste .vcard { grid-template-columns: 128px 1fr; }
}

/* ── Tablo görünümü ──────────────────────────────────────── */
/* Kart ve gövde kutuları kaldırılır (display:contents), böylece
   içerideki hücreler doğrudan ızgaranın sütunlarına oturur. */
.vwrap:has(.v-tablo) { overflow-x: auto; }

.vgrid.v-tablo {
  gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface); min-width: 760px;
  /* Sütun genişlikleri görünüm tarafından --vt ile verilir (sütun sayısı
     orada tek yerde tanımlı). Değişken gelmezse makul bir yedeğe düşer. */
  grid-template-columns: var(--vt, 74px minmax(190px, 2fr) repeat(8, max-content));
}

.vgrid.v-tablo .vcard,
.vgrid.v-tablo .vbody,
.vgrid.v-tablo .vmeta,
.vgrid.v-tablo .vhead { display: contents; }

/* Hücreler */
.vgrid.v-tablo .vhead > span,
.vgrid.v-tablo .vsel,
.vgrid.v-tablo .vthumb,
.vgrid.v-tablo .vbody > .t,
.vgrid.v-tablo .vmeta > span {
  display: flex; align-items: center; gap: 5px; min-height: 50px;
  padding: 7px 11px; margin: 0; background: var(--surface);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.vgrid.v-tablo .vhead > span {
  min-height: 38px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2);
  position: sticky; top: 0; z-index: 2;
}
.vgrid.v-tablo .vmeta > .vst { display: flex; }

/* Sıralama başlıkları */
.vgrid.v-tablo .vhead > span { padding: 0; }
.vgrid.v-tablo .vhead a {
  display: flex; align-items: center; gap: 5px; width: 100%; height: 100%;
  padding: 0 11px; color: inherit; font: inherit; white-space: nowrap;
  text-transform: inherit; letter-spacing: inherit;
}
.vgrid.v-tablo .vhead a:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.vgrid.v-tablo .vhead .yon { font-style: normal; font-size: 11px; opacity: .35; }
.vgrid.v-tablo .vhead > span.on { color: var(--brand-600); background: var(--surface); }
.vgrid.v-tablo .vhead > span.on .yon { opacity: 1; }
.vgrid.v-tablo .vmeta > span { font-size: 12px; color: var(--ink-3); }
.vgrid.v-tablo .vbody > .t {
  font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4;
}

/* Kapak: küçük önizleme, üstündeki rozetler gizlenir */
.vgrid.v-tablo .vthumb { aspect-ratio: auto; }
.vgrid.v-tablo .vthumb img { width: 52px; height: 30px; border-radius: 4px; background: #0f172a; }
.vgrid.v-tablo .vthumb .dur,
.vgrid.v-tablo .vthumb .st,
.vgrid.v-tablo .vthumb .play { display: none; }

/* Seçim kutusu akışa geri döner */
.vgrid.v-tablo .vsel {
  position: static; opacity: 1; width: auto; height: auto; border-radius: 0;
  background: var(--surface); border: 0; border-bottom: 1px solid var(--line);
  backdrop-filter: none; justify-content: center;
}
.vgrid.v-tablo .vsel:has(input:checked) { background: var(--surface); }

/* Satır vurgusu: kart kutusu olmadığı için hücrelere tek tek verilir */
.vgrid.v-tablo .vcard:hover > .vsel,
.vgrid.v-tablo .vcard:hover > .vthumb,
.vgrid.v-tablo .vcard:hover .vbody > .t,
.vgrid.v-tablo .vcard:hover .vmeta > span { background: var(--surface-2); }

.vgrid.v-tablo .vcard:has(.vsel input:checked) > .vsel,
.vgrid.v-tablo .vcard:has(.vsel input:checked) > .vthumb,
.vgrid.v-tablo .vcard:has(.vsel input:checked) .vbody > .t,
.vgrid.v-tablo .vcard:has(.vsel input:checked) .vmeta > span { background: var(--brand-glow); }

/* İlerleme / hata satırı tüm genişliği kaplar */
.vgrid.v-tablo .vprog {
  grid-column: 1 / -1; padding: 8px 12px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* ── Site kullanımı (yerleşim kayıtları) ──────────────────── */
.yerlesim-liste { display: flex; flex-direction: column; gap: 12px; }
.yerlesim {
  border: 1px solid var(--line); border-left: 3px solid var(--ink-4);
  border-radius: var(--r); padding: 14px 16px; background: var(--surface-2);
}
.yerlesim.ekli { border-left-color: var(--ok); }
.yerlesim .form-grid { margin: 0; }
.yerlesim .field { margin-bottom: 11px; }
.yerlesim .field.mb0 { margin-bottom: 0; }
.yerlesim .lbl { font-size: 12px; }

/* ── Boş durum ────────────────────────────────────────────── */
.empty { text-align: center; padding: 54px 24px; color: var(--ink-3); }
.empty .ico {
  width: 60px; height: 60px; border-radius: 18px; background: var(--surface-2);
  display: grid; place-items: center; margin: 0 auto 16px; color: var(--ink-4);
  border: 1px solid var(--line);
}
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 18px; font-size: 14px; }

/* ── Sekmeler ─────────────────────────────────────────────── */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
  padding: 10px 15px; font-size: 14px; font-weight: 600; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--brand-600); border-bottom-color: var(--brand); }

/* ── Filtre çubuğu ────────────────────────────────────────── */
.filters {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
}
.filters input, .filters select { width: auto; min-width: 140px; }
.filters .search { min-width: 240px; flex: 1; max-width: 380px; }
/* Girdi, açılır menü ve düğmeler aynı yükseklikte hizalansın */
.filters input, .filters select, .filters .btn, .filters .vswitch { height: 42px; }
.filters .btn { padding-top: 0; padding-bottom: 0; }
.filters .vswitch { margin-left: auto; }
.filters .vswitch button { height: 100%; padding-top: 0; padding-bottom: 0; }
@media (max-width: 780px) { .filters .vswitch { margin-left: 0; } }

/* ── Sayfalama ────────────────────────────────────────────── */
.pager { display: flex; gap: 5px; justify-content: center; margin-top: 22px; flex-wrap: wrap; align-items: center; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 11px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.pager a:hover { background: var(--surface-2); text-decoration: none; border-color: var(--line-2); }
.pager .cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .gap { border: 0; background: none; }

/* ── Kod kutusu ───────────────────────────────────────────── */
.codebox { position: relative; }
.codebox pre {
  background: #0b1220; color: #cbd5e1; padding: 14px 46px 14px 16px; border-radius: var(--r);
  overflow-x: auto; font-size: 12.5px; line-height: 1.65; margin: 0; border: 1px solid #1e293b;
  white-space: pre-wrap; word-break: break-all;
}
.codebox .copy {
  position: absolute; right: 8px; top: 8px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16); color: #e2e8f0; border-radius: 7px;
  padding: 5px 9px; font-size: 11.5px; cursor: pointer; font-weight: 600; font-family: var(--font);
}
.codebox .copy:hover { background: rgba(255,255,255,.18); }
.codebox .copy.done { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Grafik ───────────────────────────────────────────────── */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

.hmap { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hmap i { aspect-ratio: 1; border-radius: 3px; background: var(--line); display: block; }
.hmap-lbl { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 9.5px; color: var(--ink-4); margin-top: 4px; text-align: center; }

.brk { display: flex; flex-direction: column; gap: 11px; }
.brk .item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.brk .item .n { font-weight: 600; display: flex; align-items: center; gap: 7px; min-width: 0; }
.brk .item .n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brk .item .v { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12.5px; }
.brk .item .b { grid-column: 1 / -1; height: 5px; background: var(--line); border-radius: 20px; overflow: hidden; }
.brk .item .b i { display: block; height: 100%; background: var(--brand); border-radius: 20px; }

/* ── Kalıcı öğeler ────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--line-2); border-radius: var(--r-xl); padding: 46px 24px;
  text-align: center; transition: .16s; background: var(--surface-2); cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .ico { width: 62px; height: 62px; margin: 0 auto 16px; color: var(--brand); }
.dropzone h3 { font-size: 17px; margin-bottom: 6px; }
.dropzone p { color: var(--ink-3); font-size: 13.5px; margin-bottom: 16px; }

.uplist { display: flex; flex-direction: column; gap: 12px; }
.upitem { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--surface); }
.upitem .top { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.upitem .nm { font-weight: 650; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upitem .pc { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650; color: var(--brand-600); }
.upitem .info { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 7px; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3);
  max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal.wide { max-width: 780px; }

details.acc { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; background: var(--surface); }
details.acc > summary {
  padding: 12px 16px; cursor: pointer; font-weight: 650; font-size: 14px;
  list-style: none; display: flex; align-items: center; gap: 9px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: '⌄'; margin-left: auto; color: var(--ink-3); font-size: 17px; line-height: 1; }
details.acc[open] > summary { border-bottom: 1px solid var(--line); }
details.acc .body { padding: 16px; }

/* ── Yardımcılar ──────────────────────────────────────────── */
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny  { font-size: 11.5px; }
.b { font-weight: 650; }
.tnum { font-variant-numeric: tabular-nums; }
.right { text-align: right; } .center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt0{margin-top:0} .mt1{margin-top:8px} .mt2{margin-top:16px} .mt3{margin-top:24px}
.mb0{margin-bottom:0} .mb1{margin-bottom:8px} .mb2{margin-bottom:16px} .mb3{margin-bottom:24px}
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ratio16 { aspect-ratio: 16/9; }

/* ── Duyarlı ──────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .22s; box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px 15px; }
  .topbar { padding: 0 15px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 55; }
}
@media (max-width: 560px) {
  .vgrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vbody { padding: 10px 11px; }
  h1 { font-size: 20px; }
  .stat .val { font-size: 23px; }
}

@media print {
  .sidebar, .topbar, .btn, .filters, .pager { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
}
