:root {
  --bg: #08090a;
  --surface: #0a0b0d;
  --surface-raised: #0c0e11;
  --surface-input: #0b0c0f;
  --surface-control: #101317;
  --surface-hover: #171b21;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.2);
  --line-soft: rgba(255, 255, 255, 0.11);
  --line-hair: rgba(255, 255, 255, 0.075);
  --text: #e9ebee;
  --dim: #b0b6bf;
  --dimmer: #9299a4;
  --faint: #747c88;
  --ghost: #5b636e;
  --accent: linear-gradient(90deg, #ff3d9a 0%, #b44bff 52%, #25e0ff 100%);
  --accent-135: linear-gradient(135deg, #ff3d9a 0%, #b44bff 52%, #25e0ff 100%);
  --cyan: #25e0ff;
  --violet: #b44bff;
  --magenta: #ff3d9a;
  --success: #35d6a0;
  --warning: #ffb347;
  --danger: #ff5c6b;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(60% 60% at 50% -20%, rgba(180, 75, 255, 0.06), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(180, 75, 255, .35); color: #fff; }

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  animation: pulse 1.2s ease-in-out infinite alternate;
}
.brand-mark {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 3px;
  background: var(--accent-135);
  box-shadow: 0 0 24px rgba(180, 75, 255, .16);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  white-space: nowrap;
}
.brand-dot { color: var(--dimmer); }
.display {
  font-family: "Instrument Sans", Inter, sans-serif;
  letter-spacing: -.01em;
}
.eyebrow {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.gradient-text {
  background: var(--accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.muted { color: var(--dimmer); }
.dim { color: var(--dim); }
.success { color: var(--success); }
.danger { color: var(--danger); }
.warning { color: var(--warning); }
.spacer { flex: 1; }

.btn {
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  min-height: 36px;
  padding: 0 14px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, filter .15s ease, transform .1s ease;
}
.btn:hover { background: var(--surface-hover); color: var(--text); }
.btn:active { transform: scale(.99); }
.btn:disabled { cursor: not-allowed; opacity: .38; filter: grayscale(1); }
.btn-primary {
  border: 0;
  color: #0a0b0d;
  background: var(--accent);
}
.btn-primary:hover { color: #0a0b0d; filter: brightness(1.12); background: var(--accent); }
.btn-danger:hover { color: var(--danger); border-color: rgba(255, 92, 107, .5); background: rgba(255, 92, 107, .07); }
.btn-small { min-height: 29px; padding: 0 10px; font-size: 9.5px; }
.btn-icon {
  width: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.field { display: grid; gap: 8px; }
.field label, .field-label {
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  outline: 0;
  background: var(--surface-input);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: var(--ghost); }
.input:focus {
  border-color: rgba(180, 75, 255, .6);
  box-shadow: 0 0 0 3px rgba(180, 75, 255, .08);
}
.form-error {
  min-height: 17px;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.5;
}

/* Authentication */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(520px, .92fr);
  animation: rise .55s cubic-bezier(.2,.8,.2,1);
}
.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  background:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 44px 44px;
}
.auth-visual::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(180,75,255,.15), rgba(37,224,255,.025) 42%, transparent 67%);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
.auth-top {
  position: relative;
  z-index: 1;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 38px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  padding: clamp(52px, 9vh, 112px) clamp(38px, 7vw, 96px) 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(37,224,255,.6);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
.auth-hero h1 {
  max-width: 760px;
  margin: 28px 0 22px;
  font-family: "Instrument Sans", sans-serif;
  font-size: clamp(45px, 5.8vw, 86px);
  line-height: .95;
  letter-spacing: -.055em;
  font-weight: 600;
}
.auth-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.85;
}
.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  max-width: 620px;
  margin-top: clamp(54px, 11vh, 112px);
  border-top: 1px solid var(--line-soft);
}
.auth-stat { padding: 18px 16px 0 0; }
.auth-stat + .auth-stat { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.auth-stat strong { display: block; margin-bottom: 7px; font-size: 16px; font-weight: 500; }
.auth-stat span { color: var(--faint); font-size: 9px; letter-spacing: .15em; }
.auth-panel {
  min-height: 100vh;
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 44px;
}
.auth-card { width: min(420px, 100%); }
.auth-card h2 { margin: 0 0 9px; font-size: 28px; font-weight: 600; }
.auth-card > p { margin: 0 0 30px; color: var(--dimmer); font-size: 11px; line-height: 1.6; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-tab {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .16em;
  cursor: pointer;
}
.auth-tab.active { color: var(--text); border-image: var(--accent) 1; }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-btn {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-control);
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .1em;
}
.oauth-btn:hover { background: var(--surface-hover); }
.oauth-btn:disabled { color: var(--ghost); cursor: not-allowed; }
.oauth-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border: 1px solid var(--line-strong); border-radius: 50%; font-weight: 700; }
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--ghost);
  font-size: 9px;
  letter-spacing: .14em;
}
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line-soft); flex: 1; }
.auth-form { display: grid; gap: 16px; }
.auth-submit { width: 100%; height: 44px; margin-top: 4px; }
.invite-note {
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  background: var(--surface-input);
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.7;
  letter-spacing: .06em;
}

/* Product shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  animation: rise .45s cubic-bezier(.2,.8,.2,1);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border-right: 1px solid var(--line-soft);
  z-index: 10;
}
.sidebar-brand { padding: 24px 20px 25px; }
.new-transfer { margin: 0 12px 22px; min-height: 39px; width: calc(100% - 24px); }
.nav-list { display: grid; gap: 2px; }
.nav-item {
  position: relative;
  height: 39px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 19px;
  border: 0;
  background: transparent;
  color: var(--dimmer);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.028); color: var(--dim); }
.nav-item.active { background: rgba(255,255,255,.035); color: var(--text); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 19px;
  width: 2px;
  height: 15px;
  background: var(--accent);
}
.nav-icon { width: 14px; margin-left: 10px; color: var(--faint); text-align: center; }
.nav-count { margin-left: auto; color: var(--ghost); font-size: 9.5px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid var(--line-soft);
}
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--accent-135);
  color: #08090a;
  font-size: 10px;
  font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong, .user-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: 10.5px; font-weight: 500; }
.user-meta span { margin-top: 3px; color: var(--faint); font-size: 8.5px; }
.logout-btn { border: 0; background: none; color: var(--ghost); cursor: pointer; }
.logout-btn:hover { color: var(--danger); }
.sidebar-storage { padding: 18px 20px; border-top: 1px solid var(--line-soft); }
.storage-head, .storage-foot { display: flex; justify-content: space-between; }
.storage-head { color: var(--faint); font-size: 9px; letter-spacing: .14em; }
.storage-meter { height: 3px; margin: 12px 0; overflow: hidden; background: rgba(255,255,255,.07); border-radius: 2px; }
.storage-meter > i { display: block; height: 100%; max-width: 100%; background: var(--accent); }
.storage-foot { color: var(--ghost); font-size: 8.5px; }
.mobile-bar { display: none; }
.main { min-width: 0; min-height: 100vh; }

.page-toolbar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 9, 10, .86);
  backdrop-filter: blur(14px);
}
.page-toolbar h1 { margin: 0; font-size: 21px; font-weight: 600; }
.page-toolbar .meta { color: var(--faint); font-size: 10px; letter-spacing: .12em; }

/* Upload */
.upload-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
}
.upload-workspace {
  min-width: 0;
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
}
.upload-head { height: 30px; display: flex; justify-content: space-between; align-items: flex-start; }
.state-label { color: var(--faint); font-size: 9.5px; letter-spacing: .17em; }
.drop-zone {
  position: relative;
  min-height: 154px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-top: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: var(--surface-input);
  cursor: pointer;
}
.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .55;
}
.drop-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(180,75,255,.09);
  box-shadow: inset 0 0 60px rgba(180,75,255,.14);
  transition: opacity .22s ease;
}
.drop-zone.dragging { border-color: var(--violet); }
.drop-zone.dragging::after { opacity: 1; }
.drop-zone:hover { background-color: #0d0f13; }
.drop-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; }
.drop-plus {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--dim);
  font-size: 20px;
}
.drop-copy strong { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.drop-copy span { color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.scanline {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  opacity: 0;
}
.dragging .scanline { opacity: 1; animation: scan 1.5s linear infinite; }
.hidden-input { display: none; }
.manifest { margin-top: 22px; min-height: 180px; }
.manifest-head {
  height: 27px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .16em;
}
.manifest-row {
  height: 49px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 86px 45px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-hair);
}
.manifest-row:hover { background: rgba(255,255,255,.02); }
.file-chip, .file-tile {
  display: grid;
  place-items: center;
  color: #0a0b0d;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .03em;
}
.file-chip { width: 31px; height: 19px; }
.file-tile { width: 32px; height: 32px; border-radius: 3px; }
.file-main { min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.file-progress { height: 2px; margin-top: 8px; overflow: hidden; background: rgba(255,255,255,.07); border-radius: 2px; }
.file-progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s linear; }
.file-size, .file-pct { color: var(--dim); font-size: 10px; text-align: right; }
.file-pct.done { color: var(--success); }
.manifest-empty {
  min-height: 172px;
  display: grid;
  place-items: center;
  color: var(--ghost);
  font-size: 10px;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--line-hair);
}
.upload-footer {
  height: 46px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  color: var(--dimmer);
  font-size: 9.5px;
  letter-spacing: .1em;
}
.upload-footer .status { display: flex; align-items: center; gap: 10px; }
.upload-footer .btn { margin-left: auto; }

.share-settings {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 27px 25px 26px;
  border-left: 1px solid var(--line-soft);
  background: var(--surface-raised);
}
.settings-title { margin-bottom: 32px; color: var(--faint); font-size: 10px; letter-spacing: .18em; }
.setting { margin-bottom: 26px; }
.setting-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.segment {
  height: 35px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.segment button {
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: .1em;
  cursor: pointer;
}
.segment button:last-child { border-right: 0; }
.segment button.active { background: var(--text); color: var(--bg); }
.toggle {
  width: 38px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 11px;
  background: rgba(255,255,255,.14);
  cursor: pointer;
}
.toggle i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.toggle.on { background: linear-gradient(90deg, var(--magenta), var(--violet)); }
.toggle.on i { transform: translateX(18px); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 72px; letter-spacing: .15em; }
.strength { position: absolute; right: 12px; top: 14px; color: var(--success); font-size: 8.5px; letter-spacing: .14em; }
.stepper {
  display: grid;
  grid-template-columns: 30px 56px 30px;
  height: 29px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.stepper button, .stepper span {
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--dim);
}
.stepper button { cursor: pointer; }
.stepper button:hover { background: var(--surface-hover); color: var(--text); }
.stepper span { color: var(--text); }
.stepper > :last-child { border-right: 0; }
.share-preview {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 5px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.qr {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 7px;
  border-radius: 3px;
  background: var(--text);
}
.qr img { width: 100%; height: 100%; }
.qr-placeholder {
  width: 100%;
  height: 100%;
  opacity: .18;
  background:
    linear-gradient(90deg, #08090a 12%, transparent 12% 24%, #08090a 24% 37%, transparent 37% 48%, #08090a 48% 62%, transparent 62% 76%, #08090a 76%),
    linear-gradient(#08090a 14%, transparent 14% 30%, #08090a 30% 42%, transparent 42% 58%, #08090a 58% 73%, transparent 73%);
  background-size: 17px 19px;
}
.share-link { margin: 7px 0 10px; font-size: 13px; word-break: break-all; }
.share-summary { color: var(--faint); font-size: 9px; line-height: 1.8; letter-spacing: .07em; }
.share-cta { margin-top: auto; padding-top: 28px; }
.share-cta .btn { width: 100%; height: 45px; }
.encrypted-note { margin-top: 13px; color: var(--ghost); text-align: center; font-size: 8px; letter-spacing: .11em; }

/* Data views */
.data-page { min-height: 100vh; }
.toolbar-search { margin-left: auto; width: min(270px, 30vw); height: 33px; }
.sort-group { display: flex; gap: 6px; }
.sort-group .btn.active { background: var(--text); color: var(--bg); }
.table-wrap { overflow-x: auto; }
.file-table { min-width: 950px; }
.table-head, .table-row {
  display: grid;
  grid-template-columns: 42px 46px minmax(230px, 1fr) 100px 106px 158px 106px 110px;
  align-items: center;
  padding-right: 24px;
}
.table-head {
  height: 34px;
  background: var(--surface-input);
  border-bottom: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: .15em;
}
.table-row {
  min-height: 57px;
  border-bottom: 1px solid var(--line-hair);
  cursor: pointer;
  transition: background .15s ease;
}
.table-row:hover { background: rgba(255,255,255,.028); }
.table-row.selected { background: rgba(180,75,255,.07); }
.table-row.open { background: rgba(255,255,255,.03); }
.check {
  width: 15px;
  height: 15px;
  margin-left: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px;
  background: transparent;
  color: var(--bg);
  font-size: 9px;
  cursor: pointer;
}
.check.checked { border-color: var(--cyan); background: var(--cyan); }
.row-name { min-width: 0; }
.row-name strong, .row-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name strong { font-size: 11.5px; font-weight: 500; }
.row-name span { margin-top: 5px; color: var(--faint); font-size: 8.5px; }
.table-cell { color: var(--dim); font-size: 10px; }
.download-cell strong { color: var(--text); font-weight: 500; }
.expiry-cell span { display: block; margin-bottom: 7px; }
.expiry-track { width: 104px; height: 2px; background: rgba(255,255,255,.07); }
.expiry-track i { display: block; height: 100%; background: var(--accent); }
.status-chip {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(53,214,160,.3);
  border-radius: 2px;
  color: var(--success);
  font-size: 8.5px;
  letter-spacing: .13em;
}
.status-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-chip.locked { color: var(--warning); border-color: rgba(255,179,71,.3); }
.status-chip.expired, .status-chip.cancelled { color: var(--danger); border-color: rgba(255,92,107,.3); }
.status-chip.uploading { color: var(--cyan); border-color: rgba(37,224,255,.3); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; opacity: .62; transition: opacity .16s ease; }
.table-row:hover .row-actions { opacity: 1; }
.row-actions .btn-icon { width: 27px; min-height: 27px; color: var(--dim); }
.row-actions .copy:hover { color: var(--cyan); border-color: rgba(37,224,255,.4); }
.row-actions .delete:hover { color: var(--danger); border-color: rgba(255,92,107,.4); }
.row-drawer {
  min-width: 950px;
  display: grid;
  grid-template-columns: 150px minmax(300px, 1fr) 160px;
  gap: 28px;
  padding: 22px 26px 24px 88px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-input);
  animation: pop .3s cubic-bezier(.2,.8,.2,1);
}
.preview-tile {
  height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-control);
}
.preview-tile strong { font-size: 20px; }
.preview-tile span { color: var(--faint); font-size: 8px; letter-spacing: .14em; }
.drawer-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.drawer-meta span { display: block; color: var(--faint); font-size: 8px; letter-spacing: .14em; }
.drawer-meta strong { display: block; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; font-weight: 400; }
.drawer-link { display: flex; gap: 8px; margin-top: 24px; }
.drawer-link .input { height: 34px; font-size: 9.5px; }
.drawer-qr .qr { width: 104px; height: 104px; margin-top: 10px; }
.empty-state { min-height: 50vh; display: grid; place-items: center; color: var(--ghost); font-size: 10px; letter-spacing: .12em; }
.batch-bar {
  position: fixed;
  left: calc(50% + 108px);
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px 9px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-control);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.95);
  z-index: 20;
  animation: pop .26s cubic-bezier(.2,.8,.2,1);
}
.batch-bar > span { margin-right: 10px; font-size: 10px; letter-spacing: .1em; }

/* Admin/settings */
.admin-content { padding: 25px 26px 70px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
.metric-card, .panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.metric-card { padding: 18px; }
.metric-card span { display: block; color: var(--faint); font-size: 8.5px; letter-spacing: .14em; }
.metric-card strong { display: block; margin-top: 11px; font-size: 22px; font-weight: 500; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 15px; margin-top: 15px; align-items: start; }
.panel-head { min-height: 52px; display: flex; align-items: center; padding: 0 17px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .13em; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { height: 49px; padding: 0 13px; border-bottom: 1px solid var(--line-hair); text-align: left; }
.admin-table th { color: var(--faint); font-size: 8px; font-weight: 400; letter-spacing: .13em; }
.admin-table td { color: var(--dim); font-size: 9.5px; }
.admin-table td strong { color: var(--text); font-weight: 500; }
.admin-table tr:last-child td { border-bottom: 0; }
.invite-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 17px; }
.invite-form .btn { grid-column: 1 / -1; }
.new-code {
  margin: 0 17px 17px;
  padding: 14px;
  border: 1px solid rgba(53,214,160,.28);
  background: rgba(53,214,160,.05);
}
.new-code span { display: block; margin-bottom: 8px; color: var(--success); font-size: 8px; letter-spacing: .14em; }
.new-code code { font-size: 12px; color: var(--text); word-break: break-all; }
.invite-list { border-top: 1px solid var(--line-soft); }
.invite-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px 17px; border-bottom: 1px solid var(--line-hair); }
.invite-row strong { display: block; font-size: 9.5px; font-weight: 500; }
.invite-row span { display: block; margin-top: 5px; color: var(--faint); font-size: 8px; }
.settings-content { width: min(780px, calc(100% - 52px)); margin: 28px auto; }
.settings-panel { padding: 20px; }
.settings-row { min-height: 58px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line-hair); }
.settings-row:last-child { border-bottom: 0; }
.settings-row .field-label { width: 190px; }
.provider-state { margin-left: auto; }

/* Public share */
.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 66px 1fr;
  background:
    radial-gradient(42% 50% at 50% 0%, rgba(180,75,255,.14), transparent 70%),
    var(--bg);
}
.public-head { display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line-soft); }
.public-head span:last-child { color: var(--faint); font-size: 9px; letter-spacing: .15em; }
.public-card {
  width: min(660px, calc(100% - 36px));
  margin: 55px auto;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10,11,13,.88);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9);
  overflow: hidden;
  animation: rise .55s cubic-bezier(.2,.8,.2,1);
}
.share-card-head { padding: 34px 32px 25px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.success-ring {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53,214,160,.45);
  border-radius: 50%;
  background: rgba(53,214,160,.08);
  color: var(--success);
  font-size: 18px;
}
.share-card-head h1 { margin: 0 0 9px; font-size: 24px; font-weight: 600; }
.share-card-head p { margin: 0; color: var(--faint); font-size: 9px; letter-spacing: .13em; }
.public-files { padding: 10px 28px; }
.public-file { min-height: 58px; display: grid; grid-template-columns: 33px minmax(0,1fr) auto; gap: 13px; align-items: center; border-bottom: 1px solid var(--line-hair); }
.public-file:last-child { border-bottom: 0; }
.public-file strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 500; white-space: nowrap; }
.public-file span { display: block; margin-top: 4px; color: var(--faint); font-size: 8.5px; }
.public-actions { padding: 22px 28px 28px; border-top: 1px solid var(--line-soft); }
.public-actions .btn-primary { width: 100%; height: 46px; }
.unlock-form { display: flex; gap: 9px; }
.unlock-form .input { flex: 1; }
.unavailable { padding: 45px 30px; text-align: center; }
.unavailable h1 { margin: 14px 0 10px; font-size: 24px; }
.unavailable p { color: var(--dimmer); line-height: 1.7; }

#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.toast {
  width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface-control);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  color: var(--text);
  font-size: 10px;
  line-height: 1.5;
  animation: pop .26s cubic-bezier(.2,.8,.2,1);
}
.toast.error { border-color: rgba(255,92,107,.45); color: #ffc2c8; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }
@keyframes scan { from { transform: translateY(-8px); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } to { transform: translateY(154px); opacity: 0; } }
@keyframes drift { from { transform: translate(-50%, -50%); } to { transform: translate(-47%, -54%); } }

@media (max-width: 1120px) {
  .upload-page { grid-template-columns: minmax(0, 1fr) 340px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .share-settings { padding-inline: 20px; }
}

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 28px 22px; }
  .app-shell { display: block; padding-bottom: 62px; }
  .sidebar { display: none; }
  .mobile-bar {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62px;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    border-top: 1px solid var(--line-soft);
    background: rgba(12,14,17,.96);
    backdrop-filter: blur(18px);
  }
  .mobile-nav {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--faint);
    font-size: 8px;
    letter-spacing: .08em;
    cursor: pointer;
  }
  .mobile-nav span { display: block; margin-bottom: 5px; font-size: 14px; }
  .mobile-nav.active { color: var(--text); }
  .mobile-nav.new span {
    width: 29px; height: 29px; margin: -12px auto 4px; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent); color: var(--bg); font-weight: 700;
  }
  .upload-page { display: block; }
  .upload-workspace { min-height: auto; padding: 19px 18px 10px; }
  .upload-head { height: 25px; }
  .drop-zone { min-height: 132px; }
  .manifest { min-height: auto; }
  .share-settings { min-height: auto; padding: 26px 19px 30px; border: 0; border-top: 1px solid var(--line-soft); }
  .share-preview { grid-template-columns: 96px 1fr; }
  .qr { width: 96px; height: 96px; }
  .share-cta { margin-top: 18px; }
  .batch-bar { left: 50%; bottom: 74px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-content { padding-inline: 15px; }
  .page-toolbar { padding-inline: 18px; }
  .toolbar-search { display: none; }
  .sort-group { margin-left: auto; }
  .settings-content { width: calc(100% - 30px); margin: 18px auto; }
}

@media (max-width: 520px) {
  .auth-card h2 { font-size: 25px; }
  .oauth-grid { grid-template-columns: 1fr; }
  .page-toolbar { height: 58px; }
  .page-toolbar h1 { font-size: 19px; }
  .page-toolbar .meta { display: none; }
  .sort-group .btn { min-height: 29px; padding: 0 8px; font-size: 8px; }
  .drop-content { gap: 13px; }
  .drop-plus { width: 34px; height: 34px; }
  .manifest-row { grid-template-columns: 30px minmax(0,1fr) 64px 35px; gap: 8px; }
  .upload-footer { gap: 12px; }
  .upload-footer > span:nth-child(3) { display: none; }
  .share-preview { grid-template-columns: 1fr; text-align: center; }
  .share-preview .qr { margin: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 17px; }
  .invite-form { grid-template-columns: 1fr; }
  .public-card { margin: 24px auto; }
  .share-card-head { padding-inline: 20px; }
  .public-files, .public-actions { padding-inline: 17px; }
  .unlock-form { display: grid; }
  .settings-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 15px 0; }
  .provider-state { margin-left: 0; }
}
