/* public/vault.css — RED VAULT ULTRA
   The unlocked vault: file manager, upload centre, devices, shares.
   Everything is scoped under .vx-shell so the landing/auth pages are untouched. */

body.in-vault {
  background: #07050a;
  overflow: hidden;
}
body.in-vault .topbar,
body.in-vault #bottomNav { display: none !important; }
body.in-vault #view {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
}
body.in-vault main#view.wide { max-width: none; }

.vx-shell,
.vx-shell * { box-sizing: border-box; }
/* Palette on the body so dialogs, the lightbox and the download overlay —
   which are appended outside .vx-shell — inherit the same tokens. */
body.in-vault {
  --vx-bg: #07050a;
  --vx-side: #0c0810;
  --vx-panel: #110b14;
  --vx-panel-2: #160e1b;
  --vx-line: rgba(255, 255, 255, .085);
  --vx-line-2: rgba(255, 255, 255, .16);
  --vx-ink: #f7f0f3;
  --vx-ink-2: #d7c6ce;
  --vx-dim: #a18d97;
  --vx-red: #ff2d4f;
  --vx-red-2: #ff5c3d;
  --vx-ok: #48dfa0;
  --vx-warn: #ffc857;
  --vx-err: #ff6b7d;
  --vx-radius: 16px;
  --vx-shadow: 0 24px 60px -30px #000;
}
.vx-shell {
  display: flex;
  min-height: 100dvh;
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(255, 45, 79, .10), transparent 60%),
    radial-gradient(700px 500px at 4% 100%, rgba(255, 92, 61, .055), transparent 60%),
    var(--vx-bg);
  color: var(--vx-ink);
  font: 15px/1.65 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
  text-align: start;
}
.vx-shell button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.vx-shell input,
.vx-shell select,
.vx-shell textarea { font: inherit; color: var(--vx-ink); }
.vx-shell a { color: inherit; text-decoration: none; }
.vx-shell h1, .vx-shell h2, .vx-shell h3, .vx-shell h4, .vx-shell p { margin: 0; }
.vx-shell .vx-hud {
  font-family: 'Space Grotesk', 'Tajawal', sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ------------------------------------------------------------------ sidebar */
.vx-side {
  width: 268px;
  flex: 0 0 268px;
  height: 100dvh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 16px 16px;
  border-inline-end: 1px solid var(--vx-line);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 30%), var(--vx-side);
  z-index: 40;
}
.vx-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 0; }
.vx-brand .vx-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,45,79,.22), rgba(255,92,61,.08));
  box-shadow: inset 0 0 0 1px rgba(255,45,79,.35), 0 8px 24px -12px rgba(255,45,79,.8);
  color: #ff8fa0;
  flex: 0 0 auto;
}
.vx-brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.vx-brand-txt b { font-size: 15.5px; letter-spacing: .02em; font-weight: 800; }
.vx-brand-txt b .r { color: var(--vx-red); }
.vx-brand-txt small {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8.5px; letter-spacing: .32em; color: var(--vx-dim); margin-top: 4px;
}
.vx-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid var(--vx-line); border-radius: 13px;
  background: rgba(255,255,255,.022);
}
.vx-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255,45,79,.14); color: #ff9aa9;
  font-weight: 800; font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,45,79,.28);
}
.vx-user-copy { min-width: 0; }
.vx-user-copy b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-user-copy span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--vx-ok); }
.vx-user-copy span i { width: 6px; height: 6px; border-radius: 50%; background: var(--vx-ok); box-shadow: 0 0 8px var(--vx-ok); }

.vx-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; overflow-y: auto; scrollbar-width: thin; }
.vx-nav-label {
  font-family: 'Space Grotesk', sans-serif; font-size: 9.5px; letter-spacing: .24em;
  color: rgba(255,255,255,.32); text-transform: uppercase; padding: 12px 12px 5px; direction: ltr;
}
.vx-nav button {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 44px; padding: 10px 12px;
  border-radius: 11px; color: var(--vx-dim); font-size: 14.5px; font-weight: 500;
  text-align: start; transition: background .16s, color .16s, box-shadow .16s;
}
.vx-nav button svg { flex: 0 0 auto; opacity: .9; }
.vx-nav button:hover { background: rgba(255,255,255,.055); color: #fff; }
.vx-nav button.on {
  color: #fff; font-weight: 700;
  background: linear-gradient(90deg, rgba(255,45,79,.20), rgba(255,45,79,.07));
  box-shadow: inset 0 0 0 1px rgba(255,45,79,.32);
}
.vx-nav button.on svg { color: #ff7d90; }
.vx-nav .vx-count {
  margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 7px;
  border-radius: 999px; display: inline-grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 10.5px;
  color: var(--vx-ink-2); background: rgba(255,255,255,.07);
}
.vx-nav button.on .vx-count { background: rgba(255,45,79,.24); color: #ffd7de; }
.vx-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; }
.vx-storage {
  border: 1px solid var(--vx-line); border-radius: 13px; padding: 11px 12px 12px;
  background: rgba(255,255,255,.02);
}
.vx-storage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--vx-dim); }
.vx-storage-top b { font-family: 'Space Grotesk', sans-serif; font-size: 11px; color: var(--vx-ink-2); direction: ltr; }
.vx-storage-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); margin-top: 8px; overflow: hidden; }
.vx-storage-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--vx-red), var(--vx-red-2)); box-shadow: 0 0 12px rgba(255,45,79,.6); }
.vx-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.vx-side-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; border-radius: 10px; border: 1px solid var(--vx-line);
  background: rgba(255,255,255,.035); font-size: 12.5px; color: var(--vx-ink-2);
}
.vx-side-btn:hover { background: rgba(255,255,255,.075); color: #fff; }
.vx-side-btn.vx-danger:hover { border-color: rgba(255,45,79,.45); color: #ff9aa9; }

/* ------------------------------------------------------------------- main */
.vx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.vx-top {
  display: flex; align-items: center; gap: 14px;
  min-height: 76px; padding: 14px clamp(16px, 2.4vw, 34px);
  border-bottom: 1px solid var(--vx-line);
  background: rgba(7,5,10,.72);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 30;
}
.vx-burger { display: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--vx-line); place-items: center; }
.vx-crumb { min-width: 0; }
.vx-crumb .vx-hud { font-size: 9.5px; color: rgba(255,255,255,.4); }
.vx-crumb h1 { font-size: clamp(19px, 2vw, 23px); font-weight: 800; letter-spacing: -.01em; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 9px; min-width: 0; }
.vx-top-search {
  display: flex; align-items: center; gap: 9px;
  width: clamp(190px, 26vw, 360px); height: 44px; padding: 0 13px;
  border: 1px solid var(--vx-line); border-radius: 11px; background: rgba(255,255,255,.035);
  color: var(--vx-dim); transition: border-color .16s, background .16s;
}
.vx-top-search:focus-within { border-color: rgba(255,45,79,.45); background: rgba(255,255,255,.06); }
.vx-top-search input { width: 100%; border: 0; outline: 0; background: none; font-size: 14.5px; color: var(--vx-ink); }
.vx-top-search input::placeholder { color: rgba(255,255,255,.35); }
.vx-top-search kbd {
  font-family: 'Space Grotesk', sans-serif; font-size: 9px; color: rgba(255,255,255,.35);
  border: 1px solid var(--vx-line); border-radius: 5px; padding: 2px 5px; direction: ltr;
}
.vx-chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--vx-line); background: rgba(255,255,255,.04);
  font-size: 13.5px; color: var(--vx-ink-2); white-space: nowrap;
}
.vx-chip-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.vx-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 19px; border-radius: 11px;
  background: linear-gradient(135deg, var(--vx-red), #d91f3e);
  color: #fff; font-size: 14.5px; font-weight: 700;
  box-shadow: 0 14px 32px -14px rgba(255,45,79,.85), inset 0 1px 0 rgba(255,255,255,.2);
  transition: filter .16s, transform .16s;
}
.vx-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.vx-primary:disabled { opacity: .5; pointer-events: none; }
.vx-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--vx-line-2); background: rgba(255,255,255,.03);
  font-size: 13.5px; color: var(--vx-ink-2);
}
.vx-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.vx-icon-btn {
  width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center;
  border: 1px solid transparent; color: var(--vx-dim); flex: 0 0 auto;
}
.vx-icon-btn:hover { background: rgba(255,255,255,.07); color: #fff; border-color: var(--vx-line); }
.vx-icon-btn.vx-danger:hover { background: rgba(255,45,79,.12); color: #ff9aa9; }

.vx-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: clamp(18px, 2.6vw, 34px);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}

/* ------------------------------------------------------------------ pages */
.vx-page { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.vx-page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.vx-page-head h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.vx-page-head p { color: var(--vx-dim); font-size: 14.5px; margin-top: 3px; }
.vx-page-head .vx-head-actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.vx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vx-stat {
  border: 1px solid var(--vx-line); border-radius: var(--vx-radius);
  padding: 16px 17px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  position: relative; overflow: hidden;
}
.vx-stat::after {
  content: ''; position: absolute; inset-inline-end: -30px; top: -40px; width: 110px; height: 110px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,45,79,.12), transparent 68%);
  pointer-events: none;
}
.vx-stat .k { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--vx-dim); }
.vx-stat .v { font-size: clamp(23px, 2.4vw, 29px); font-weight: 800; margin-top: 6px; letter-spacing: -.02em; direction: ltr; text-align: start; }
.vx-stat .s { font-size: 12px; color: var(--vx-dim); margin-top: 2px; }
.vx-stat .vx-stat-ic { color: #ff8394; }

.vx-panel {
  border: 1px solid var(--vx-line); border-radius: var(--vx-radius);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  overflow: hidden;
}
.vx-panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--vx-line);
}
.vx-panel-head h3 { font-size: 16px; font-weight: 700; }
.vx-panel-head .vx-sub { font-size: 12.5px; color: var(--vx-dim); }
.vx-panel-head .vx-right { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.vx-panel-body { padding: 18px; }

/* --------------------------------------------------------------- toolbar */
.vx-toolbar { display: flex; flex-direction: column; gap: 12px; }
.vx-toolbar-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.vx-search {
  display: flex; align-items: center; gap: 9px; flex: 1 1 260px; min-width: 200px;
  height: 46px; padding: 0 14px; border: 1px solid var(--vx-line); border-radius: 12px;
  background: rgba(255,255,255,.035); color: var(--vx-dim);
}
.vx-search:focus-within { border-color: rgba(255,45,79,.5); background: rgba(255,255,255,.06); }
.vx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.vx-search .vx-clear { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--vx-dim); }
.vx-search .vx-clear:hover { background: rgba(255,255,255,.09); color: #fff; }
.vx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.vx-filter {
  height: 36px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--vx-line); background: rgba(255,255,255,.025);
  font-size: 12.5px; color: var(--vx-ink-2); display: inline-flex; align-items: center; gap: 6px;
}
.vx-filter:hover { background: rgba(255,255,255,.07); color: #fff; }
.vx-filter.on { background: rgba(255,45,79,.16); border-color: rgba(255,45,79,.45); color: #fff; }
.vx-filter .n { font-family: 'Space Grotesk', sans-serif; font-size: 10px; color: var(--vx-dim); }
.vx-filter.on .n { color: #ffc3cc; }
.vx-toolbar-right { margin-inline-start: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.vx-checkbox {
  width: 18px; height: 18px; border-radius: 5px; appearance: none;
  border: 1.5px solid rgba(255,255,255,.28); background: rgba(0,0,0,.25);
  display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto;
  transition: background .14s, border-color .14s;
}
.vx-checkbox:checked { background: var(--vx-red); border-color: var(--vx-red); }
.vx-checkbox:checked::after { content: '✓'; font-size: 12px; line-height: 1; color: #fff; font-weight: 800; }
.vx-checkbox:indeterminate { background: rgba(255,45,79,.5); border-color: var(--vx-red); }
.vx-checkbox:indeterminate::after { content: '−'; font-size: 13px; line-height: 1; color: #fff; font-weight: 800; }
.vx-select-all { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--vx-dim); padding: 0 6px; }
.vx-viewtoggle { display: inline-flex; border: 1px solid var(--vx-line); border-radius: 9px; overflow: hidden; }
.vx-viewtoggle button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--vx-dim); }
.vx-viewtoggle button.on { background: rgba(255,45,79,.16); color: #ff9aa9; }

.vx-selection {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid rgba(255,45,79,.3); border-radius: 11px;
  background: rgba(255,45,79,.075); font-size: 13px; color: #ffd2d9;
}
.vx-selection b { font-family: 'Space Grotesk', sans-serif; }
.vx-selection .vx-sel-actions { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.vx-selection .vx-mini {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.2);
  font-size: 12px; color: #ffe6ea;
}
.vx-selection .vx-mini:hover { background: rgba(255,255,255,.1); }

/* ---------------------------------------------------------------- file list */
.vx-files-wrap { position: relative; min-height: 280px; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); overflow: hidden; background: rgba(255,255,255,.012); }
.vx-files-wrap.vx-drag { border-color: rgba(255,45,79,.65); background: rgba(255,45,79,.055); box-shadow: inset 0 0 0 1px rgba(255,45,79,.35); }
.vx-drop-veil {
  position: absolute; inset: 0; z-index: 8; display: none; place-items: center; pointer-events: none;
  background: rgba(7,5,10,.82); backdrop-filter: blur(3px);
}
.vx-files-wrap.vx-drag .vx-drop-veil { display: grid; }
.vx-drop-veil div { text-align: center; color: #fff; }
.vx-drop-veil span { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,45,79,.16); box-shadow: inset 0 0 0 1px rgba(255,45,79,.4); color: #ff8fa0; }
.vx-drop-veil b { font-size: 18px; }
.vx-drop-veil p { font-size: 13px; color: var(--vx-dim); margin-top: 4px; }

.vx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vx-table th {
  position: sticky; top: 0; z-index: 2; text-align: start; font-weight: 500;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.42);
  padding: 11px 12px; background: #0d0911; border-bottom: 1px solid var(--vx-line); white-space: nowrap;
}
.vx-table th.vx-sortable { cursor: pointer; }
.vx-table th.vx-sortable:hover { color: #fff; }
.vx-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.055); vertical-align: middle; }
.vx-table tr:last-child td { border-bottom: 0; }
.vx-table tbody tr { transition: background .13s; }
.vx-table tbody tr:hover { background: rgba(255,255,255,.032); }
.vx-table tbody tr.vx-picked { background: rgba(255,45,79,.065); }
.vx-table .vx-col-check { width: 46px; padding-inline-end: 0; }
.vx-table .vx-col-act { width: 150px; }
.vx-table .vx-col-size, .vx-table .vx-col-date, .vx-table .vx-col-type { white-space: nowrap; color: var(--vx-dim); font-size: 12.5px; }
.vx-table .vx-col-size { direction: ltr; text-align: start; }

.vx-file { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vx-fic {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(255,255,255,.055); color: #ffb3bf; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.vx-fic img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.vx-fic.vx-fic-image { color: #7ee0ff; background: rgba(55,190,255,.10); }
.vx-fic.vx-fic-film { color: #c7a6ff; background: rgba(160,110,255,.11); }
.vx-fic.vx-fic-music { color: #6ee7b7; background: rgba(50,220,160,.10); }
.vx-fic.vx-fic-archive { color: #ffc857; background: rgba(255,200,87,.10); }
.vx-fic.vx-fic-code { color: #ff9a76; background: rgba(255,120,70,.10); }
.vx-fic.vx-fic-database { color: #9fb3ff; background: rgba(120,140,255,.10); }
.vx-file-copy { min-width: 0; }
.vx-file-name {
  display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: #fff;
  max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vx-file-name button { display: inline-flex; max-width: 100%; }
.vx-file-name .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-file-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--vx-dim); margin-top: 2px; }
.vx-file-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.3); }
.vx-star { color: rgba(255,255,255,.28); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.vx-star:hover { color: #ffc857; background: rgba(255,200,87,.09); }
.vx-star.on { color: #ffc857; }
.vx-row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; opacity: .45; transition: opacity .14s; }
tr:hover .vx-row-actions { opacity: 1; }
.vx-row-actions button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--vx-dim); }
.vx-row-actions button:hover { background: rgba(255,255,255,.09); color: #fff; }
.vx-row-actions button.vx-danger:hover { background: rgba(255,45,79,.13); color: #ff9aa9; }

/* grid mode */
.vx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; padding: 13px; }
.vx-card {
  position: relative; border: 1px solid var(--vx-line); border-radius: 13px; padding: 13px;
  background: rgba(255,255,255,.025); min-width: 0; transition: border-color .15s, background .15s, transform .15s;
}
.vx-card:hover { border-color: rgba(255,45,79,.34); background: rgba(255,255,255,.045); transform: translateY(-1px); }
.vx-card.vx-picked { border-color: rgba(255,45,79,.55); background: rgba(255,45,79,.07); }
.vx-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vx-card .vx-fic { width: 46px; height: 46px; }
.vx-card-name { font-size: 13.5px; font-weight: 600; color: #fff; margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-card-meta { font-size: 11px; color: var(--vx-dim); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.vx-card-act { display: flex; gap: 2px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.055); }
.vx-card-act button { flex: 1; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--vx-dim); }
.vx-card-act button:hover { background: rgba(255,255,255,.08); color: #fff; }
.vx-card-act button.vx-danger:hover { color: #ff9aa9; background: rgba(255,45,79,.1); }

.vx-empty { display: grid; place-items: center; text-align: center; padding: 64px 20px; color: var(--vx-dim); }
.vx-empty .ic { width: 66px; height: 66px; border-radius: 19px; display: grid; place-items: center; color: #ff8fa0; background: rgba(255,45,79,.09); box-shadow: inset 0 0 0 1px rgba(255,45,79,.22); margin-bottom: 14px; }
.vx-empty b { color: #fff; font-size: 17px; display: block; }
.vx-empty p { font-size: 13.5px; margin-top: 4px; max-width: 44ch; }
.vx-empty .vx-primary { margin-top: 16px; }
.vx-loader { display: grid; place-items: center; min-height: 220px; color: var(--vx-dim); gap: 10px; font-size: 13.5px; }
.vx-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.13); border-top-color: var(--vx-red);
  animation: vxSpin .7s linear infinite;
}
@keyframes vxSpin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- overview */
.vx-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.vx-welcome {
  border: 1px solid var(--vx-line); border-radius: var(--vx-radius); padding: 22px;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(255,45,79,.14), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  position: relative; overflow: hidden;
}
.vx-welcome .vx-hud { color: #ff8fa0; }
.vx-welcome h2 { font-size: clamp(23px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; margin-top: 7px; }
.vx-welcome p { color: var(--vx-dim); font-size: 14px; margin-top: 5px; max-width: 55ch; }
.vx-welcome .vx-welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 17px; }

.vx-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.vx-quick button {
  display: flex; align-items: center; gap: 10px; text-align: start;
  border: 1px solid var(--vx-line); border-radius: 12px; padding: 12px;
  background: rgba(255,255,255,.022);
}
.vx-quick button:hover { background: rgba(255,255,255,.055); border-color: var(--vx-line-2); }
.vx-quick .vx-fic { width: 36px; height: 36px; border-radius: 9px; }
.vx-quick b { display: block; font-size: 13px; color: #fff; }
.vx-quick span { display: block; font-size: 11px; color: var(--vx-dim); margin-top: 1px; }

.vx-activity { display: flex; flex-direction: column; }
.vx-activity-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.vx-activity-item:last-child { border-bottom: 0; }
.vx-activity-item .vx-fic { width: 36px; height: 36px; border-radius: 9px; }
.vx-activity-copy { min-width: 0; flex: 1; }
.vx-activity-copy b { display: block; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-activity-copy span { font-size: 11px; color: var(--vx-dim); }

.vx-check-list { display: flex; flex-direction: column; gap: 2px; }
.vx-check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 13px; }
.vx-check-row:last-child { border-bottom: 0; }
.vx-check-row .ok, .vx-check-row .warn { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.vx-check-row .ok { color: var(--vx-ok); background: rgba(72,223,160,.1); }
.vx-check-row .warn { color: var(--vx-warn); background: rgba(255,200,87,.1); }
.vx-check-row .txt { flex: 1; color: var(--vx-ink-2); }
.vx-check-row button { color: #ff8fa0; font-size: 12px; }
.vx-check-row button:hover { text-decoration: underline; }

/* -------------------------------------------------------------- uploads */
.vx-drop {
  border: 1.5px dashed rgba(255,255,255,.22); border-radius: 18px;
  padding: clamp(26px, 4vw, 46px); text-align: center;
  background: radial-gradient(420px 180px at 50% 0%, rgba(255,45,79,.07), transparent 70%), rgba(255,255,255,.014);
  transition: border-color .18s, background .18s;
}
.vx-drop.hot { border-color: rgba(255,45,79,.65); background: rgba(255,45,79,.06); }
.vx-drop .big {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 20px;
  display: grid; place-items: center; color: #ff9aa9;
  background: rgba(255,45,79,.12); box-shadow: inset 0 0 0 1px rgba(255,45,79,.3), 0 18px 40px -24px rgba(255,45,79,.8);
}
.vx-drop h3 { font-size: 19px; font-weight: 800; }
.vx-drop p { color: var(--vx-dim); font-size: 13.5px; margin-top: 4px; }
.vx-drop .vx-drop-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 17px; }
.vx-drop small { display: block; margin-top: 13px; color: rgba(255,255,255,.35); font-size: 11.5px; }

.vx-queue-list { display: flex; flex-direction: column; }
.vx-qitem { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.vx-qitem:last-child { border-bottom: 0; }
.vx-qitem .vx-fic { width: 40px; height: 40px; }
.vx-qcopy { min-width: 0; }
.vx-qname { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-qmeta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--vx-dim); margin-top: 3px; }
.vx-qbar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); margin-top: 7px; overflow: hidden; }
.vx-qbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--vx-red), var(--vx-red-2)); transition: width .2s; }
.vx-qitem.done .vx-qbar i { background: var(--vx-ok); }
.vx-qitem.error .vx-qbar i { background: var(--vx-err); }
.vx-qacts { display: flex; gap: 2px; }
.vx-qacts button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--vx-dim); }
.vx-qacts button:hover { background: rgba(255,255,255,.08); color: #fff; }
.vx-qacts button.vx-danger:hover { color: #ff9aa9; background: rgba(255,45,79,.1); }
.vx-qstate { font-size: 11px; color: var(--vx-dim); }
.vx-qitem.error .vx-qstate { color: var(--vx-err); }
.vx-qitem.done .vx-qstate { color: var(--vx-ok); }

/* floating queue */
.vx-float {
  position: fixed; inset-inline-end: 24px; bottom: 22px; z-index: 60;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--vx-line-2); border-radius: 15px; overflow: hidden;
  background: rgba(14,9,17,.96); backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px -25px #000, 0 0 0 1px rgba(255,45,79,.09);
  display: none;
}
.vx-float.show { display: block; animation: vxFloatIn .22s ease; }
@keyframes vxFloatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vx-float-head { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--vx-line); cursor: pointer; }
.vx-float-head b { font-size: 13px; }
.vx-float-head .vx-hud { font-size: 9px; color: #ff8fa0; }
.vx-float-head .vx-icon-btn { margin-inline-start: auto; width: 30px; height: 30px; }
.vx-float-body { max-height: 230px; overflow-y: auto; padding: 4px 13px; display: none; }
.vx-float.open .vx-float-body { display: block; }
.vx-float .vx-qitem { grid-template-columns: 34px minmax(0,1fr) auto; padding: 8px 0; }
.vx-float .vx-fic { width: 34px; height: 34px; border-radius: 8px; }
.vx-float .vx-qbar { margin-top: 5px; }
.vx-float-foot { padding: 8px 13px; border-top: 1px solid var(--vx-line); display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--vx-dim); }
.vx-float-foot .vx-mini { margin-inline-start: auto; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--vx-line); font-size: 11px; }
.vx-float-foot .vx-mini:hover { background: rgba(255,255,255,.08); color: #fff; }

/* --------------------------------------------------------------- devices */
.vx-device-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vx-device-table th { text-align: start; padding: 10px 12px; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.42); border-bottom: 1px solid var(--vx-line); font-weight: 500; white-space: nowrap; }
.vx-device-table td { padding: 13px 12px; border-bottom: 1px solid rgba(255,255,255,.055); vertical-align: middle; }
.vx-device-table tr:last-child td { border-bottom: 0; }
.vx-device-table tr.current { background: rgba(255,45,79,.045); }
.vx-device-name { display: flex; align-items: center; gap: 10px; }
.vx-device-name .vx-fic { width: 38px; height: 38px; border-radius: 9px; }
.vx-device-name b { display: block; font-size: 13.5px; color: #fff; font-weight: 600; }
.vx-device-name span { font-size: 11px; color: var(--vx-dim); }
.vx-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 9px;
  border-radius: 99px; font-size: 10.5px; letter-spacing: .03em;
  border: 1px solid var(--vx-line); color: var(--vx-dim); background: rgba(255,255,255,.03);
  white-space: nowrap;
}
.vx-pill.ok { color: var(--vx-ok); border-color: rgba(72,223,160,.28); background: rgba(72,223,160,.08); }
.vx-pill.warn { color: var(--vx-warn); border-color: rgba(255,200,87,.28); background: rgba(255,200,87,.08); }
.vx-pill.red { color: #ff9aa9; border-color: rgba(255,45,79,.32); background: rgba(255,45,79,.09); }

.vx-security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.vx-mini-card { border: 1px solid var(--vx-line); border-radius: 13px; padding: 16px; background: rgba(255,255,255,.022); display: flex; flex-direction: column; gap: 8px; }
.vx-mini-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vx-mini-card .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #ff9aa9; background: rgba(255,45,79,.1); box-shadow: inset 0 0 0 1px rgba(255,45,79,.2); }
.vx-mini-card h4 { font-size: 14.5px; font-weight: 700; }
.vx-mini-card p { font-size: 12.5px; color: var(--vx-dim); }
.vx-mini-card .vx-ghost { align-self: flex-start; margin-top: 2px; }

/* ---------------------------------------------------------------- shares */
.vx-share-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.vx-share-card { border: 1px solid var(--vx-line); border-radius: 14px; padding: 15px; background: rgba(255,255,255,.024); display: flex; flex-direction: column; gap: 11px; }
.vx-share-card.expired { opacity: .62; }
.vx-share-top { display: flex; align-items: flex-start; gap: 10px; }
.vx-share-top .vx-fic { width: 42px; height: 42px; }
.vx-share-name { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-share-sub { font-size: 11.5px; color: var(--vx-dim); margin-top: 2px; }
.vx-share-policies { display: flex; gap: 5px; flex-wrap: wrap; }
.vx-share-url { display: flex; gap: 6px; }
.vx-share-url input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--vx-line); border-radius: 8px; background: rgba(0,0,0,.28); padding: 0 10px; font-family: 'Space Grotesk', monospace; font-size: 10.5px; color: var(--vx-ink-2); direction: ltr; }
.vx-share-url button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--vx-line); display: grid; place-items: center; color: var(--vx-dim); }
.vx-share-url button:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ----------------------------------------------------------------- modal */
.vx-modal-bg {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
  background: rgba(4,2,6,.72); backdrop-filter: blur(7px); padding: 18px;
  animation: vxFade .18s ease;
}
@keyframes vxFade { from { opacity: 0; } to { opacity: 1; } }
.vx-modal {
  width: min(560px, 100%); max-height: min(88dvh, 900px); overflow-y: auto;
  border: 1px solid var(--vx-line-2); border-radius: 19px;
  background: linear-gradient(180deg, #171019, #0e0911);
  box-shadow: 0 40px 100px -40px #000;
  color: var(--vx-ink);
  animation: vxModalIn .2s ease;
}
@keyframes vxModalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.vx-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 19px 20px 0; }
.vx-modal-head .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #ff9aa9; background: rgba(255,45,79,.12); box-shadow: inset 0 0 0 1px rgba(255,45,79,.26); flex: 0 0 auto; }
.vx-modal-head h2 { font-size: 18.5px; font-weight: 800; }
.vx-modal-head p { font-size: 12.5px; color: var(--vx-dim); margin-top: 2px; }
.vx-modal-head .vx-icon-btn { margin-inline-start: auto; }
.vx-modal-body { padding: 17px 20px 4px; }
.vx-shell input[type="radio"], .vx-shell input[type="checkbox"],
.vx-modal input[type="radio"], .vx-modal input[type="checkbox"] { accent-color: var(--vx-red); }
.vx-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; flex-wrap: wrap; }
.vx-field { margin-bottom: 13px; }
.vx-field > label { display: block; font-size: 12.5px; color: #c7b4bd; margin-bottom: 6px; }
.vx-input, .vx-select, .vx-textarea {
  width: 100%; height: 44px; border: 1px solid var(--vx-line); border-radius: 10px;
  background: rgba(0,0,0,.26); padding: 0 12px; font-size: 14px; color: var(--vx-ink);
  outline: none;
}
.vx-textarea { height: auto; min-height: 86px; padding: 10px 12px; resize: vertical; }
.vx-input:focus, .vx-select:focus, .vx-textarea:focus { border-color: rgba(255,45,79,.5); }
.vx-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #a18d97 50%), linear-gradient(135deg, #a18d97 50%, transparent 50%); background-position: calc(12px + 2px) 20px, 17px 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 30px; }
.vx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vx-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vx-choice label {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  border: 1px solid var(--vx-line); border-radius: 11px; padding: 11px;
  background: rgba(255,255,255,.02); font-size: 12.5px; color: var(--vx-ink-2);
}
.vx-choice label:has(input:checked) { border-color: rgba(255,45,79,.5); background: rgba(255,45,79,.07); color: #fff; }
.vx-choice input { margin-top: 3px; accent-color: var(--vx-red); }
.vx-choice b { display: block; font-size: 13px; color: #fff; }
.vx-summary { border: 1px solid rgba(255,255,255,.11); border-radius: 11px; padding: 11px 13px; background: rgba(0,0,0,.22); font-size: 12px; color: var(--vx-ink-2); display: flex; flex-direction: column; gap: 5px; margin-top: 3px; }
.vx-summary div { display: flex; justify-content: space-between; gap: 12px; }
.vx-summary div span:last-child { color: #fff; text-align: end; }
.vx-summary .vx-warn-line { color: #ffc857; justify-content: flex-start; display: flex; gap: 6px; align-items: flex-start; }
.vx-share-done { text-align: center; padding: 14px 0 6px; }
.vx-share-done .okmark { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--vx-ok); background: rgba(72,223,160,.1); box-shadow: inset 0 0 0 1px rgba(72,223,160,.25); }
.vx-share-done h3 { font-size: 17px; }
.vx-share-done p { font-size: 12.5px; color: var(--vx-dim); margin-top: 3px; }
.vx-share-done .vx-share-url { margin-top: 12px; }

/* ---------------------------------------------------------------- settings */
.vx-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.vx-card-box { border: 1px solid var(--vx-line); border-radius: 14px; background: rgba(255,255,255,.022); overflow: hidden; }
.vx-card-box > .head { padding: 14px 16px; border-bottom: 1px solid var(--vx-line); display: flex; align-items: center; gap: 9px; }
.vx-card-box > .head h3 { font-size: 15px; font-weight: 700; }
.vx-card-box > .body { padding: 16px; }
.vx-card-box p { font-size: 12.5px; color: var(--vx-dim); }
.vx-lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; }
.vx-lang-grid button {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--vx-line); border-radius: 9px; background: rgba(255,255,255,.025);
  font-size: 12.5px; color: var(--vx-ink-2); text-align: start;
}
.vx-lang-grid button:hover { background: rgba(255,255,255,.07); color: #fff; }
.vx-lang-grid button.on { border-color: rgba(255,45,79,.5); background: rgba(255,45,79,.1); color: #fff; }

/* --------------------------------------------------------------- lightbox */
.vx-light { position: fixed; inset: 0; z-index: 130; display: grid; grid-template-rows: auto 1fr auto; background: rgba(3,2,5,.94); backdrop-filter: blur(9px); animation: vxFade .16s ease; }
.vx-light-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; color: var(--vx-ink-2); font-size: 13px; }
.vx-light-head .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-light-head .vx-icon-btn { margin-inline-start: auto; }
.vx-light-body { display: grid; place-items: center; padding: 0 56px 10px; min-height: 0; }
.vx-light-body img, .vx-light-body video { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px -30px #000; background: #000; }
.vx-light-body audio { width: min(560px, 90vw); }
.vx-light-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.vx-light-nav:hover { background: rgba(255,255,255,.18); }
.vx-light-nav.prev { inset-inline-start: 16px; }
.vx-light-nav.next { inset-inline-end: 16px; }
.vx-light-foot { padding: 12px 18px 16px; display: flex; justify-content: center; gap: 8px; }

/* ---------------------------------------------------------------- toasts */
.vx-toast { position: fixed; inset-inline-start: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; max-width: min(520px, calc(100vw - 32px)); padding: 11px 18px; border-radius: 11px; background: #1b111d; border: 1px solid var(--vx-line-2); color: #fff; font: 13px/1.5 'Tajawal', sans-serif; box-shadow: 0 20px 50px -20px #000; animation: vxToast .2s ease; }
.vx-toast.ok { border-color: rgba(72,223,160,.4); }
.vx-toast.err { border-color: rgba(255,45,79,.5); }
@keyframes vxToast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .vx-side { width: 238px; flex-basis: 238px; }
  .vx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-overview { grid-template-columns: 1fr; }
  .vx-settings { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  body.in-vault { overflow: auto; }
  .vx-shell { min-height: 100dvh; }
  .vx-side {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(290px, 86vw);
    flex-basis: auto; height: 100dvh;
    transform: translateX(calc(-100% * var(--vx-dir, 1)));
    transition: transform .22s ease; box-shadow: 0 0 80px #000;
  }
  html[dir="rtl"] .vx-side { --vx-dir: -1; }
  html[dir="ltr"] .vx-side { --vx-dir: 1; }
  .vx-side.open { transform: translateX(0); }
  .vx-side-back { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); display: none; }
  .vx-side-back.show { display: block; }
  .vx-burger { display: grid; }
  .vx-main { height: auto; min-height: 100dvh; }
  .vx-content { overflow: visible; padding-bottom: 90px; }
  .vx-top { min-height: 66px; padding: 10px 14px; }
  .vx-top-search { width: auto; flex: 1 1 150px; min-width: 0; }
  .vx-top-search kbd { display: none; }
  .vx-top-actions .vx-primary span { display: none; }
  .vx-top-actions .vx-primary { width: 46px; padding: 0; }
  .vx-float { inset-inline: 12px; bottom: 12px; width: auto; }
}
@media (max-width: 760px) {
  .vx-page { gap: 14px; }
  .vx-toolbar-right { width: 100%; margin-inline-start: 0; }
  .vx-toolbar-right .vx-primary { margin-inline-start: auto; }
  .vx-table .vx-col-type, .vx-table .vx-col-size, .vx-table .vx-col-date { display: none; }
  .vx-table td { padding: 10px 8px; }
  .vx-table th { padding: 9px 8px; }
  .vx-table .vx-col-act { width: 92px; }
  .vx-row-actions { gap: 0; opacity: 1; }
  .vx-row-actions button { width: 30px; height: 30px; }
  .vx-row-actions .vx-desktop-only { display: none; }
  .vx-file-name { max-width: 34vw; }
  .vx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 9px; }
  .vx-card-name { font-size: 12.5px; }
  .vx-choice { grid-template-columns: 1fr; }
  .vx-row2 { grid-template-columns: 1fr; }
  .vx-light-body { padding: 0 10px; }
  .vx-light-nav { width: 40px; height: 40px; }
  .vx-light-nav.prev { inset-inline-start: 6px; }
  .vx-light-nav.next { inset-inline-end: 6px; }
  .vx-share-list { grid-template-columns: 1fr; }
  .vx-device-table .vx-opt { display: none; }
  .vx-page-head h2 { font-size: 22px; }
  .vx-stat .v { font-size: 22px; }
}
@media (max-width: 440px) {
  .vx-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vx-stat { padding: 12px; }
  .vx-stat .v { font-size: 19px; }
  .vx-stat .k { font-size: 11px; }
  .vx-toolbar-row { gap: 7px; }
  .vx-filter { height: 33px; padding: 0 10px; font-size: 11.5px; }
  .vx-crumb .vx-hud { display: none; }
  .vx-crumb h1 { font-size: 17px; }
  .vx-top { gap: 8px; }
  .vx-top-search { height: 40px; }
  .vx-top-actions .vx-chip-btn { display: none; }
}

/* ================================================================ share page
   Public recipient page (/s/<token>). Kept outside the vault shell. */
.share-page {
  min-height: 100dvh; margin: 0; padding: 24px;
  display: grid; place-items: center;
  background:
    radial-gradient(800px 500px at 85% -10%, rgba(255,45,79,.12), transparent 62%),
    #07050a;
  color: #f6eef2; font: 15px/1.65 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}
.share-card {
  width: min(500px, 100%); border: 1px solid rgba(255,255,255,.14); border-radius: 20px;
  background: linear-gradient(180deg, #171019, #0d0910); box-shadow: 0 40px 100px -40px #000;
  padding: 24px;
}
.share-brand { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .2em; color: rgba(255,255,255,.45); direction: ltr; }
.share-brand b { color: #ff2d4f; }
.share-icon { width: 54px; height: 54px; margin: 20px 0 14px; border-radius: 15px; display: grid; place-items: center; color: #ff9aa9; background: rgba(255,45,79,.12); box-shadow: inset 0 0 0 1px rgba(255,45,79,.25); }
.share-card h1 { font-size: 21px; margin: 0 0 5px; }
.share-card p { color: #bda9b2; font-size: 13.5px; margin: 0; }
.share-name { margin-top: 16px; padding: 12px 13px; border-radius: 11px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.28); display: flex; align-items: center; gap: 10px; }
.share-name-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #ff9aa9; background: rgba(255,45,79,.1); }
.share-name b { min-width: 0; flex: 1; font-size: 14.5px; font-weight: 700; line-height: 1.35; word-break: break-word; unicode-bidi: plaintext; }
.share-name-size { flex: 0 0 auto; font-size: 11.5px; color: #bda9b2; }
.share-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.share-pill { font-size: 11px; padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); color: #cbb8c1; }
.share-card label { display: block; font-size: 12px; color: #bda9b2; margin-top: 14px; }
.share-card input { width: 100%; height: 46px; margin-top: 5px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(0,0,0,.3); color: #fff; padding: 0 12px; font: inherit; }
.share-btn { width: 100%; height: 50px; margin-top: 16px; border: 0; border-radius: 11px; background: linear-gradient(135deg,#ff2d4f,#d91f3e); color: #fff; font: 700 15px inherit; cursor: pointer; }
.share-btn:disabled { opacity: .5; cursor: default; }
.share-btn.ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); font-weight: 500; }
.share-status { margin-top: 12px; font-size: 12.5px; min-height: 20px; color: #9fe8c3; }
.share-status.err { color: #ff9aab; }
.share-progress { height: 5px; border-radius: 99px; background: rgba(255,255,255,.09); margin-top: 12px; overflow: hidden; display: none; }
.share-progress.show { display: block; }
.share-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#ff2d4f,#ff5c3d); transition: width .2s; }
.share-foot { margin-top: 18px; font-size: 11px; color: rgba(255,255,255,.34); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ============================================================== legal pages
   Standalone /legal.html. Same dark surface as the share page, but built for
   long-form reading: wider measure, calmer contrast, no decorative noise. */
.legal-page {
  min-height: 100dvh; margin: 0; padding: 0;
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(255,45,79,.10), transparent 60%),
    #07050a;
  color: #f6eef2;
  font: 15px/1.75 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}
.legal-app { max-width: 880px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 34px) 64px; }
.legal-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.legal-brand { display: inline-flex; align-items: center; gap: 8px; font: 700 13px/1 'Space Grotesk', sans-serif; letter-spacing: .18em; color: rgba(255,255,255,.5); text-decoration: none; direction: ltr; }
.legal-brand b { color: #ff2d4f; }
.legal-brand span { color: rgba(255,255,255,.72); }
.legal-head-right { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.legal-lang { height: 38px; min-width: 128px; padding: 0 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(255,255,255,.05); color: #eadde2; font: inherit; font-size: 13px; }
.legal-lang option { background: #160e1b; color: #f6eef2; }
.legal-home { display: inline-grid; place-items: center; height: 38px; padding: 0 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: #eadde2; text-decoration: none; font-size: 13px; }
.legal-home:hover { background: rgba(255,255,255,.07); }
.legal-eyebrow { margin: 30px 0 6px; font: 600 10.5px/1 'Space Grotesk', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #ff7d90; }
.legal-wrap h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 37px); line-height: 1.25; letter-spacing: -.015em; }
.legal-lead { margin: 0 0 14px; font-size: 15px; color: #c9b8c0; max-width: 72ch; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 22px; font-size: 12px; color: rgba(255,255,255,.46); }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 0 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.legal-tab { flex: 0 0 auto; padding: 8px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 99px; color: #c5b2bb; text-decoration: none; font-size: 12.5px; line-height: 1.3; }
.legal-tab:hover { background: rgba(255,255,255,.06); color: #fff; }
.legal-tab.on { background: rgba(255,45,79,.16); border-color: rgba(255,45,79,.42); color: #fff; font-weight: 600; }
.legal-body { padding-top: 8px; }
.legal-block h2 { margin: 26px 0 7px; font-size: 17px; line-height: 1.45; letter-spacing: -.005em; }
.legal-block p { margin: 0 0 10px; color: #cfc0c7; }
.legal-block ul { margin: 4px 0 14px; padding-inline-start: 22px; color: #cfc0c7; }
.legal-block li { margin: 5px 0; }
.legal-block li::marker { color: #ff6b7d; }
.legal-block a { color: #ff9aa9; }
.legal-notes { margin-top: 34px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.028); }
.legal-note { margin: 0 0 8px; font-size: 12px; line-height: 1.65; color: rgba(255,255,255,.55); }
.legal-note:last-child { margin-bottom: 0; }
.legal-note a { color: #ff9aa9; }
.legal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11.5px; color: rgba(255,255,255,.36); }
.legal-print { border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 6px 12px; background: none; color: #c5b2bb; font: inherit; font-size: 12px; cursor: pointer; }
.legal-print:hover { background: rgba(255,255,255,.06); color: #fff; }

@media (max-width: 560px) {
  .legal-app { padding-bottom: 42px; }
  .legal-head-right { width: 100%; margin-inline-start: 0; }
  .legal-lang { flex: 1; min-width: 0; }
  .legal-lead { font-size: 14px; }
  .legal-block h2 { margin-top: 22px; font-size: 16px; }
}
@media print {
  .legal-page { background: #fff; color: #111; }
  .legal-head, .legal-tabs, .legal-print, .legal-notes { display: none; }
  .legal-app { max-width: none; padding: 0; }
  .legal-wrap h1, .legal-block h2 { color: #111; }
  .legal-block p, .legal-block ul, .legal-lead { color: #222; }
  .legal-meta { color: #555; }
}

/* ============================================================ consent gate
   First visit and signup. Sits above the topbar; the accept button stays
   disabled until the unchecked box is ticked, so nothing is pre-consented. */
.rv-consent-bg {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center;
  padding: 16px; background: rgba(3,1,5,.84); backdrop-filter: blur(9px);
  animation: rvConsentFade .18s ease;
}
@keyframes rvConsentFade { from { opacity: 0; } to { opacity: 1; } }
.rv-consent {
  width: min(620px, 100%); max-height: min(90dvh, 760px); overflow: auto;
  border: 1px solid rgba(255,255,255,.16); border-radius: 20px;
  background: linear-gradient(180deg, #191119, #0d0910);
  box-shadow: 0 44px 120px -40px #000;
  padding: 26px; color: #f6eef2;
  font: 15px/1.7 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}
.rv-consent-eyebrow { margin: 0 0 8px; font: 600 10.5px/1 'Space Grotesk', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #ff7d90; }
.rv-consent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.rv-consent-head .rv-consent-eyebrow { margin: 0; }
.rv-consent-lang { flex: 0 0 auto; }
.rv-consent-lang select {
  height: 30px; max-width: 150px; padding: 0 9px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2); background: #120d13;
  color: #f6eef2; font: 500 12px 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
}
.rv-consent-lang select:focus-visible { outline: 2px solid #ff2d4f; outline-offset: 2px; }
.rv-consent h2 { margin: 0 0 10px; font-size: clamp(21px, 3.6vw, 26px); line-height: 1.3; }
.rv-consent p { margin: 0 0 12px; color: #cfc0c7; font-size: 15px; }
.rv-consent ul { margin: 0 0 16px; padding-inline-start: 20px; color: #cfc0c7; font-size: 14.5px; }
.rv-consent li { margin: 5px 0; }
.rv-consent li::marker { color: #ff6b7d; }
.rv-consent-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.rv-consent-links a { padding: 6px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; color: #e9dde2; font-size: 12.5px; text-decoration: none; }
.rv-consent-links a:hover { background: rgba(255,255,255,.07); }
.rv-consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.03); font-size: 14.5px; color: #e4d6dc; cursor: pointer; }
.rv-consent-check input { width: 19px; height: 19px; margin: 2px 0 0; flex: 0 0 auto; accent-color: #ff2d4f; cursor: pointer; }
.rv-consent-check b { color: #fff; }
.rv-consent-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-consent-btn { height: 46px; padding: 0 22px; border: 0; border-radius: 11px; background: linear-gradient(135deg,#ff2d4f,#d91f3e); color: #fff; font: 700 14.5px inherit; cursor: pointer; }
.rv-consent-btn:disabled { opacity: .45; cursor: not-allowed; }
.rv-consent-err { flex: 1 1 100%; min-height: 17px; font-size: 12px; color: #ff9aab; }
.rv-consent-note { margin: 14px 0 0; font-size: 11.5px; color: rgba(255,255,255,.4); }
@media (max-width: 520px) {
  .rv-consent { padding: 20px; border-radius: 17px; }
  .rv-consent p { font-size: 14px; }
  .rv-consent ul { font-size: 14px; padding-inline-start: 18px; }
  .rv-consent-btn { width: 100%; }
}

/* Settings: legal document links */
.vx-legal-links { display: flex; gap: 7px; flex-wrap: wrap; }
.vx-legal-links a {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 13px; border: 1px solid var(--vx-line-2);
  border-radius: 9px; color: var(--vx-ink-2); text-decoration: none; font-size: 12.5px;
}
.vx-legal-links a:hover { background: rgba(255,255,255,.06); color: #fff; }

/* ============================================================ cinematic sign-in
   The ASTRA-style entry screen: fixed starfield (future-fx.js), aurora wash,
   glass card. Everything is scoped to body.auth-mode so the vault and the
   landing page are untouched. */
body.auth-mode {
  background-color: #05030a;
  background-image:
    radial-gradient(900px 560px at 90% -8%, rgba(255, 49, 83, .16), transparent 64%),
    radial-gradient(820px 520px at 6% 8%, rgba(131, 236, 247, .07), transparent 62%),
    radial-gradient(760px 620px at 50% 112%, rgba(255, 61, 138, .10), transparent 66%);
}
body.auth-mode #view { max-width: none; width: 100%; margin: 0; padding: 0; }
body.auth-mode .topbar {
  position: absolute; inset-inline: 0; top: 0; z-index: 60;
  background: transparent; border-bottom: 0; backdrop-filter: none;
  padding: 14px 18px;
}
body.auth-mode .topbar::after { display: none; }
body.auth-mode .topbar .brand { opacity: 0; pointer-events: none; }
body.auth-mode .topbar-right { margin-inline-start: auto; }
body.auth-mode .lang-switch {
  background: rgba(12, 8, 14, .7);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
}
body.auth-mode #navLogin {
  background: rgba(12, 8, 14, .7);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #e7dbe1;
  backdrop-filter: blur(12px);
}

.auth-stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(56px, 7vh, 88px) 16px 20px;
  isolation: isolate;
  /* The aurora bleeds past the stage on purpose; clip it so the decorative
     overshoot never creates a phantom scrollbar. */
  overflow: clip;
}
.auth-aurora {
  position: absolute; inset: -18%; z-index: -1;
  background:
    radial-gradient(38% 34% at 20% 28%, rgba(131, 236, 247, .20), transparent 70%),
    radial-gradient(42% 38% at 82% 30%, rgba(255, 61, 138, .24), transparent 72%),
    radial-gradient(46% 40% at 52% 88%, rgba(255, 49, 83, .16), transparent 74%);
  filter: blur(56px) saturate(120%);
  opacity: .85;
  animation: authDrift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes authDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}
.auth-vignette {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 34%, rgba(5, 3, 10, .72) 88%),
    linear-gradient(180deg, rgba(5, 3, 10, .35), transparent 22%, transparent 78%, rgba(5, 3, 10, .55));
}
.auth-wrap {
  position: relative; z-index: 2;
  width: min(440px, 100%);
  text-align: center;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.auth-emblem {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 16px;
  color: #ff8ea0;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 92, 61, .28), transparent 62%),
    linear-gradient(150deg, #200812 0%, #070305 82%);
  border: 1px solid rgba(255, 69, 96, .5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05) inset, 0 0 38px rgba(255, 45, 79, .32), 0 18px 40px -20px #000;
}
.auth-emblem svg { filter: drop-shadow(0 0 8px rgba(255, 69, 96, .7)); }
.auth-word {
  font-family: 'Space Grotesk', 'Tajawal', sans-serif;
  font-weight: 800; font-size: clamp(21px, 4.6vw, 26px);
  letter-spacing: .16em; line-height: 1;
  direction: ltr; unicode-bidi: isolate;
}
.auth-word .red { color: #ff4560; text-shadow: 0 0 24px rgba(255, 69, 96, .55); }
.auth-word .vault { color: #f7eef2; }
.auth-word .ultra {
  background: linear-gradient(120deg, #ff5c3d 0%, #ff3d8a 55%, #c9122b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-est {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8px; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255, 255, 255, .34);
  direction: ltr; unicode-bidi: isolate;
}
.auth-tagline {
  margin: 10px 0 14px;
  color: #e3d4da; font-size: 14.5px; line-height: 1.55;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .6);
}

.auth-card {
  position: relative;
  text-align: start;
  padding: 17px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(168deg, rgba(29, 17, 26, .86) 0%, rgba(11, 7, 14, .92) 62%, rgba(9, 6, 12, .95) 100%);
  box-shadow:
    0 44px 120px -44px #000,
    0 0 0 1px rgba(255, 255, 255, .035) inset,
    0 1px 0 rgba(255, 255, 255, .07) inset,
    0 0 60px -28px rgba(255, 45, 79, .4);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; inset-inline: 14%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 92, 61, .8), rgba(255, 61, 138, .75), transparent);
  opacity: .9;
}
.auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.auth-head-ic {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; color: #ff93a4;
  background: rgba(255, 45, 79, .1);
  border: 1px solid rgba(255, 45, 79, .34);
  box-shadow: 0 0 26px -6px rgba(255, 45, 79, .45);
}
.auth-head h2 {
  margin: 0; font-family: 'Tajawal', 'Segoe UI', sans-serif;
  font-size: 21px; font-weight: 700; line-height: 1.25; color: #fbf2f5;
}
.auth-head p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: #b9a3ad; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin: 0 0 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
}
.auth-tabs .tab {
  height: 36px; border: 0; border-radius: 9px;
  background: transparent; color: #b39da8;
  font: 600 13px 'Tajawal', 'Segoe UI', sans-serif;
}
.auth-tabs .tab:hover { color: #fff; }
.auth-tabs .tab.active {
  color: #fff;
  background: linear-gradient(135deg, #ff2d4f, #d91f3e);
  box-shadow: 0 8px 20px -10px rgba(255, 45, 79, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.auth-form-inner { display: grid; gap: 10px; }
.auth-form .af { display: block; margin: 0; font-size: 12px; color: #b9a3ad; }
.auth-form .af-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 0 2px 5px; font-weight: 600; letter-spacing: .15px; color: #cbb8c0;
}
.auth-form .af-label em { font-style: normal; font-weight: 500; color: #8d7682; }
.auth-form .af-box {
  display: flex; align-items: center; gap: 9px;
  height: 45px; padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .135);
  background: rgba(8, 5, 10, .75);
  color: #9c8590;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-form .af-box:focus-within {
  border-color: #ff3d58;
  background: rgba(13, 8, 15, .92);
  box-shadow: 0 0 0 3px rgba(255, 45, 79, .16), 0 0 30px -10px rgba(255, 45, 79, .65);
}
.auth-form .af-box > svg { flex: 0 0 auto; opacity: .8; }
.auth-form .af-box input {
  flex: 1 1 auto; width: 100%; height: 100%; min-width: 0;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: #f9f0f3;
  font: 500 15px 'Tajawal', 'Segoe UI', sans-serif;
  outline: none;
}
.auth-form .af-box input::placeholder { color: #7d6672; }
.auth-form .af-box input:-webkit-autofill,
.auth-form .af-box input:-webkit-autofill:hover,
.auth-form .af-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f9f0f3;
  -webkit-box-shadow: 0 0 0 60px #0a060d inset;
  caret-color: #f9f0f3;
}
.auth-form .af-eye {
  flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: #a68f9a;
}
.auth-form .af-eye:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.auth-form .af-warn {
  display: flex; align-items: center; gap: 6px;
  margin: 7px 2px 0; color: #ffc857; font-size: 11.5px;
}
.auth-form .af-adv {
  margin: 0; padding-top: 11px;
  border-top: 1px dashed rgba(255, 255, 255, .09);
}
.auth-form .af-adv summary {
  display: flex; align-items: center; gap: 6px;
  list-style: none; cursor: pointer;
  color: #9d8792; font-size: 12px; font-weight: 600;
}
.auth-form .af-adv summary::-webkit-details-marker { display: none; }
.auth-form .af-adv summary:hover { color: #e8dce1; }
.auth-form .af-adv[open] summary { color: #e8dce1; }
.auth-open {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0; padding: 10px 12px;
  border: 1px solid rgba(72, 223, 160, .25);
  border-radius: 10px; background: rgba(72, 223, 160, .06);
  color: #b7e8d1; font-size: 12px; line-height: 1.55;
}

.auth-submit {
  width: 100%; height: 47px; margin: 2px 0 0;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 12px;
  background: linear-gradient(100deg, #ff2d4f 0%, #ff5c3d 52%, #d3132f 100%);
  color: #fff; font: 700 15px 'Tajawal', 'Segoe UI', sans-serif;
  letter-spacing: .2px;
  box-shadow: 0 16px 38px -14px rgba(255, 45, 79, .85), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: filter .15s ease, transform .12s ease, box-shadow .15s ease;
}
.auth-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 20px 46px -14px rgba(255, 45, 79, .95), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.auth-submit:active:not(:disabled) { transform: translateY(1px); }
.auth-submit:disabled { opacity: .62; cursor: progress; }
.auth-submit.busy::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: authSpin .7s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-alt {
  width: 100%; height: 42px; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px;
  background: rgba(255, 255, 255, .035); color: #eadfe4;
  font: 600 13.5px 'Tajawal', 'Segoe UI', sans-serif;
}
.auth-alt:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .24); }
.auth-note {
  margin: 0; text-align: center;
  color: #8f7a85; font-size: 11.5px; line-height: 1.55;
}
.auth-form .consent-check {
  margin: 2px 0 0; padding: 11px 12px;
  background: rgba(255, 255, 255, .02);
  border-color: rgba(255, 255, 255, .1);
  color: #d9c9d0; font-size: 12.5px;
}

.auth-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 10px;
}
.auth-badges span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: #a08b96; font-size: 10.5px; white-space: nowrap;
}
.auth-secure {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 7px 0 0; color: #8b7681; font-size: 11px;
}
.auth-back {
  margin-top: 4px; padding: 8px 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #a08b96; font-size: 12.5px;
}
.auth-back:hover { color: #fff; background: transparent; }

@media (max-width: 480px) {
  /* Phones: keep the whole entry screen on one viewport by folding the brand
     into a single row and tightening the card's vertical rhythm. */
  .auth-stage { padding: 62px 12px 18px; }
  .auth-brand { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 9px; }
  .auth-brand .auth-emblem { width: 38px; height: 38px; border-radius: 12px; }
  .auth-brand .auth-emblem svg { width: 20px; height: 20px; }
  .auth-word { font-size: 19px; letter-spacing: .12em; }
  .auth-est { display: none; }
  .auth-tagline { margin: 7px 0 12px; font-size: 13px; line-height: 1.45; }
  .auth-card { padding: 15px; border-radius: 18px; }
  .auth-head { margin-bottom: 12px; gap: 10px; }
  .auth-head-ic { width: 34px; height: 34px; border-radius: 10px; }
  .auth-head h2 { font-size: 18px; }
  .auth-head p { font-size: 11.5px; margin-top: 2px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-tabs .tab { height: 33px; font-size: 12.5px; }
  .auth-form-inner { gap: 10px; }
  .auth-form .af-label { margin-bottom: 5px; }
  .auth-form .af-box { height: 44px; }
  .auth-form .af-adv { padding-top: 8px; }
  .auth-submit { height: 46px; margin-top: 2px; font-size: 14.5px; }
  .auth-alt { height: 42px; }
  .auth-form .consent-check { padding: 9px 10px; font-size: 12px; }
  .auth-badges { margin-top: 10px; gap: 5px; }
  .auth-badges span { font-size: 9.5px; padding: 4px 8px; }
  .auth-secure { margin-top: 8px; font-size: 10px; }
  .auth-back { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-aurora { animation: none; }
  .auth-submit.busy::after { animation-duration: 1.4s; }
}

/* ==========================================================================
   RED VAULT — لون موحّد للفلاتر والأزرار الصغيرة
   تدرّج من الأحمر الداكن إلى الفاتح: الكل ← صورة ← فيديو ← صوت ← كود
   الأنيميشن: ظهور/اختفاء ناعم بالشفافية فقط (بدون حركة أو نبض)
   ملاحظة: .vx-primary (زر الرفع الأساسي) بقي كما هو عشان تبقى الهيكلية واضحة
   ========================================================================== */
:root {
  --rv-btn-1: #3f0812;
  --rv-btn-2: #4d0a17;
  --rv-btn-3: #5c0c1c;
  --rv-btn-4: #6e1023;
  --rv-btn-5: #83142b;
  --rv-btn-6: #9a1933;
  --rv-btn-ink: #ffd3dc;
  --rv-btn-ink-2: #ffbec9;
  --rv-btn-ink-3: #ffaab8;
  --rv-btn-ink-4: #ff94a6;
  --rv-btn-ink-5: #ff8095;
  --rv-btn-ink-6: #ff6f87;
  --rv-btn-edge: rgba(255, 138, 160, .26);
  --rv-btn-edge-hi: rgba(255, 150, 172, .72);
  --rv-btn-fx: background-color .34s ease, border-color .34s ease, color .34s ease,
               filter .2s ease, opacity .3s ease;
}

@keyframes rvBtnFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- أزرار الفلاتر ---------- */
.vx-filters .vx-filter {
  border: 1px solid var(--rv-btn-edge);
  background-color: var(--rv-btn-1);
  color: var(--rv-btn-ink);
  transition: var(--rv-btn-fx);
  animation: rvBtnFade .3s ease both;
}
.vx-filters .vx-filter:nth-child(1) { background-color: var(--rv-btn-1); color: var(--rv-btn-ink); }
.vx-filters .vx-filter:nth-child(2) { background-color: var(--rv-btn-2); color: var(--rv-btn-ink-2); }
.vx-filters .vx-filter:nth-child(3) { background-color: var(--rv-btn-3); color: var(--rv-btn-ink-3); }
.vx-filters .vx-filter:nth-child(4) { background-color: var(--rv-btn-4); color: var(--rv-btn-ink-4); }
.vx-filters .vx-filter:nth-child(5) { background-color: var(--rv-btn-5); color: var(--rv-btn-ink-5); }
.vx-filters .vx-filter:nth-child(6) { background-color: var(--rv-btn-6); color: var(--rv-btn-ink-6); }
.vx-filters .vx-filter:hover {
  filter: brightness(1.18) saturate(1.06);
  color: #fff;
}
.vx-filters .vx-filter:active { filter: brightness(1.04); }
.vx-filters .vx-filter.on {
  background-color: var(--rv-btn-5);
  background-image: linear-gradient(180deg, rgba(255, 150, 172, .28), rgba(255, 45, 79, .10));
  border-color: var(--rv-btn-edge-hi);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 150, 172, .18), 0 6px 18px -12px rgba(255, 45, 79, .9);
}
.vx-filters .vx-filter.on:hover { filter: brightness(1.1); }
.vx-filters .vx-filter .n {
  color: inherit;
  opacity: .68;
  transition: opacity .3s ease;
}
.vx-filters .vx-filter.on .n { color: #fff; opacity: .92; }

/* ---------- الأزرار الصغيرة: شرائح، أشباح، أيقونات، وسوم، سايدبار ---------- */
.vx-chip-btn,
.vx-ghost,
.vx-icon-btn,
.vx-pill,
.vx-side-btn {
  background-color: var(--rv-btn-2);
  border-color: var(--rv-btn-edge);
  color: var(--rv-btn-ink-2);
  transition: var(--rv-btn-fx);
  animation: rvBtnFade .3s ease both;
}
.vx-chip-btn:hover,
.vx-ghost:hover,
.vx-icon-btn:hover,
.vx-pill:hover,
.vx-side-btn:hover {
  background-color: var(--rv-btn-4);
  border-color: var(--rv-btn-edge);
  color: #fff;
  filter: brightness(1.06);
}
/* الأزرار الأيقونية الشفافة تبقى بلا حدود حتى لا تتضخّم بصريًا */
.vx-icon-btn { border-color: transparent; background-color: rgba(63, 8, 18, .55); }
.vx-icon-btn:hover { border-color: var(--rv-btn-edge); }

@media (prefers-reduced-motion: reduce) {
  .vx-filter,
  .vx-chip-btn,
  .vx-ghost,
  .vx-icon-btn,
  .vx-pill,
  .vx-side-btn {
    animation: none;
    transition-duration: .01ms;
  }
}

/* ------------------------------------------------------- privacy shield
   Best-effort screen privacy. The overlay is appended to <body> by
   privacy.js; every visual sibling is blurred while it is visible. Media is
   paused by the script. Native shells receive the matching secure-screen
   state through their bridge. */
body.rv-privacy-sensitive {
  -webkit-touch-callout: none;
}
body.rv-privacy-sensitive .vx-light img,
body.rv-privacy-sensitive .vx-light video,
body.rv-privacy-sensitive .share-name {
  -webkit-user-drag: none;
  user-select: none;
}
body.rv-privacy-shielded > *:not(script):not(style):not(.rv-privacy-shield) {
  filter: blur(24px) saturate(.65) !important;
  pointer-events: none !important;
  user-select: none !important;
}
.rv-privacy-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
           max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(700px 440px at 78% 8%, rgba(255, 45, 79, .14), transparent 62%),
    radial-gradient(560px 380px at 12% 100%, rgba(255, 92, 61, .07), transparent 62%),
    rgba(4, 2, 10, .82);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  color: #fff;
  text-align: center;
  font: 15px/1.6 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
  touch-action: manipulation;
}
.rv-privacy-shield[hidden] { display: none !important; }
.rv-privacy-shield__card {
  width: min(420px, 100%);
  padding: 34px 28px 28px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  box-shadow: 0 40px 100px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: rvPrivacyIn .22s ease both;
}
.rv-privacy-shield__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ff8fa0;
  background: linear-gradient(135deg, rgba(255, 45, 79, .24), rgba(255, 92, 61, .07));
  box-shadow: inset 0 0 0 1px rgba(255, 45, 79, .38), 0 16px 44px -20px rgba(255, 45, 79, .9);
}
.rv-privacy-shield__brand {
  direction: ltr;
  font: 800 11px/1 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .55);
}
.rv-privacy-shield__brand b { color: #ff2d4f; }
.rv-privacy-shield__brand span { opacity: .55; }
.rv-privacy-shield__title {
  margin: 14px 0 0;
  font-size: clamp(21px, 5vw, 25px);
  font-weight: 800;
  letter-spacing: -.01em;
}
.rv-privacy-shield__text {
  margin: 10px auto 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .66);
}
.rv-privacy-shield__btn {
  margin-top: 22px;
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255, 92, 61, .45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 45, 79, .26), rgba(255, 45, 79, .13));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.rv-privacy-shield__btn:hover,
.rv-privacy-shield__btn:focus-visible {
  background: linear-gradient(180deg, rgba(255, 45, 79, .38), rgba(255, 45, 79, .2));
  border-color: rgba(255, 92, 61, .7);
  outline: none;
}
.rv-privacy-shield__btn:active { transform: translateY(1px); }
.rv-privacy-shield__hint {
  display: block;
  margin-top: 14px;
  font: 500 9.5px/1.4 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .34);
  direction: ltr;
}
@keyframes rvPrivacyIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-privacy-shield__card { animation: none; }
  .rv-privacy-shield__btn { transition: none; }
}

/* Printing a sensitive screen must never expose it. */
@media print {
  body.rv-privacy-sensitive {
    background: #000 !important;
  }
  body.rv-privacy-sensitive > *:not(.rv-privacy-shield) {
    display: none !important;
  }
  body.rv-privacy-sensitive .rv-privacy-shield {
    position: static;
    display: grid !important;
    background: #000 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.rv-privacy-sensitive .rv-privacy-shield__card {
    display: none !important;
  }
  body.rv-privacy-sensitive::after {
    content: 'RED VAULT — محتوى محمي';
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fff;
    background: #000;
    font: 700 18px/1.6 'Tajawal', 'Segoe UI', sans-serif;
    text-align: center;
  }
}
