/* ===========================================================================
   Aakhar Vault — UI styles
   Dark, glassmorphic, mobile-first. Shares the Aakhar Home design language.
   =========================================================================== */

:root {
  --bg: #07070c;
  --bg-2: #0c0c16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4fb;
  --text-dim: #a6a6bd;
  --text-faint: #6b6b80;
  --accent: #7c5cff;
  --accent-2: #21d4fd;
  --accent-3: #ff5ca8;
  --ok: #3ddc97;
  --danger: #ff6b6b;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
  --topbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(124, 92, 255, 0.35); }

/* ---------- Animated aurora background (fixed, behind everything) ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -3; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 70% -10%, #15102b 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.aurora__blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; mix-blend-mode: screen; will-change: transform; }
.aurora__blob--1 { width: 46vw; height: 46vw; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); top: -12vw; left: -8vw; animation: drift1 20s ease-in-out infinite; }
.aurora__blob--2 { width: 40vw; height: 40vw; background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%); top: 18vh; right: -10vw; animation: drift2 24s ease-in-out infinite; }
.aurora__blob--3 { width: 38vw; height: 38vw; background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%); bottom: -14vw; left: 22vw; animation: drift3 28s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,6vh) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-6vw,8vh) scale(0.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw,-6vh) scale(1.2); } }
.grid-overlay {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Shared bits ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  font-family: var(--font-display); font-size: 21px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 8px 26px -8px var(--accent);
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand__name span { color: var(--text-dim); font-weight: 500; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.18); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-enter-active, .fade-leave-active { transition: opacity 0.25s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ===========================================================================
   Login
   =========================================================================== */
.login {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px;
}
.login__card {
  width: min(400px, 100%);
  padding: 38px 32px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), rgba(255,255,255,0.012));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.login__brand { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; margin-bottom: 26px; }
.login__brand .brand__mark { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; }
.login__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.login__sub { color: var(--text-dim); font-size: 0.92rem; margin-top: 4px; }

.field { position: relative; margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 7px; letter-spacing: 0.02em; }
.field__wrap { position: relative; display: flex; align-items: center; }
.input {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--text-faint); }
.input:focus { border-color: var(--accent); background: rgba(124,92,255,0.06); box-shadow: 0 0 0 4px rgba(124,92,255,0.12); }
.input--has-toggle { padding-right: 46px; }
.field__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-faint);
  padding: 8px; border-radius: 9px; display: grid; place-items: center; transition: color 0.2s, background 0.2s;
}
.field__toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--primary { color: #0b0b14; background: linear-gradient(135deg, #fff, #d9d4ff); box-shadow: 0 14px 40px -16px rgba(124,92,255,0.8); }
.btn--primary:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 20px 50px -16px rgba(124,92,255,0.95); }
.btn--primary:not(:disabled):active { transform: translateY(0); }
.btn--block { width: 100%; }
.btn--ghost { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent-2); }

.login__error {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 14px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: rgba(255,107,107,0.10); border: 1px solid rgba(255,107,107,0.3); color: #ffc9c9;
  font-size: 13.5px;
}
.login__foot { margin-top: 18px; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ===========================================================================
   App shell
   =========================================================================== */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: 40px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h); padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 14, 0.72);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.topbar__brand { flex-shrink: 0; }
.topbar__brand .brand__name { display: none; }
.topbar__search {
  flex: 1; min-width: 0; max-width: 460px; margin: 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,92,255,0.12); }
.topbar__search svg { flex-shrink: 0; color: var(--text-faint); }
.topbar__search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: 14.5px; }
.topbar__search input::placeholder { color: var(--text-faint); }

.iconbtn {
  flex-shrink: 0; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s; -webkit-tap-highlight-color: transparent;
}
.iconbtn:hover { color: var(--text); border-color: var(--border-strong); }
.iconbtn:active { transform: scale(0.94); }

/* ---------- Toolbar: breadcrumbs + filters ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto; padding: 18px 16px 6px;
}
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13.5px; min-width: 0; }
.crumbs__item { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); cursor: pointer; padding: 5px 9px; border-radius: 9px; transition: color 0.2s, background 0.2s; border: none; background: none; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs__item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.crumbs__item--current { color: var(--text); font-weight: 600; }
.crumbs__sep { color: var(--text-faint); }

.filters { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: all 0.2s; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip--active { color: #0b0b14; background: linear-gradient(135deg, #fff, #d9d4ff); border-color: transparent; font-weight: 600; }

/* ---------- Grid ---------- */
.gallery { max-width: 1280px; margin: 0 auto; padding: 10px 16px 0; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); margin: 18px 4px 12px; font-weight: 600; }

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.grid--folders { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (min-width: 700px) { .grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.card {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), border-color 0.22s, box-shadow 0.22s;
  -webkit-tap-highlight-color: transparent;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 18px 40px -22px rgba(0,0,0,0.9); }
.card:active { transform: translateY(-1px); }

/* Folder card */
.folder {
  display: flex; align-items: center; gap: 13px; padding: 16px 16px;
}
.folder__icon { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--accent-2); background: rgba(33,212,253,0.10); }
.folder__meta { min-width: 0; display: flex; flex-direction: column; }
.folder__name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder__hint { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Media (image/video) card */
.media { aspect-ratio: 1 / 1; }
.media__thumb { width: 100%; height: 100%; object-fit: cover; background: rgba(255,255,255,0.03); transition: opacity 0.4s ease; }
.media__thumb.is-loading { opacity: 0; }
.media__skeleton { position: absolute; inset: 0; background: linear-gradient(110deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 70%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.media__badge {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 600;
  background: rgba(7,7,12,0.62); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.14);
}
.media__play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.media__play span {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(7,7,12,0.5); border: 1.5px solid rgba(255,255,255,0.6); color: #fff;
  backdrop-filter: blur(4px); transition: transform 0.22s, background 0.22s;
}
.card:hover .media__play span { transform: scale(1.08); background: rgba(124,92,255,0.55); }
.media__name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 9px;
  font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, transparent, rgba(7,7,12,0.82));
  opacity: 0; transition: opacity 0.25s;
}
.card:hover .media__name { opacity: 1; }

/* ---------- States ---------- */
.state { display: grid; place-items: center; text-align: center; padding: 80px 24px; color: var(--text-dim); }
.state__icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text-faint); margin-bottom: 18px; }
.state__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); }
.state__sub { font-size: 0.92rem; margin-top: 6px; max-width: 30ch; }
.loading-center { display: grid; place-items: center; padding: 90px 0; }

/* ===========================================================================
   Lightbox
   =========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(4, 4, 8, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.lightbox__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.lightbox__title { font-size: 14px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__count { margin-left: auto; font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.lightbox__stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 8px; touch-action: pan-y; }
.lightbox__media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; animation: pop 0.3s cubic-bezier(0.16,1,0.3,1); }
video.lightbox__media { width: auto; height: auto; max-height: 100%; background: #000; }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: #fff; cursor: pointer;
  transition: background 0.2s, transform 0.15s; -webkit-tap-highlight-color: transparent;
}
.lightbox__nav:hover { background: rgba(124,92,255,0.5); }
.lightbox__nav:active { transform: translateY(-50%) scale(0.92); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__nav:disabled { opacity: 0.25; cursor: default; }
.lightbox__foot { display: flex; justify-content: center; gap: 18px; padding: 14px; }
.lightbox__action { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); background: none; border: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; transition: color 0.2s, background 0.2s; }
.lightbox__action:hover { color: var(--text); background: rgba(255,255,255,0.06); }
@media (max-width: 600px) { .lightbox__nav { width: 42px; height: 42px; } }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (min-width: 720px) {
  .topbar { padding: 0 24px; gap: 18px; }
  .topbar__brand .brand__name { display: block; }
  .toolbar, .gallery { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 9px; }
  .grid--folders { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .filters { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 4px; }
  .crumbs__item { max-width: 40vw; }
}

/* ===========================================================================
   Admin / Account modals
   =========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center; padding: 18px;
  background: rgba(4, 4, 8, 0.74);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fadein 0.2s ease;
}
.modal--nested { z-index: 120; background: rgba(4, 4, 8, 0.6); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal__card {
  width: min(620px, 100%); max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(160deg, #14141f, #0c0c14);
  box-shadow: var(--shadow);
  animation: rise 0.32s cubic-bezier(0.16,1,0.3,1) both;
  overflow: hidden;
}
.modal__card--sm { width: min(460px, 100%); }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.modal__title svg { color: var(--accent-2); }
.modal__body { padding: 16px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }

.tabbar { display: flex; gap: 6px; padding: 12px 16px 0; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border-radius: 11px 11px 0 0; font-size: 13.5px; font-weight: 500;
  background: none; border: 1px solid transparent; border-bottom: none; color: var(--text-dim);
}
.tab svg { width: 16px; height: 16px; }
.tab--active { color: var(--text); background: rgba(255,255,255,0.05); border-color: var(--border); }

.note { margin: 12px 16px 0; padding: 9px 13px; border-radius: var(--radius-sm); font-size: 13px; }
.note--ok { background: rgba(61,220,151,0.10); border: 1px solid rgba(61,220,151,0.3); color: #b6f2d8; }
.note--err { background: rgba(255,107,107,0.10); border: 1px solid rgba(255,107,107,0.3); color: #ffc9c9; }

.arow {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 10px;
}
.arow--form { gap: 8px; background: none; border-style: dashed; flex-wrap: wrap; }
.arow--form .input { flex: 1; min-width: 120px; padding: 10px 12px; }
.arow__main { min-width: 0; flex: 1; }
.arow__name { font-weight: 600; font-size: 14.5px; }
.arow__sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.arow__muted { color: var(--text-faint); font-size: 12.5px; }
.arow__actions { display: flex; gap: 6px; flex-shrink: 0; }

.tagchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  background: rgba(33,212,253,0.10); border: 1px solid rgba(33,212,253,0.25); color: #bdeeff;
}
.tagchip--rm { cursor: pointer; background: rgba(124,92,255,0.12); border-color: rgba(124,92,255,0.3); color: #d9d0ff; }
.tagchip--rm:hover { background: rgba(255,107,107,0.14); border-color: rgba(255,107,107,0.4); color: #ffc9c9; }

.ibtn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: color 0.18s, border-color 0.18s, background 0.18s; -webkit-tap-highlight-color: transparent;
}
.ibtn svg { width: 16px; height: 16px; }
.ibtn:hover { color: var(--text); border-color: var(--border-strong); }
.ibtn--danger:hover { color: #ffc9c9; border-color: rgba(255,107,107,0.5); background: rgba(255,107,107,0.10); }
.ibtn--on { color: #0b0b14; background: var(--accent-2); border-color: transparent; }

.btn--sm { padding: 9px 15px; font-size: 13.5px; border-radius: 11px; }
.btn--ghost.btn--sm, .btn--primary.btn--sm { border-radius: 11px; }

.checkrow {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 9px;
}
.checkrow input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.checkrow__main { min-width: 0; }
.checkrow__name { font-weight: 600; font-size: 14px; }
.checkrow__sub { display: block; color: var(--text-faint); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.picker__label { display: block; font-size: 12.5px; color: var(--text-dim); margin: 4px 0 8px; }

.picker { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.picker__bar { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.picker__crumbs { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-dim); font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker__list { max-height: 230px; overflow-y: auto; padding: 6px; }
.picker__row { display: flex; align-items: center; gap: 8px; border-radius: 10px; }
.picker__row:hover { background: rgba(255,255,255,0.04); }
.picker__row--on { background: rgba(33,212,253,0.07); }
.picker__row--lib { border-bottom: 1px dashed var(--border); margin-bottom: 4px; padding-bottom: 2px; }
.picker__open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 10px; background: none; border: none; color: var(--text); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker__open svg { color: var(--accent-2); flex-shrink: 0; width: 18px; height: 18px; }
.picker__grant {
  display: grid; place-items: center; width: 32px; height: 32px; margin-right: 6px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); flex-shrink: 0;
}
.picker__grant svg { width: 15px; height: 15px; }
.picker__grant--on { color: #0b0b14; background: var(--ok); border-color: transparent; }

@media (max-width: 560px) {
  .modal { padding: 0; place-items: stretch; }
  .modal__card { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: none; }
  .modal--nested { padding: 0; }
  .modal--nested .modal__card { height: auto; max-height: 92dvh; border-radius: var(--radius) var(--radius) 0 0; align-self: end; }
  .arow__actions { gap: 4px; }
}
