/* ============================================================
   Xtream Bot — açık tema tasarım sistemi
   ============================================================ */
:root {
  --bg: #f5f6fa;
  --bg2: #ffffff;
  --bg3: #f0f2f7;
  --line: #e4e7ef;
  --line2: #d5dae5;
  --text: #0f172a;
  --text2: #334155;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent2: #4338ca;
  --accent-soft: #eef2ff;
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --amber: #d97706;
  --amber-soft: #fff7e6;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
code { background: var(--bg3); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
::selection { background: #c7d2fe; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--red); min-height: 1em; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 14px; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: 11px; margin: 0 0 8px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 16px; padding: 0 8px 24px; letter-spacing: -.02em; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0; }
.brand.big { font-size: 22px; justify-content: center; padding-bottom: 4px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #8b5cf6 60%, #ec4899); display: grid; place-items: center; font-weight: 800; color: #fff; box-shadow: 0 4px 12px rgba(99, 102, 241, .35); flex: none; }
.nav-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 0 12px 8px; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text2); font-weight: 500; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
nav a svg { color: var(--muted); transition: color .2s, transform .25s var(--ease); }
nav a:hover { background: var(--bg3); color: var(--text); }
nav a:hover svg { transform: scale(1.08); color: var(--text); }
nav a.active { background: var(--accent-soft); color: var(--accent); }
nav a.active svg { color: var(--accent); }
nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 10px; animation: pop .35s var(--ease); }
.count:empty { display: none; }
.sidebar-foot { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.mobile-top { display: none; }
main { overflow: auto; position: relative; scroll-behavior: smooth; }
.view { padding: 28px 32px 60px; max-width: 1500px; margin: 0 auto; }
.view.enter > * { animation: fadeUp .45s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; }
.view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; }
.view.enter > *:nth-child(n+5) { animation-delay: .16s; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.page-head p { margin: 2px 0 0; }

/* ---------- Buttons & inputs ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text2); padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-weight: 550; white-space: nowrap; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn svg.ic { width: 16px; height: 16px; }
.btn:hover { border-color: #c3c9d8; background: #fafbfd; transform: translateY(-1px); box-shadow: var(--shadow); color: var(--text); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: var(--shadow-sm); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.btn.primary { background: linear-gradient(180deg, #5b53ee, var(--accent)); border-color: var(--accent2); color: #fff; box-shadow: 0 1px 2px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.primary:hover { background: linear-gradient(180deg, #554ceb, var(--accent2)); box-shadow: 0 6px 18px rgba(79, 70, 229, .35); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--bg3); box-shadow: none; }
.btn.small { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .18; animation: ripple .55s var(--ease); pointer-events: none; }
input, select, textarea { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); padding: 9px 12px; border-radius: var(--radius-sm); font: inherit; width: 100%; transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover { border-color: #c3c9d8; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
input::placeholder { color: #a0a9ba; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
input[type=search] { padding-left: 34px; background: var(--bg2) 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='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text2); font-weight: 550; }
label.check { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 3px 4px; border-radius: 6px; transition: background .15s; }
label.check:hover { background: var(--bg3); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Switch (checkbox.switch) */
input.switch { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: #cbd2df; position: relative; transition: background .25s var(--ease); flex: none; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(16px); }

/* ---------- Cards ---------- */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease); }
.card:hover { box-shadow: var(--shadow); }
.card.warn { border-color: #fcd9a6; background: linear-gradient(0deg, var(--amber-soft), var(--amber-soft)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line2); }
.stat .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); color: var(--muted); margin-bottom: 14px; transition: transform .3s var(--ease); }
.stat:hover .ico { transform: scale(1.1) rotate(-4deg); }
.stat .n { font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat .arrow { position: absolute; right: 16px; top: 18px; color: var(--line2); transition: transform .25s var(--ease), color .25s; }
.stat:hover .arrow { transform: translateX(3px); color: var(--muted); }
.stat.accent .ico { background: var(--accent-soft); color: var(--accent); }
.stat.green .ico { background: var(--green-soft); color: var(--green); }
.stat.amber .ico { background: var(--amber-soft); color: var(--amber); }
.stat.pink .ico { background: #fdf2f8; color: #db2777; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; background: var(--bg3); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 7px 14px; cursor: pointer; color: var(--muted); border-radius: 9px; white-space: nowrap; font-weight: 550; font-size: 13px; transition: background .2s var(--ease), color .2s, box-shadow .2s; user-select: none; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .6); }
.tab.active { color: var(--text); background: var(--bg2); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.tab b { font-weight: 600; font-size: 11px; background: var(--line); color: var(--text2); padding: 1px 7px; border-radius: 8px; margin-left: 6px; transition: background .2s; }
.tab.active b { background: var(--accent-soft); color: var(--accent); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; position: sticky; top: 0; background: rgba(245, 246, 250, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 0; z-index: 5; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.selinfo { color: var(--accent); font-size: 13px; font-weight: 600; }
.selinfo:not(:empty) { animation: pop .3s var(--ease); }

/* ---------- Poster grid ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.poster { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.poster:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.poster.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.poster .img { aspect-ratio: 2/3; cursor: pointer; position: relative; overflow: hidden; background: linear-gradient(135deg, #eef0f6, #e2e6ef); }
.poster .img .bg { position: absolute; inset: 0; background: center/cover no-repeat; transition: transform .6s var(--ease); }
.poster:hover .img .bg { transform: scale(1.06); }
.poster .img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.35) 100%); opacity: .7; transition: opacity .3s; pointer-events: none; }
.poster:hover .img::after { opacity: 1; }
.poster .img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; padding: 10px; text-align: center; }
.poster .chk { position: absolute; z-index: 2; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.9); border: 1.5px solid rgba(15,23,42,.15); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; transition: transform .25s var(--ease), background .2s, opacity .2s; opacity: .85; }
.poster:hover .chk { opacity: 1; transform: scale(1.08); }
.poster.sel .chk { background: var(--accent); border-color: var(--accent); opacity: 1; animation: pop .3s var(--ease); }
.poster .rate { position: absolute; z-index: 2; top: 10px; right: 10px; background: rgba(255,255,255,.92); color: var(--text); padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 650; box-shadow: var(--shadow-sm); }
.poster .rate::first-letter { color: #f59e0b; }
.poster .neweps { position: absolute; z-index: 2; bottom: 10px; left: 10px; right: 10px; background: var(--green); color: #fff; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 650; text-align: center; cursor: pointer; box-shadow: 0 4px 12px rgba(22,163,74,.4); transition: transform .2s var(--ease), background .2s; }
.poster .neweps:hover { transform: translateY(-2px); background: #15803d; }
.poster .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.poster .title { font-weight: 650; font-size: 13.5px; line-height: 1.3; color: var(--text); }
.poster .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 550; padding: 2px 8px; border-radius: 20px; background: var(--bg3); color: var(--text2); border: 1px solid var(--line); }
.badge.ok { color: #15803d; border-color: #bbf7d0; background: var(--green-soft); }
.badge.no { color: #b91c1c; border-color: #fecaca; background: var(--red-soft); }
.badge.wait { color: #b45309; border-color: #fde3b5; background: var(--amber-soft); }
.badge.info { color: var(--accent); border-color: #c7d2fe; background: var(--accent-soft); }
.badge.ok::before, .badge.no::before, .badge.wait::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.wait::before { animation: pulse 1.6s infinite; }
.poster .actions { margin-top: auto; padding-top: 4px; display: flex; gap: 6px; }
.poster .actions .btn { flex: 1; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); grid-column: 1/-1; animation: fadeUp .4s var(--ease); }
.empty .ill { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ill svg { width: 30px; height: 30px; }
.empty strong { color: var(--text); display: block; font-size: 15px; margin-bottom: 4px; }
.more { text-align: center; margin-top: 24px; }

/* Skeleton */
.skel { border-radius: var(--radius); background: linear-gradient(90deg, #eceff5 25%, #f6f7fb 50%, #eceff5 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.poster-skel { aspect-ratio: 2/3.25; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; background: var(--bg3); }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tr { transition: background .15s; }
tbody tr:hover, table tr:not(:first-child):hover { background: #fafbfe; }
td.num input { width: 76px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; word-break: break-all; }
.lvl { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 10px; background: var(--bg3); color: var(--text2); }
.lvl-error { background: var(--red-soft); color: var(--red); }
.lvl-warn { background: var(--amber-soft); color: var(--amber); }
.lvl-info { background: var(--accent-soft); color: var(--accent); }
.kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.kind.series::before { background: #db2777; }
.kind.episodes::before { background: var(--green); }

/* ---------- Job bar ---------- */
.jobbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 32px; display: flex; align-items: center; gap: 14px; animation: slideDown .35s var(--ease); }
.jobinfo { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; }
.jobinfo strong { font-weight: 650; }
.jobinfo .muted { overflow: hidden; text-overflow: ellipsis; }
.progress { width: 240px; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; width: 0; border-radius: 3px; transition: width .4s var(--ease); background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
.spinner { width: 15px; height: 15px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fadeIn .2s ease; }
.modal-card { background: var(--bg2); border-radius: 18px; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 26px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); animation: modalIn .3s var(--ease); }
.modal-card .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.checklist { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; }
.search-results { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sr { display: flex; gap: 12px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); animation: fadeUp .35s var(--ease) both; }
.sr:hover { border-color: var(--line2); box-shadow: var(--shadow); transform: translateX(2px); }
.sr img { width: 46px; height: 69px; object-fit: cover; border-radius: 7px; background: var(--bg3); }
.sr .t { flex: 1; min-width: 0; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; }
.ep { background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font-size: 12px; display: flex; gap: 6px; align-items: center; cursor: pointer; transition: border-color .2s, background .2s; }
.ep:hover { border-color: var(--accent); background: var(--accent-soft); }


/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; max-width: 400px; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--ease); font-weight: 500; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.toast.err::before { background: var(--red); }
.toast.ok::before { background: var(--green); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   Mobil: üst başlık + alt menü çubuğu
   ============================================================ */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; height: 100vh; height: 100dvh; }
  .mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 25; padding: 10px 16px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); font-weight: 700; }
  .mobile-top .logo { width: 30px; height: 30px; font-size: 14px; }
  .mobile-top .spacer { flex: 1; }
  .sidebar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -4px 20px rgba(15,23,42,.06); }
  .sidebar .brand, .sidebar .nav-label, .sidebar-foot { display: none; }
  nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  nav a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 10.5px; font-weight: 600; border-radius: 12px; text-align: center; }
  nav a svg { width: 21px; height: 21px; transition: transform .3s var(--ease); }
  nav a.active { background: transparent; }
  nav a.active svg { transform: translateY(-2px) scale(1.1); }
  nav a.active::before { left: 50%; top: -6px; bottom: auto; width: 22px; height: 3px; border-radius: 0 0 3px 3px; transform: translateX(-50%); animation: pop .3s var(--ease); }
  nav a:hover { background: transparent; }
  nav a:active { transform: scale(.92); }
  .count { position: absolute; top: 1px; left: 50%; margin-left: 6px; font-size: 10px; min-width: 17px; padding: 0 5px; line-height: 16px; border: 2px solid #fff; }
  main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .view { padding: 18px 16px 30px; }
  h1 { font-size: 21px; }
  .page-head { gap: 8px; }
  .page-head .spacer { flex-basis: 100%; height: 0; }
  .page-head > .btn { flex: 1; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .ico { width: 32px; height: 32px; margin-bottom: 10px; }
  .stat .n { font-size: 24px; }
  .stat .arrow { display: none; }
  .card { padding: 16px; border-radius: 12px; }
  .tabs { width: 100%; }
  .toolbar { top: 0; margin: 0 -16px 14px; padding: 10px 16px; }
  .toolbar input[type=search] { max-width: none; flex: 1 1 100%; }
  .toolbar > div[style*="flex:1"] { display: none; }
  .toolbar #importBtn { flex: 1; }
  .posters { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .poster .body { padding: 10px; }
  .poster .actions { flex-direction: column; }
  .jobbar { padding: 8px 16px; flex-wrap: wrap; gap: 8px; top: 51px; }
  .progress { display: block; width: 100%; order: 3; }
  .grid2[style] { grid-template-columns: 1fr !important; }
  /* Modal → alt sayfa (bottom sheet) */
  .modal { place-items: end center; padding: 0; }
  .modal-card { width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheetIn .35s var(--ease); }
  .modal-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line2); margin: -8px auto 14px; }
  .modal-card .foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: var(--bg2); margin: 18px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .modal-card .foot .btn { flex: 1; }
  .toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  th, td { padding: 9px 8px; }
}

/* ---------- Kategori kuralları ---------- */
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rules li { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; transition: opacity .2s, border-color .2s, transform .2s var(--ease); }
.rules li:hover { border-color: var(--line2); }
.rules li.off { opacity: .55; }
.rules li .rl { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rules li .btn { padding: 3px 8px; font-size: 10px; }
.rules li:first-child [data-mv="-1"], .rules li:last-child [data-mv="1"] { visibility: hidden; }
textarea { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); padding: 9px 12px; border-radius: var(--radius-sm); font: inherit; font-size: 13px; width: 100%; resize: vertical; transition: border-color .2s, box-shadow .2s; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
details.card > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::before { content: "▸"; color: var(--muted); transition: transform .2s var(--ease); }
details.card[open] > summary::before { transform: rotate(90deg); }

/* Kararlılık puanı */
.score { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.score .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; }
.score .bar i { display: block; height: 100%; border-radius: 3px; transition: width .6s var(--ease); }
.score b { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }

/* Kategori önizleme */
.catgroups { display: flex; flex-wrap: wrap; gap: 6px; }
.catg { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 11px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; animation: fadeUp .3s var(--ease) both; }
.catg span { background: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 650; font-size: 11.5px; }
.badge.lang { color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; }
