/* ============ FKB Drive arayüzü ============ */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --accent-grad: linear-gradient(135deg, #7c6cff 0%, #4f8bff 55%, #22d3ee 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root[data-theme="dark"] {
  --bg: #0a0e19;
  --bg-glow-1: rgba(124, 108, 255, .13);
  --bg-glow-2: rgba(34, 211, 238, .08);
  --panel: #0f1524;
  --surface: #141b2d;
  --surface-2: #1a2238;
  --surface-3: #222c46;
  --border: rgba(148, 163, 184, .12);
  --border-strong: rgba(148, 163, 184, .22);
  --text: #e8ecf6;
  --text-2: #b9c1d4;
  --muted: #7f8aa3;
  --accent: #8b7dff;
  --accent-soft: rgba(124, 108, 255, .16);
  --hover: rgba(148, 163, 184, .07);
  --selected: rgba(124, 108, 255, .17);
  --selected-border: rgba(139, 125, 255, .45);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .14);
  --success: #34d399;
  --warn: #fbbf24;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .25);
  --overlay: rgba(5, 8, 16, .66);
  --skeleton: rgba(148, 163, 184, .08);
  --skeleton-hi: rgba(148, 163, 184, .16);
}

:root[data-theme="light"] {
  --bg: #f3f5fb;
  --bg-glow-1: rgba(124, 108, 255, .10);
  --bg-glow-2: rgba(34, 211, 238, .08);
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --surface-3: #e8ecf5;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .16);
  --text: #101828;
  --text-2: #344054;
  --muted: #6a7489;
  --accent: #6553ff;
  --accent-soft: rgba(101, 83, 255, .10);
  --hover: rgba(15, 23, 42, .04);
  --selected: rgba(101, 83, 255, .09);
  --selected-border: rgba(101, 83, 255, .38);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, .10);
  --success: #12a37a;
  --warn: #d48806;
  --shadow: 0 18px 50px rgba(16, 24, 40, .14), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .08);
  --overlay: rgba(16, 24, 40, .42);
  --skeleton: rgba(15, 23, 42, .05);
  --skeleton-hi: rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select { outline: none; }
a { color: inherit; text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
::selection { background: var(--accent-soft); }

/* kaydırma çubukları */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ Butonlar ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 11px;
  font-weight: 600; font-size: 13.5px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  transition: background .15s, border-color .15s, transform .1s, box-shadow .2s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary {
  background: var(--accent-grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 20px rgba(91, 108, 255, .35);
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(91, 108, 255, .45); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn svg.i { width: 17px; height: 17px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.active { background: var(--accent-soft); color: var(--accent); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg.i { width: 16px; height: 16px; }

/* ============ Giriş ekranı ============ */
.login {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 20px;
  overflow: auto; isolation: isolate;
}
.login::before, .login::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none;
  animation: float 18s var(--ease) infinite alternate;
}
.login::before { width: 520px; height: 520px; left: -120px; top: -140px; background: #6d5cff; }
.login::after { width: 460px; height: 460px; right: -120px; bottom: -160px; background: #14b8d4; animation-delay: -9s; }
:root[data-theme="light"] .login::before, :root[data-theme="light"] .login::after { opacity: .28; }
@keyframes float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.12); }
}
.login-card {
  width: min(400px, 100%); padding: 36px 32px 30px;
  border-radius: 22px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow);
  animation: rise .5s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.login-logo { width: 64px; height: 64px; display: block; margin: 0 auto 18px; filter: drop-shadow(0 10px 24px rgba(91, 108, 255, .45)); }
.login h1 { font-family: var(--font-display); font-size: 24px; text-align: center; margin: 0 0 4px; letter-spacing: -.01em; }
.login p.sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg.i { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.input {
  width: 100%; height: 44px; border-radius: 12px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-wrap > svg.i + .input { padding-left: 40px; }
.input:focus { border-color: var(--selected-border); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input-wrap .eye { position: absolute; right: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); user-select: none; }
.login .row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; }
.login .btn.primary { width: 100%; height: 46px; font-size: 15px; border-radius: 13px; }
.login .error {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; margin-bottom: 14px;
  background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 500;
}
.login .foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.login .foot svg.i { width: 14px; height: 14px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* özel onay kutusu */
.cb {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 18px; height: 18px; border-radius: 6px; flex: none; cursor: pointer;
  border: 1.6px solid var(--border-strong); background: transparent; display: inline-grid; place-items: center;
  transition: background .12s, border-color .12s;
}
.cb:checked { background: var(--accent-grad); border-color: transparent; }
.cb:checked::after {
  content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}
.cb:indeterminate { background: var(--accent); border-color: transparent; }
.cb:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 2px; }

/* ============ Ana iskelet ============ */
.shell { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: 256px; flex: none; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 14px; background: var(--panel); border-right: 1px solid var(--border);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 16px; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(91, 108, 255, .35)); }
.brand span { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand b { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.upload-cta { position: relative; margin-bottom: 12px; }
.upload-cta .btn.primary { width: 100%; height: 46px; border-radius: 13px; font-size: 14.5px; justify-content: flex-start; padding: 0 16px; }
.upload-cta .btn.primary .chev { margin-left: auto; opacity: .85; transition: transform .2s; }
.upload-cta.open .btn.primary .chev { transform: rotate(180deg); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .badge { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: var(--surface-3); color: var(--text-2); }

.storage-card {
  margin-top: auto; padding: 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
}
.storage-card .t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.storage-card .t svg.i { width: 16px; height: 16px; color: var(--accent); }
.meter { height: 7px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 10px; background: var(--accent-grad); transition: width .6s var(--ease); }
.meter.warn > span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.storage-card .l1 { margin-top: 9px; font-size: 12.5px; color: var(--text-2); }
.storage-card .l2 { font-size: 12px; color: var(--muted); margin-top: 2px; }

.side-foot { display: flex; align-items: center; gap: 4px; padding: 10px 2px 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.side-foot .who { flex: 1; min-width: 0; padding-left: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative;
  background:
    radial-gradient(900px 400px at 100% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, var(--bg-glow-2), transparent 60%),
    var(--bg);
}
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 24px 6px; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 560px; }
.search svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; border-radius: 12px; padding: 0 40px 0 42px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--selected-border); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .clear { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg .icon-btn { width: 34px; height: 32px; border-radius: 9px; }

.headrow { display: flex; align-items: center; gap: 12px; padding: 12px 24px 10px; min-height: 58px; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.crumbs a {
  font-family: var(--font-display); font-size: 20px; font-weight: 650; letter-spacing: -.01em;
  padding: 3px 8px; border-radius: 9px; color: var(--text-2); cursor: pointer; white-space: nowrap;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
.crumbs a:hover { background: var(--hover); color: var(--text); }
.crumbs a:last-child { color: var(--text); }
.crumbs .sep { color: var(--muted); display: inline-flex; }
.crumbs .sep svg.i { width: 16px; height: 16px; }
.headrow .count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.headrow .spacer { flex: 1; }

/* seçim çubuğu */
.selbar {
  display: flex; align-items: center; gap: 6px; margin: 0 24px 10px; padding: 6px 8px 6px 14px;
  border-radius: 13px; background: var(--surface); border: 1px solid var(--selected-border);
  box-shadow: 0 0 0 4px var(--accent-soft); animation: pop .2s var(--ease);
}
.selbar .n { font-weight: 650; margin-right: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.banner {
  display: flex; align-items: center; gap: 12px; margin: 0 24px 12px; padding: 12px 14px;
  border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
}
.banner .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(251, 191, 36, .14); color: var(--warn); flex: none; }
.banner .tx { flex: 1; min-width: 0; }
.banner .tx b { display: block; }
.banner .tx small { color: var(--muted); }

.content { flex: 1; overflow: auto; padding: 0 24px 120px; position: relative; }

/* ============ Liste görünümü ============ */
.list { border-radius: var(--radius); }
.lrow {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 110px 170px 84px; align-items: center;
  min-height: 52px; padding: 0 8px 0 12px; border-radius: 12px; border: 1px solid transparent;
  cursor: default; user-select: none; transition: background .12s, border-color .12s;
}
.lrow.trash { grid-template-columns: 36px minmax(0, 1fr) minmax(0, .7fr) 110px 150px 84px; }
.lrow.search-row { grid-template-columns: 36px minmax(0, 1fr) minmax(0, .7fr) 110px 170px 84px; }
.lhead {
  min-height: 38px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-radius: 0; border-bottom: 1px solid var(--border);
}
.lhead .sort { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lhead .sort:hover { color: var(--text); }
.lhead .sort svg.i { width: 14px; height: 14px; }
.lrow:not(.lhead):hover { background: var(--hover); }
.lrow.sel { background: var(--selected); border-color: var(--selected-border); }
.lrow.drop-target { background: var(--accent-soft); border-color: var(--accent); }
.lrow .nm { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; padding-right: 14px; }
.lrow .nm .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lrow .nm:hover .t { color: var(--accent); }
.lrow .c { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.lrow .c.loc { cursor: pointer; }
.lrow .c.loc:hover { color: var(--accent); }
.lrow .acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .12s; }
.lrow:hover .acts, .lrow.sel .acts { opacity: 1; }
.lrow .cb { opacity: .55; }
.lrow:hover .cb, .lrow .cb:checked, .lhead .cb { opacity: 1; }

/* dosya türü ikonu */
.ficon {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  color: var(--c, #94a3b8); background: color-mix(in srgb, var(--c, #94a3b8) 15%, transparent);
}
.ficon svg.i { width: 19px; height: 19px; }
.ficon.folder svg.i { fill: color-mix(in srgb, var(--c) 30%, transparent); }

/* ============ Izgara görünümü ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; padding-top: 4px; }
.card {
  position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; cursor: pointer; user-select: none;
  transition: transform .15s var(--ease), box-shadow .2s, border-color .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card.drop-target { border-color: var(--accent); background: var(--accent-soft); }
.card .thumb {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--c, #94a3b8) 9%, var(--surface-2));
}
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.card .thumb img.ok { opacity: 1; }
.card .thumb .big { color: var(--c); }
.card .thumb .big svg.i { width: 46px; height: 46px; stroke-width: 1.5; }
.card .thumb .big.folder svg.i { fill: color-mix(in srgb, var(--c) 28%, transparent); }
.card .meta { padding: 10px 12px 11px; }
.card .meta .t { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.card .cb { position: absolute; top: 10px; left: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent); opacity: 0; transition: opacity .12s; }
.card:hover .cb, .card .cb:checked, .grid.selecting .card .cb { opacity: 1; }
.card .more { position: absolute; top: 6px; right: 6px; opacity: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px); }
.card:hover .more { opacity: 1; }

/* ============ Boş durum / yükleniyor ============ */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 20px; animation: rise .4s var(--ease); }
.empty .art {
  width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--accent-grad); color: #fff; box-shadow: 0 18px 40px rgba(91, 108, 255, .35);
}
.empty .art svg.i { width: 46px; height: 46px; stroke-width: 1.7; }
.empty .art.mute { background: var(--surface-2); color: var(--muted); box-shadow: none; border: 1px solid var(--border); }
.empty h3 { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 22px; max-width: 420px; }
.empty .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.sk { height: 52px; border-radius: 12px; margin-bottom: 4px; background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi) 50%, var(--skeleton) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ Sürükle-bırak katmanı ============ */
.drop {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: inset 0 0 0 3px var(--accent); border-radius: 4px;
  opacity: 0; transition: opacity .18s;
}
.drop.on { opacity: 1; }
.drop .box {
  position: absolute; left: 50%; bottom: 36px; transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 16px; text-align: left;
  width: max-content; max-width: calc(100% - 32px); padding: 16px 26px 16px 16px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--selected-border); box-shadow: var(--shadow);
  transition: transform .25s var(--ease);
}
.drop.on .box { transform: translate(-50%, 0); }
.drop .box .art { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--accent-grad); box-shadow: 0 10px 26px rgba(91, 108, 255, .45); animation: bob 1.4s ease-in-out infinite; }
.drop .box .art svg.i { width: 28px; height: 28px; }
.drop .box h2 { margin: 0 0 2px; font-family: var(--font-display); font-size: 18px; }
.drop .box p { margin: 0; color: var(--muted); }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ============ Yükleme paneli ============ */
.upl {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 420px; max-width: calc(100vw - 24px);
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  overflow: hidden; animation: rise .3s var(--ease);
}
.upl-head { display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 14px; cursor: pointer; }
.ring { width: 42px; height: 42px; flex: none; position: relative; }
.ring > svg { width: 42px; height: 42px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .3s; }
.ring .mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.ring .mid svg.i { width: 20px; height: 20px; }
.ring.done .mid { color: var(--success); }
.ring.err .mid { color: var(--danger); }
.upl-title { flex: 1; min-width: 0; }
.upl-title b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upl-title small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.upl.collapsed .upl-body { display: none; }
.upl.collapsed .upl-head .chev { transform: rotate(180deg); }
.upl-head .chev { transition: transform .2s; }
.upl-tools { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.upl-tools label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-right: auto; }
.select {
  height: 30px; border-radius: 8px; padding: 0 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 12.5px; cursor: pointer;
}
.upl-list { max-height: min(46vh, 380px); overflow: auto; padding: 6px; }
.uitem { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px 8px 8px; border-radius: 11px; }
.uitem:hover { background: var(--hover); }
.uitem .ficon { width: 34px; height: 34px; }
.uitem .nm { font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uitem .sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uitem .sub.err { color: var(--danger); }
.uitem .bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.uitem .bar > span { display: block; height: 100%; background: var(--accent-grad); border-radius: 4px; transition: width .25s linear; }
.uitem.paused .bar > span { background: var(--muted); }
.uitem .st { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.uitem .ok { color: var(--success); display: grid; place-items: center; width: 30px; }
.uitem .bad { color: var(--danger); }
.uitem .ua { display: flex; opacity: 0; transition: opacity .12s; }
.uitem:hover .ua, .uitem.error .ua, .uitem.paused .ua { opacity: 1; }
.upl-more { text-align: center; color: var(--muted); font-size: 12px; padding: 8px; }

/* ============ Menüler, diyaloglar ============ */
.menu {
  position: fixed; z-index: 90; min-width: 210px; padding: 6px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: menuIn .14s var(--ease); transform-origin: top left;
}
@keyframes menuIn { from { opacity: 0; transform: scale(.96); } }
.menu button {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  text-align: left; color: var(--text-2); font-weight: 500;
}
.menu button:hover { background: var(--hover); color: var(--text); }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: var(--danger-soft); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 4px; }
.menu .k { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.modal-bg {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: var(--overlay); backdrop-filter: blur(3px); animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(440px, 100%); padding: 24px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: rise .22s var(--ease);
}
.modal h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal h3 .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.modal h3 .ic.danger { background: var(--danger-soft); color: var(--danger); }
.modal p { color: var(--text-2); margin: 0 0 18px; white-space: pre-line; }
.modal .input { margin-bottom: 18px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; }

/* önizleme */
.viewer { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; background: rgba(4, 6, 12, .94); color: #fff; animation: fade .15s; }
.viewer .vbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.viewer .vbar .t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer .vbar .t small { color: rgba(255, 255, 255, .55); font-weight: 400; margin-left: 8px; }
.viewer .icon-btn { color: rgba(255, 255, 255, .8); }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.viewer .stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 70px 24px; position: relative; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.viewer .stage iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; }
.viewer .stage pre {
  width: min(1000px, 100%); max-height: 100%; overflow: auto; margin: 0; padding: 20px; border-radius: 12px;
  background: #0f1524; color: #d8deea; font: 13px/1.55 Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; word-break: break-word;
}
.viewer .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.viewer .nav-btn.prev { left: 14px; }
.viewer .nav-btn.next { right: 14px; }
.viewer .noprev { text-align: center; }
.viewer .noprev .ficon { width: 90px; height: 90px; border-radius: 24px; margin: 0 auto 16px; }
.viewer .noprev .ficon svg.i { width: 42px; height: 42px; }
.viewer .noprev p { color: rgba(255, 255, 255, .6); margin: 4px 0 20px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: #8b7dff; animation: spin .8s linear infinite; }
.content .spinner { border-color: var(--surface-3); border-top-color: var(--accent); margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bildirimler */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 13px; max-width: min(520px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); pointer-events: auto;
  font-weight: 500; animation: toastIn .25s var(--ease);
}
.toast.out { animation: toastOut .2s forwards; }
.toast .ti { display: grid; place-items: center; }
.toast.ok .ti { color: var(--success); }
.toast.err .ti { color: var(--danger); }
.toast.info .ti { color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.scrim { display: none; }

/* ============ Mobil ============ */
@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--shadow); }
  .shell.side-open .sidebar { transform: none; }
  .shell.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: var(--overlay); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 14px 4px; }
  .headrow { padding: 10px 14px 8px; }
  .content { padding: 0 10px 140px; }
  .selbar, .banner { margin-left: 14px; margin-right: 14px; }
  .lrow { grid-template-columns: 32px minmax(0, 1fr) 84px 44px; }
  .lrow .c.date, .lrow .c.loc { display: none; }
  .lrow.trash, .lrow.search-row { grid-template-columns: 32px minmax(0, 1fr) 84px 44px; }
  .lrow .acts { opacity: 1; }
  .lrow .acts .hide-m { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .crumbs a { font-size: 17px; }
  .upl { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .viewer .stage { padding: 0 8px 16px; }
  .viewer .nav-btn { display: none; }
  .hide-m { display: none !important; }
}
