/* ============ CMS-YouTube — koyu tema tasarım sistemi ============ */
:root {
  --bg: #0a0e17;
  --bg-2: #0e1420;
  --card: rgba(255, 255, 255, .03);
  --card-solid: #111827;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);
  --text: #e8ecf4;
  --muted: #8b93a7;
  --dim: #565e72;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --info: #38bdf8;
  --radius: 14px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  min-height: 100vh; font-size: 14px;
  background-image:
    radial-gradient(ellipse 70% 40% at 60% -10%, rgba(120, 80, 255, .16), transparent),
    radial-gradient(ellipse 50% 35% at 100% 110%, rgba(255, 60, 120, .07), transparent);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- yerleşim ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; padding: 22px 14px;
  border-right: 1px solid var(--border);
  background: rgba(10, 14, 23, .7); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 4px 12px 20px; }
.brand .t1 { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); }
.brand .t2 {
  font-size: 20px; font-weight: 700;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fb7185);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 500; transition: all .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.nav-item.active { background: rgba(167, 139, 250, .12); color: var(--accent); }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.nav-sep { margin: 14px 12px 6px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.sidebar .spacer { flex: 1; }
.userchip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-top: 1px solid var(--border); margin-top: 8px;
}
.userchip .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #0a0e17;
}
.userchip .name { font-weight: 600; font-size: 13px; }
.userchip .role { font-size: 11px; color: var(--dim); }

.main { flex: 1; padding: 28px 34px; min-width: 0; }
.pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { font-size: 24px; font-weight: 700; }
.pagehead .sub { color: var(--muted); margin-top: 3px; font-size: 13px; }

/* ---- kartlar ---- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(6px);
}
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat .label { font-size: 12px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.stat .value { font-size: 30px; font-weight: 700; margin-top: 6px; }
.stat .hint { font-size: 12px; color: var(--dim); margin-top: 4px; }

/* ---- tablo ---- */
.tablewrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 12px 16px; white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); border-bottom: 1px solid var(--border); }
td { border-bottom: 1px solid rgba(255, 255, 255, .04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, .02); }

/* ---- rozetler ---- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok    { background: rgba(52, 211, 153, .12);  color: var(--ok);   border: 1px solid rgba(52, 211, 153, .28); }
.badge.err   { background: rgba(251, 113, 133, .12); color: var(--err);  border: 1px solid rgba(251, 113, 133, .28); }
.badge.warn  { background: rgba(251, 191, 36, .12);  color: var(--warn); border: 1px solid rgba(251, 191, 36, .28); }
.badge.info  { background: rgba(56, 189, 248, .12);  color: var(--info); border: 1px solid rgba(56, 189, 248, .28); }
.badge.muted { background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--border); }

/* ---- formlar ---- */
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 14px; border-radius: 10px; font-size: 14px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2);
  font-family: var(--font); outline: none; transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 14px; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.check span { font-size: 13px; color: var(--text); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border-radius: 10px; border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  font-family: var(--font); transition: all .15s; text-decoration: none !important;
}
.btn.primary { background: linear-gradient(90deg, #8b5cf6, #d946ef); color: #fff; }
.btn.primary:hover { filter: brightness(1.15); box-shadow: 0 4px 24px rgba(139, 92, 246, .35); }
.btn.ghost { background: rgba(255, 255, 255, .05); color: var(--text); border: 1px solid var(--border-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.danger { background: rgba(251, 113, 133, .12); color: var(--err); border: 1px solid rgba(251, 113, 133, .3); }
.btn.danger:hover { background: rgba(251, 113, 133, .22); }
.btn.sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }

/* ---- uyarılar ---- */
.flash { padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 13.5px; font-weight: 500; }
.flash.ok  { background: rgba(52, 211, 153, .1);  color: var(--ok);  border: 1px solid rgba(52, 211, 153, .25); }
.flash.err { background: rgba(251, 113, 133, .1); color: var(--err); border: 1px solid rgba(251, 113, 133, .25); }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px; padding: 44px 40px; border-radius: 20px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border);
  backdrop-filter: blur(12px); box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.login-card .logo { text-align: center; margin-bottom: 30px; }
.login-card .logo .t1 { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--dim); }
.login-card .logo .t2 {
  font-size: 30px; font-weight: 700;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fb7185);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---- kapak / avatar ---- */
.cover { width: 52px; height: 30px; object-fit: cover; border-radius: 6px; flex-shrink: 0;
         background: var(--bg-2); border: 1px solid var(--border); }
.cover-lg { width: 100%; max-width: 320px; aspect-ratio: 16/9; height: auto; border-radius: 10px; }
.cover-empty { display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 13px; }
.avatar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
              background: var(--bg-2); border: 1px solid var(--border); }
.avatar-empty { display: flex; align-items: center; justify-content: center;
                color: var(--dim); font-weight: 700; font-size: 14px; }

/* ---- filtre çubuğu ---- */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filterbar input, .filterbar select { width: auto; flex: 1; min-width: 130px; padding: 9px 12px; font-size: 13px; }

/* ---- yeni filtre paneli ---- */
.fbar-top { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.fbar-top input[type=text] { flex: 1; }
.fbar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fitem label { display: block; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
               color: var(--dim); margin-bottom: 5px; font-weight: 600; }
.fitem select { width: 100%; padding: 9px 10px; font-size: 13px; border-radius: 9px; }
.fitem select.active { border-color: var(--accent); background: rgba(167, 139, 250, .08); }
select.active { border-color: var(--accent); background: rgba(167, 139, 250, .08); }

/* acilir detayli filtre paneli */
.fadv { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.fadv.open { display: grid; }
#fadv-btn.on { background: rgba(167, 139, 250, .15); border-color: var(--accent); }

/* kompakt tablo */
.table-compact td { padding: 7px 12px; }
.table-compact th { padding: 9px 12px; }
.cover-sm { width: 42px; height: 24px; border-radius: 5px; }

/* ---- ilerleme çubuğu ---- */
.progress { height: 8px; background: rgba(255, 255, 255, .07); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; min-width: 0;
                background: linear-gradient(90deg, #8b5cf6, #d946ef); transition: width .4s; }

/* ---- mobil ---- */
.mobilebar { display: none; }
#scrim { display: none; }
#menu-btn {
  background: rgba(255, 255, 255, .06); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 10px; font-size: 20px; padding: 6px 13px; cursor: pointer;
}
@media (max-width: 920px) {
  .mobilebar {
    display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 80;
    padding: 10px 14px; background: rgba(10, 14, 23, .95);
    border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
  }
  .layout { display: block; }
  .sidebar {
    position: fixed; top: 0; left: -290px; width: 264px; height: 100vh; height: 100dvh;
    z-index: 100; transition: left .25s ease; background: #0d1220; overflow-y: auto;
  }
  .sidebar.open { left: 0; box-shadow: 24px 0 70px rgba(0, 0, 0, .55); }
  #scrim.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 90; }
  .main { padding: 16px 12px; }
  .pagehead { gap: 10px; margin-bottom: 16px; }
  .pagehead h1 { font-size: 20px; }
  .grid { gap: 10px; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .grid > * { grid-column: auto !important; }
  .card { padding: 14px; }
  .stat .value { font-size: 22px; }
  .fbar-top { flex-wrap: wrap; }
  .fbar-top input[type=text] { flex-basis: 100%; }
  th, td { padding: 8px 10px; }
  .row { flex-direction: column; gap: 0; }
  .login-card { padding: 34px 24px; }
  h2.section { font-size: 14px; }
}
@media (max-width: 560px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .main { padding: 12px 10px; }
}

/* ---- yardımcılar ---- */
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.mono { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 13px; }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.between { justify-content: space-between; }
h2.section { font-size: 16px; font-weight: 700; margin: 26px 0 14px; }
