/* ═══════════════════════════════════════════════════════════
   786GROUP MEDIA — App Theme v5.0 (Media Studio)
   Dashboard (ImageKit-style) + Admin Panel — dark indigo/violet
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0e17;
  --bg2: #0d1120;
  --surface: rgba(255,255,255,.04);
  --surface2: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.14);
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-glow: rgba(99,102,241,.25);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: rgba(148,163,184,.5);
  --red: #ef4444;
  --green: #10b981;
  --radius: 14px;
  --sidebar-w: 248px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
.mono, code { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.dim { color: var(--dim); }
html { scrollbar-color: rgba(148,163,184,.25) transparent; scrollbar-width: thin; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.22); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ═══════════ APP SHELL ═══════════ */
body.app-shell {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.55;
}
body.app-shell::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 400px at 80% -10%, rgba(99,102,241,.08), transparent 60%),
    radial-gradient(500px 350px at -10% 110%, rgba(139,92,246,.07), transparent 60%);
}

/* ───────── Sidebar ───────── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: rgba(13,17,32,.85); border-right: 1px solid var(--border);
  backdrop-filter: blur(14px); z-index: 40;
  display: flex; flex-direction: column; padding: 20px 14px;
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; }
.sb-logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-grad);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 24px var(--accent-glow); flex-shrink: 0;
}
.sb-brand-txt b { display: block; font-size: 15px; letter-spacing: 1px; }
.sb-brand-txt span { display: block; font-size: 10px; letter-spacing: 2.5px; color: var(--dim); }

.sb-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sb-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 11px; color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: all .15s;
}
.sb-item i { font-size: 18px; }
.sb-item:hover { color: var(--text); background: var(--surface); }
.sb-item.active {
  color: #fff; background: var(--accent-grad);
  box-shadow: 0 4px 18px var(--accent-glow);
}

.sb-storage { margin-top: auto; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.sb-storage-head { font-size: 10px; letter-spacing: 2px; color: var(--dim); font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 9px; }
.sb-storage-head i { font-size: 13px; color: var(--accent); }
.sb-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 8px; }
.sb-bar-fill { height: 100%; width: 0%; border-radius: 99px; background: var(--accent-grad); transition: width .6s ease; }
.sb-storage-info { font-size: 12px; color: var(--muted); }
.sb-storage-info b { color: var(--text); }

.sb-user { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 8px; border-radius: 12px; }
.sb-user:hover { background: var(--surface); }
.sb-avatar {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-grad);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.sb-user-txt { min-width: 0; flex: 1; }
.sb-user-txt b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-txt span { font-size: 11px; }
.sb-user-out { color: var(--dim); text-decoration: none; font-size: 17px; padding: 6px; border-radius: 8px; }
.sb-user-out:hover { color: var(--red); background: rgba(239,68,68,.1); }

/* ───────── Main column ───────── */
.main { margin-left: var(--sidebar-w); position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.mn-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 24px; background: rgba(11,14,23,.8);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.sb-toggle { display: none; }

.crumb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.cr-el { color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cr-el:hover { color: var(--text); background: var(--surface); }
.cr-el:last-child { color: var(--text); font-weight: 600; }
.cr-sep { color: var(--dim); font-size: 15px; }

.mn-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; width: 210px; transition: all .2s;
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); width: 260px; }
.searchbox i { color: var(--dim); font-size: 16px; }
.searchbox input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 13.5px; min-width: 0; }
.searchbox input::placeholder { color: var(--dim); }
.searchbox kbd { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--dim); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: rgba(255,255,255,.03); }

.sel {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 13px;
  outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' fill='none' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
.sel.w100 { width: 100%; }
.sel:focus { border-color: var(--accent); }
.sel option { background: #131829; color: var(--text); }

.vtoggle { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.vt-btn { padding: 8px 13px; background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; transition: all .15s; }
.vt-btn + .vt-btn { border-left: 1px solid var(--border); }
.vt-btn.active { color: #fff; background: var(--accent-grad); }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border: none; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .18s; text-decoration: none; white-space: nowrap;
}
.btn.primary { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 16px var(--accent-glow); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); filter: brightness(1.08); }
.btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }
.btn.danger { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.btn.danger:hover { background: rgba(239,68,68,.2); }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }

/* Alias class lama (admin panel) */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border: none; border-radius: 10px;
  background: var(--accent-grad); color: #fff; box-shadow: 0 4px 16px var(--accent-glow);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); filter: brightness(1.08); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); color: var(--muted);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }
.btn-ghost.danger { color: #fca5a5; border-color: rgba(239,68,68,.3); }
.btn-ghost.danger:hover { background: rgba(239,68,68,.12); }

.icon-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-size: 16px; cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }

.mini {
  padding: 6px 9px; font-size: 14.5px; background: var(--surface);
  border: 1px solid var(--border); color: var(--muted); border-radius: 8px;
  cursor: pointer; transition: all .15s; display: inline-grid; place-items: center;
}
.mini:hover { color: var(--text); border-color: var(--border2); background: var(--surface2); }
.mini.danger:hover { color: #fca5a5; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.1); }

/* ───────── Chips & selection bar ───────── */
.chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 24px 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; color: var(--muted);
}
.chip i { color: var(--accent); font-size: 15px; }
.chip b { color: var(--text); font-weight: 700; }

.selbar {
  position: sticky; top: 66px; z-index: 25;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 12px 24px 0; padding: 9px 14px;
  background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.35);
  border-radius: 12px; backdrop-filter: blur(10px);
}
.sel-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.selbar .btn { margin-left: auto; }
.selbar .btn:first-of-type { margin-left: 0; }
.selbar .btn + .btn, .selbar .btn + .btn.ghost { margin-left: 0; }

/* ───────── Body / grid ───────── */
.mn-body { flex: 1; padding: 16px 24px 40px; position: relative; }

.empty { text-align: center; padding: 70px 20px; }
.empty-ring {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 36px; color: var(--accent);
}
.empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all .2s; animation: fadeIn .3s ease both;
}
.tile:hover { border-color: rgba(99,102,241,.5); transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0,0,0,.4), 0 0 0 1px rgba(99,102,241,.25); }
.tile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.tile-thumb {
  aspect-ratio: 1/1; display: grid; place-items: center; position: relative;
  background: #10152a; overflow: hidden;
}
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tile:hover .tile-thumb img { transform: scale(1.06); }
.tile-thumb.folder i { font-size: 52px; color: var(--accent); opacity: .85; text-shadow: 0 0 30px var(--accent-glow); }
.tile-thumb.file i { font-size: 40px; color: var(--dim); }

.tile-check {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 24px; height: 24px; border-radius: 8px;
  background: rgba(11,14,23,.65); border: 1px solid var(--border2);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transition: all .15s; backdrop-filter: blur(4px);
}
.tile:hover .tile-check, .tile.sel .tile-check { opacity: 1; }
.tile-check input { display: none; }
.tile-check i { color: transparent; font-size: 15px; }
.tile-check:has(input:checked) { background: var(--accent-grad); border-color: transparent; }
.tile-check:has(input:checked) i { color: #fff; }

.tile-hover {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  display: flex; gap: 6px; opacity: 0; transform: translateY(-4px);
  transition: all .18s;
}
.tile:hover .tile-hover { opacity: 1; transform: none; }
.hv-btn {
  width: 30px; height: 30px; border-radius: 9px; border: none; cursor: pointer;
  background: rgba(11,14,23,.72); color: #e2e8f0; font-size: 14.5px;
  display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: all .15s;
}
.hv-btn:hover { background: var(--accent); color: #fff; }
.hv-btn.danger:hover { background: var(--red); }

.tile-meta { padding: 10px 12px 12px; }
.tile-meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta span { font-size: 11.5px; color: var(--dim); }

/* ───────── List view ───────── */
.listview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.lv-head, .lv-row {
  display: grid; grid-template-columns: 44px 1fr 110px 100px 150px 210px;
  align-items: center; gap: 10px; padding: 10px 16px;
}
.lv-head {
  font-size: 10.5px; letter-spacing: 1.5px; color: var(--dim); font-weight: 700;
  background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border);
}
.lv-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; animation: fadeIn .25s ease both; }
.lv-row:last-child { border-bottom: none; }
.lv-row:hover { background: var(--surface2); }
.lv-row.sel { background: rgba(99,102,241,.12); }
.lv-check { cursor: pointer; accent-color: var(--accent); width: 15px; height: 15px; }
.lv-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lv-name b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-ico { font-size: 22px; color: var(--accent); flex-shrink: 0; }
.lv-ico:not(.folder) { color: var(--dim); }
.lv-thumb { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.lv-size, .lv-dims, .lv-date { font-size: 12.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.lv-acts { display: flex; gap: 6px; justify-content: flex-end; }

/* ───────── Skeleton ───────── */
.skel-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
.skel-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.skel-thumb { aspect-ratio: 1/1; }
.skel-line { height: 12px; margin: 12px 14px 0; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skel-line.short { width: 45%; margin-bottom: 14px; }
.skel-thumb { background: linear-gradient(90deg, rgba(255,255,255,.03) 25%, rgba(255,255,255,.07) 50%, rgba(255,255,255,.03) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ═══════════ DRAWER ═══════════ */
.drawer-mask { position: fixed; inset: 0; z-index: 55; background: rgba(5,8,15,.55); backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 56;
  width: 340px; max-width: 92vw;
  background: rgba(13,17,32,.97); border-left: 1px solid var(--border);
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.25,1);
  display: flex; flex-direction: column;
  backdrop-filter: blur(16px);
}
.drawer.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.45); }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: 15px; }
.dr-preview { background: #10152a; display: grid; place-items: center; min-height: 200px; max-height: 300px; overflow: hidden; }
.dr-preview img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; }
.dr-nofile i { font-size: 52px; color: var(--dim); }
.dr-body { flex: 1; overflow-y: auto; padding: 18px; }
.dr-name { font-size: 15.5px; font-weight: 700; margin-bottom: 14px; word-break: break-all; }
.dr-meta { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.dr-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.dr-row:last-child { border-bottom: none; }
.dr-row span { color: var(--dim); }
.dr-row b { font-weight: 600; }
.dr-url label { display: block; font-size: 10.5px; letter-spacing: 1.5px; color: var(--dim); font-weight: 700; margin-bottom: 7px; }
.dr-urlrow { display: flex; gap: 8px; }
.dr-urlrow input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 11px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; outline: none;
}
.dr-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); }
.dr-actions .btn { flex: 1; justify-content: center; min-width: 100px; }

/* ═══════════ UPLOAD PANEL ═══════════ */
.upanel {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 340px; max-width: calc(100vw - 40px);
  background: rgba(13,17,32,.97); border: 1px solid var(--border2);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); backdrop-filter: blur(14px);
  animation: slideUp .25s ease both;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }
.up-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.up-head i { color: var(--accent); }
.up-list { max-height: 240px; overflow-y: auto; }
.up-row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.up-row:last-child { border-bottom: none; }
.up-ico { font-size: 19px; color: var(--muted); flex-shrink: 0; }
.up-row.ok .up-ico { color: var(--green); }
.up-row.err .up-ico { color: var(--red); }
.up-info { flex: 1; min-width: 0; }
.up-info b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.up-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.up-fill { height: 100%; width: 0%; background: var(--accent-grad); border-radius: 99px; transition: width .2s; }
.up-pct { font-size: 11.5px; color: var(--dim); font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.up-row.ok .up-pct { color: var(--green); }

/* ═══════════ DROPZONE ═══════════ */
.dropzone {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  display: grid; place-items: center;
  background: rgba(11,14,23,.8); backdrop-filter: blur(6px);
}
.dz-inner {
  border: 2px dashed var(--accent); border-radius: 22px;
  padding: 46px 60px; text-align: center;
  background: rgba(99,102,241,.08);
}
.dz-inner i { display: block; font-size: 54px; color: var(--accent); margin-bottom: 12px; }
.dz-inner span { font-size: 17px; font-weight: 600; }

/* ═══════════ CONTEXT MENU ═══════════ */
.ctxmenu {
  position: fixed; z-index: 90; min-width: 170px;
  background: rgba(19,24,41,.97); border: 1px solid var(--border2);
  border-radius: 12px; padding: 5px; backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0,0,0,.5);
}
.ctxmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: inherit; font-size: 13px; padding: 8px 11px; border-radius: 8px;
  transition: all .12s; text-align: left;
}
.ctxmenu button i { font-size: 15px; width: 17px; }
.ctxmenu button:hover { color: #fff; background: var(--accent-grad); }

/* ═══════════ MODALS / OVERLAY / LIGHTBOX ═══════════ */
.overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(5,8,15,.7); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transition: all .2s; padding: 20px;
}
.overlay.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 420px;
  background: rgba(19,24,41,.97); border: 1px solid var(--border2);
  border-radius: 18px; padding: 26px 24px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  transform: scale(.96) translateY(8px); transition: transform .22s;
}
.overlay.show .modal { transform: none; }
.modal h3 { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.modal h3 i { color: var(--accent); }
.modal label { display: block; font-size: 11px; letter-spacing: 1.5px; color: var(--dim); font-weight: 700; margin: 16px 0 7px; }
.modal input[type="text"], .modal input[type="password"] {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
  font-family: inherit; font-size: 14px; outline: none; transition: border-color .15s;
}
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.mrow { display: flex; gap: 10px; margin-top: 20px; }
.mrow .btn { flex: 1; justify-content: center; }
.hint { font-size: 12px; color: var(--dim); }

.overlay.lb { z-index: 75; }
.lb-inner { max-width: 92vw; max-height: 90vh; text-align: center; }
.lb-inner img { max-width: 92vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.lb-cap { margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ═══════════ TOAST ═══════════ */
#toastHost { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(19,24,41,.97); border: 1px solid var(--border2);
  padding: 11px 18px; border-radius: 11px; font-size: 13.5px; color: var(--text);
  box-shadow: 0 14px 40px rgba(0,0,0,.5); backdrop-filter: blur(10px);
  animation: toastIn .25s ease both; display: flex; gap: 8px; align-items: center; max-width: 90vw;
}
.toast i { flex-shrink: 0; }
.toast.ok { border-color: rgba(16,185,129,.4); } .toast.ok i { color: var(--green); }
.toast.err { border-color: rgba(239,68,68,.4); } .toast.err i { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ═══════════ ADMIN (kompatibel topbar admin lama) ═══════════ */
body.app {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.55;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 13px 24px; background: rgba(11,14,23,.85);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(14px);
}
.tb-brand { font-size: 19px; font-weight: 800; letter-spacing: 1px; color: var(--accent); text-decoration: none; }
.tb-brand span { color: var(--text); }
.tb-brand .adm-tag {
  font-style: normal; font-size: 9.5px; letter-spacing: 2px; color: #fbbf24;
  border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.1);
  border-radius: 6px; padding: 2px 8px; vertical-align: 3px; margin-left: 8px;
}
.tb-nav { display: flex; gap: 4px; }
.tb-link { color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 7px 14px; border-radius: 9px; text-decoration: none; transition: all .15s; }
.tb-link:hover { color: var(--text); background: var(--surface); }
.tb-link.active { color: #fff; background: var(--accent-grad); box-shadow: 0 3px 14px var(--accent-glow); }
.tb-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.tb-user { color: var(--muted); font-size: 13px; }
.tb-logout { color: #fca5a5; font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 8px; transition: all .15s; }
.tb-logout:hover { background: rgba(239,68,68,.12); }

.wrap { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 24px 60px; }
.statbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.statbar .st {
  flex: 1; min-width: 170px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 18px;
}
.statbar .st b { display: block; font-size: 22px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.statbar .st span { font-size: 12px; color: var(--dim); }

.adm-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.rowline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rowline input, .rowline select {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; color: var(--text); font-family: inherit; font-size: 13px; outline: none; min-width: 0; flex: 1;
}
.rowline input:focus { border-color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.tbl th { text-align: left; font-size: 10.5px; letter-spacing: 1.5px; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(255,255,255,.03); }
.acts { display: flex; gap: 6px; }
.role { font-size: 11px; font-weight: 700; letter-spacing: .5px; padding: 3px 10px; border-radius: 99px; }
.role.r-admin { color: #c4b5fd; background: rgba(139,92,246,.14); border: 1px solid rgba(139,92,246,.35); }
.role.r-user { color: #93c5fd; background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.3); }

.logbox { max-height: 480px; overflow-y: auto; font-size: 11.5px; border: 1px solid var(--border); border-radius: 11px; padding: 10px; background: rgba(0,0,0,.18); }
.logline { display: grid; grid-template-columns: 84px 90px 130px 1fr; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.logline:hover { background: var(--surface); }
.lt { color: var(--dim); } .lu { color: var(--accent); font-weight: 600; } .le { color: var(--muted); } .ld { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .adm-grid { grid-template-columns: 1fr; }
  .lv-head, .lv-row { grid-template-columns: 40px 1fr 90px 170px; }
  .lv-dims, .lv-head span:nth-child(4) { display: none; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s; width: 260px; }
  .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.5); }
  .main { margin-left: 0; }
  .sb-toggle { display: grid; }
  .mn-head { padding: 12px 14px; }
  .mn-body { padding: 12px 14px 90px; }
  .chips { padding: 12px 14px 0; }
  .selbar { margin: 10px 14px 0; }
  .searchbox { width: 100%; flex: 1; order: 5; }
  .searchbox:focus-within { width: 100%; }
  .lv-head, .lv-row { grid-template-columns: 36px 1fr 80px; }
  .lv-date, .lv-head span:nth-child(5) { display: none; }
  .lv-acts .mini:nth-child(2) { display: none; }
  .drawer { width: 100vw; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}
