/* ============================================================
   MediaHub — design system
   dark · glass · gradient (violet → cyan)
   ============================================================ */

:root {
  --bg: #07080c;
  --bg-soft: #0b0d14;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #9aa3b5;
  --faint: #6b7385;
  --accent-1: #7c5cff;
  --accent-2: #00d4ff;
  --grad: linear-gradient(135deg, #7c5cff 0%, #00d4ff 100%);
  --ok: #2dd4a7;
  --warn: #ffb454;
  --danger: #ff5470;
  --radius: 18px;
  --radius-sm: 12px;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font-ui);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 40px rgba(124, 92, 255, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(0, 212, 255, 0.06), transparent 60%);
  background-attachment: fixed;
}

::selection { background: rgba(124, 92, 255, 0.4); }

a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 7px;
  word-break: break-all;
}

/* ---------- ambient orbs ---------- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
  top: -160px; right: -120px;
}
.orb-b {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.22), transparent 70%);
  bottom: -180px; left: -140px;
  animation-delay: -9s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 30px) scale(1.08); }
}

/* ---------- glass ---------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.glass-soft {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.logo-text span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 32px rgba(124, 92, 255, 0.5); background: var(--grad); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }

.btn-danger-ghost {
  background: transparent;
  border-color: rgba(255, 84, 112, 0.4);
  color: var(--danger);
}
.btn-danger-ghost:hover { background: rgba(255, 84, 112, 0.12); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-dl {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(124, 92, 255, 0.4);
  color: #cfc4ff;
}
.btn-dl:hover { background: rgba(124, 92, 255, 0.28); box-shadow: var(--glow); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }
.icon-btn.danger:hover { color: var(--danger); border-color: rgba(255, 84, 112, 0.5); background: rgba(255, 84, 112, 0.1); }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.field input, .field textarea {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.field input[type="datetime-local"] { color-scheme: dark; }
.field-grow { flex: 1; }

.form-error {
  background: rgba(255, 84, 112, 0.12);
  border: 1px solid rgba(255, 84, 112, 0.4);
  color: #ffb3c0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  margin: 14px auto 0;
  width: min(1180px, calc(100% - 28px));
  border-radius: 999px;
  padding: 10px 12px 10px 20px;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.badge-secure, .badge-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 7px 14px;
}
.badge-secure svg { width: 14px; height: 14px; color: var(--ok); }
.badge-user { color: var(--text); }

/* ---------- hero (main + login) ---------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
}
.hero-card {
  width: min(620px, 100%);
  padding: 56px 48px;
  text-align: center;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-logo svg { width: 76px; height: 76px; margin: 0 auto 22px; display: block; filter: drop-shadow(0 8px 30px rgba(124, 92, 255, 0.4)); }
.hero-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-title span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* legal card on main */
.legal {
  margin-top: 36px;
  text-align: left;
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-sm);
}
.legal-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #b9a8ff;
}
.legal-icon svg { width: 24px; height: 24px; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.legal p { color: var(--muted); font-size: 14px; }
.legal p + p { margin-top: 8px; }
.legal-fine { font-size: 12.5px !important; color: var(--faint) !important; }

/* login */
.login-card { width: min(420px, 100%); padding: 44px 40px; }
.login-logo svg { width: 56px; height: 56px; margin: 0 auto 16px; display: block; }
.login-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.login-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { color: var(--muted); font-size: 14px; margin: 4px 0 26px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-back { display: inline-block; margin-top: 22px; color: var(--faint); font-size: 13.5px; transition: color 0.2s; }
.login-back:hover { color: var(--text); }

/* empty state (404 etc.) */
.empty-card { text-align: center; padding: 60px 48px; }
.empty-ico { font-size: 44px; margin-bottom: 14px; opacity: 0.8; }
.empty-card h1 { font-family: var(--font-display); font-size: 26px; margin-bottom: 10px; }
.muted { color: var(--muted); }
.empty-card .btn { margin-top: 24px; }

/* ---------- dashboard ---------- */
.dash, .mgr, .vault {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto 40px;
  flex: 1;
}
.dash-head { margin-bottom: 22px; }
.dash-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.vault-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.new-storage { padding: 22px; margin-bottom: 26px; }
.ns-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.ns-row .field { min-width: 200px; }
.new-storage .ns-row + .field { margin-top: 14px; }

.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.s-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: transform 0.2s ease, border-color 0.2s ease; animation: rise 0.4s ease backwards; }
.s-card:nth-child(2) { animation-delay: 0.05s; }
.s-card:nth-child(3) { animation-delay: 0.1s; }
.s-card:nth-child(4) { animation-delay: 0.15s; }
.s-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.s-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.s-card-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s-card-name a:hover { color: #cfc4ff; }
.s-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.inline-form { display: inline; }
.s-card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.dot { color: var(--faint); }
.s-card-link { border-top: 1px dashed var(--border); padding-top: 12px; }

.pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
}
.pill-warn { background: rgba(255, 180, 84, 0.14); color: var(--warn); border: 1px solid rgba(255, 180, 84, 0.35); }

.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty.wide { grid-column: 1 / -1; }

/* ---------- storage manager ---------- */
.mgr-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.mgr-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mgr-side { position: sticky; top: 84px; }

.mgr-head { padding: 22px; }
.mgr-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.mgr-edit .ns-row + .field { margin-top: 12px; }

/* upload zone */
.upload-zone { padding: 10px; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.upload-zone:hover, .upload-zone.drag { border-color: rgba(124, 92, 255, 0.55); background: rgba(124, 92, 255, 0.06); }
.uz-inner { text-align: center; padding: 30px 20px; }
.uz-ico {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #b9a8ff;
}
.uz-ico svg { width: 26px; height: 26px; }
.uz-title { font-weight: 600; font-size: 15.5px; }
.uz-link { color: #9d8bff; text-decoration: underline; text-underline-offset: 3px; }
.uz-sub { color: var(--faint); font-size: 13px; margin-top: 4px; }
.uz-progress { display: flex; align-items: center; gap: 12px; padding: 0 18px 16px; }
.uz-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.uz-bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width 0.2s ease; }
.uz-pct { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; }

/* breadcrumbs */
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.crumbs.glass-soft { padding: 10px 16px; }
.crumb { color: var(--muted); transition: color 0.15s; }
a.crumb:hover { color: var(--text); }
.crumb.current { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--faint); }

/* browser */
.browser { overflow: hidden; }
.browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.browser-title { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.browser-count { color: var(--faint); font-size: 12.5px; }
.browser-body { padding: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  animation: rise 0.3s ease backwards;
}
.row:nth-child(2) { animation-delay: 0.03s; }
.row:nth-child(3) { animation-delay: 0.06s; }
.row:nth-child(4) { animation-delay: 0.09s; }
.row:hover { background: rgba(255, 255, 255, 0.05); }
a.row { cursor: pointer; }
.row-ico {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.row-ico svg { width: 20px; height: 20px; }
.ico-folder { background: rgba(255, 180, 84, 0.12); border: 1px solid rgba(255, 180, 84, 0.3); color: var(--warn); }
.ico-file { background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.28); color: #6fdcff; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main:hover .row-name { color: #cfc4ff; }
.row-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--faint); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-size { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-go { color: var(--faint); font-size: 16px; }
.row-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.15s ease; }
.row:hover .row-actions { opacity: 1; }

/* share panel */
.share { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.share-qr {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  justify-content: center;
  box-shadow: var(--glow);
}
.share-qr img { width: 100%; max-width: 220px; height: auto; border-radius: 8px; }
.share-link-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.share-actions { display: flex; gap: 8px; }
.share-actions .btn { flex: 1; }
.share-note { color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.share-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.danger-zone { border-top: 1px dashed var(--border); padding-top: 16px; }

/* stats */
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-lbl { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* ---------- client vault ---------- */
.vault-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.vault-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.vault-desc { color: var(--muted); margin-top: 8px; max-width: 560px; }
.vault-stats { display: flex; gap: 10px; }

/* ---------- legal modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 5, 9, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 0.25s ease;
}
.modal-backdrop.is-hidden { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: min(480px, 100%);
  padding: 40px 36px 32px;
  text-align: center;
  overflow: hidden;
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-orb {
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.4), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.modal-icon {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.4);
  color: #b9a8ff;
  box-shadow: var(--glow);
}
.modal-icon svg { width: 32px; height: 32px; }
.modal h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.modal-text { color: var(--muted); font-size: 14.5px; }
.modal-list {
  list-style: none;
  margin: 18px 0 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 13.5px;
}
.modal-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0.85;
}
.modal-fine { margin-top: 14px; color: var(--faint); font-size: 11.5px; line-height: 1.5; }

/* ---------- toasts ---------- */
#toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: rgba(20, 23, 33, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(45, 212, 167, 0.5); color: #9ff0d8; }
.toast.err { border-color: rgba(255, 84, 112, 0.5); color: #ffb3c0; }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 20px 16px;
}
.foot-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.foot-brand svg { width: 22px; height: 22px; }
.foot-note { color: var(--faint); font-size: 12.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .mgr-grid { grid-template-columns: 1fr; }
  .mgr-side { position: static; order: -1; }
  .vault-title { font-size: 27px; }
  .hero-title { font-size: 36px; }
}
@media (max-width: 600px) {
  .topbar { border-radius: var(--radius); }
  .dash, .mgr, .vault { width: calc(100% - 20px); }
  .hero-card, .login-card { padding: 40px 26px; }
  .row { flex-wrap: wrap; }
  .row-actions { opacity: 1; width: 100%; justify-content: flex-end; }
  .row-size { order: -1; }
  .vault-stats { width: 100%; }
  .vault-stats .stat { flex: 1; }
  .ns-row .btn { width: 100%; }
  .share-actions { flex-direction: column; }
}

/* Original MediaMist artwork; preserve its proportions on every surface. */
.logo-mark { width: 140px; height: auto; background: transparent; padding: 0; border-radius: 0; }
.hero-logo .logo-mark { width: 240px; margin: 0 auto 22px; display: block; }
.login-logo .logo-mark { width: 210px; margin: 0 auto 16px; display: block; }
.foot-brand .logo-mark { width: 100px; height: auto; }
@media (max-width: 600px) {
  .topbar .logo { gap: 8px; }
  .topbar .logo-mark { width: 112px; }
  .topbar .logo-text { font-size: 18px; }
  .topbar .badge-user { display: none; }
  .topbar .badge-secure { font-size: 0; gap: 0; }
  .ns-row .field { min-width: 0; width: 100%; }
}

.uz-progress[hidden] { display: none; }
@media (max-width: 900px) {
  .mgr-side { order: 0; }
}
@media (max-width: 600px) {
  .file-row .row-main { flex-basis: calc(100% - 60px); }
  .file-row .row-name { white-space: normal; overflow-wrap: anywhere; }
  .file-row .row-size { order: 0; margin-left: 54px; }
  .file-row .btn-dl { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* Avoid compositing gaps in long mobile pages with multiple blurred panels. */
@media (max-width: 600px) {
  .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(20, 22, 32, .94); }
}
