/* =========================================================
   LightDrop / 閫掑厜
   A private file drop for a small circle of friends.
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #060a08;
  --bg-soft: #080e0b;
  --panel: rgba(13, 21, 16, 0.82);
  --panel-solid: #0d1511;
  --panel-raised: #111b15;
  --line: rgba(226, 255, 236, 0.085);
  --line-strong: rgba(226, 255, 236, 0.16);
  --text: #f2f7f3;
  --text-soft: #c3d0c7;
  --muted: #94a49a;
  --muted-dim: #78887d;
  --accent: #c8ff7a;
  --accent-strong: #adf256;
  --accent-soft: rgba(200, 255, 122, 0.1);
  --mint: #8fe3c0;
  --blue: #8ed8ff;
  --amber: #f7c873;
  --violet: #c4b5fd;
  --rose: #f4a7b9;
  --danger: #ff8fa3;
  --danger-soft: rgba(255, 143, 163, 0.1);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --shadow-lg: 0 40px 100px -35px rgba(0, 0, 0, 0.85);
  --font-sans: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

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

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(900px 620px at 8% -8%, rgba(200, 255, 122, 0.085), transparent 60%),
    radial-gradient(850px 560px at 98% 4%, rgba(143, 227, 192, 0.06), transparent 62%),
    radial-gradient(700px 700px at 60% 110%, rgba(142, 216, 255, 0.035), transparent 60%),
    linear-gradient(180deg, #070b09 0%, #060a08 48%, #070b09 100%);
  content: "";
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(235, 255, 241, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(235, 255, 241, 0.022) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 20%, transparent 100%);
  content: "";
  pointer-events: none;
}

body.is-locked,
body.has-modal {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(200, 255, 122, 0.28);
  color: #fff;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vertical-align: middle;
}

/* =========================================================
   Shared atoms
   ========================================================= */

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #ddffa8 0%, #c8ff7a 48%, #9fe55b 100%);
  box-shadow:
    0 10px 30px -12px rgba(200, 255, 122, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #0a1207;
}

.brand-mark::after {
  position: absolute;
  top: -30%;
  left: -50%;
  width: 80%;
  height: 160%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  content: "";
}

.brand-mark svg {
  position: relative;
  z-index: 1;
  width: 70%;
  height: 70%;
}

.brand-mark-sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.brand-mark-lg {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  box-shadow:
    0 18px 55px -14px rgba(200, 255, 122, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand-mark-xl {
  width: 88px;
  height: 88px;
  border-radius: 27px;
  box-shadow:
    0 24px 70px -15px rgba(200, 255, 122, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand-word {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.brand-word small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.eyebrow,
.card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.card-kicker {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.2em;
}

.eyebrow-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 255, 122, 0.08);
}

.btn {
  display: inline-flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  white-space: nowrap;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(140deg, #ddffa4 0%, var(--accent) 45%, #b3f567 100%);
  box-shadow:
    0 14px 30px -14px rgba(200, 255, 122, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #0a1207;
}

.btn-primary:hover:not(:disabled) {
  box-shadow:
    0 18px 38px -14px rgba(200, 255, 122, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  filter: brightness(1.03);
}

.btn-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.btn-quiet:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn.is-cancel {
  border-color: rgba(255, 143, 163, 0.25);
  background: rgba(255, 143, 163, 0.13);
  box-shadow: none;
  color: #ffc0ca;
}

.btn.is-cancel:hover:not(:disabled) {
  background: rgba(255, 143, 163, 0.2);
}

.btn-danger {
  border-color: rgba(255, 143, 163, 0.25);
  background: rgba(255, 143, 163, 0.13);
  color: #ffc0ca;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 143, 163, 0.2);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  height: 48px;
}

.btn.is-loading {
  pointer-events: none;
}

.btn.is-loading .icon {
  animation: spin 900ms linear infinite;
}

.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.icon-btn.is-danger:hover {
  border-color: rgba(255, 143, 163, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 160ms ease;
}

.text-btn .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.text-btn:hover {
  color: var(--accent);
}

.text-btn:hover .icon {
  transform: translateX(3px);
}

.avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-color, #c8ff7a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #0a1207;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar-lg {
  width: 50px;
  height: 50px;
  font-size: 17px;
}

.avatar-ring {
  position: relative;
}

.avatar-ring::after {
  position: absolute;
  inset: -3px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
}

.online-dot,
.live-dot,
.secure-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 255, 122, 0.09);
}

.live-dot {
  animation: livePulse 2.6s ease-in-out infinite;
}

.live-pill,
.circle-pill,
.date-pill,
.secure-pill {
  display: inline-flex;
  height: 31px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 16, 12, 0.58);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.live-pill {
  color: var(--text-soft);
}

.circle-pill .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.date-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.secure-pill {
  height: 27px;
  border-color: rgba(200, 255, 122, 0.12);
  background: rgba(200, 255, 122, 0.055);
  color: #c8d9b5;
  font-size: 10px;
}

.secure-dot {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(143, 227, 192, 0.08);
}

/* =========================================================
   Auth overlay
   ========================================================= */

.auth-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: center;
  align-items: safe center;
  justify-items: center;
  overflow-y: auto;
  padding: clamp(14px, 2.4vw, 32px);
  background:
    radial-gradient(900px 600px at 14% 12%, rgba(200, 255, 122, 0.08), transparent 60%),
    radial-gradient(800px 600px at 90% 88%, rgba(143, 227, 192, 0.065), transparent 60%),
    rgba(4, 7, 5, 0.92);
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.auth-overlay.is-leaving {
  pointer-events: none;
  opacity: 0;
}

.auth-overlay.is-hidden {
  visibility: hidden;
}

.auth-shell {
  position: relative;
  display: grid;
  width: min(1240px, 100%);
  min-height: min(790px, calc(100vh - 48px));
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
  overflow: hidden;
  border: 1px solid rgba(231, 255, 239, 0.11);
  border-radius: 30px;
  background: #091009;
  box-shadow:
    0 60px 150px -40px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  animation: authEnter 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-story {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(32px, 4vw, 50px) clamp(30px, 4.4vw, 58px) clamp(26px, 3vw, 38px);
  background:
    radial-gradient(100% 70% at 14% 2%, rgba(200, 255, 122, 0.16), transparent 56%),
    radial-gradient(70% 60% at 104% 98%, rgba(143, 227, 192, 0.11), transparent 62%),
    linear-gradient(152deg, #0d1811 0%, #09110c 48%, #070d09 100%);
}

.auth-story-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(224, 255, 232, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 255, 232, 0.038) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 95% 75% at 40% 30%, #000 15%, transparent 85%);
  pointer-events: none;
}

.auth-story::after {
  position: absolute;
  right: -160px;
  bottom: -180px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(200, 255, 122, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(200, 255, 122, 0.018),
    0 0 0 150px rgba(200, 255, 122, 0.012);
  content: "";
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin-top: clamp(26px, 5vh, 58px);
}

.auth-copy h1 {
  margin: 16px 0 18px;
  color: var(--text);
  font-size: clamp(42px, 4.25vw, 66px);
  font-weight: 580;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.auth-copy h1 em {
  position: relative;
  color: var(--accent);
  font-style: normal;
  font-weight: 580;
}

.auth-copy h1 em::after {
  position: absolute;
  right: 2%;
  bottom: 2px;
  left: 0;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(200, 255, 122, 0.18), transparent 70%);
  content: "";
}

.auth-lede {
  max-width: 410px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

.orbit-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  height: clamp(220px, 30vh, 282px);
  flex: none;
  margin: clamp(10px, 2.6vh, 26px) auto 0;
}

.orbit-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 255, 122, 0.17) 0%, rgba(200, 255, 122, 0.035) 42%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(200, 255, 122, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-ring-a {
  width: 440px;
  height: 232px;
  transform: translate(-50%, -50%) rotate(-14deg);
  animation: ringTurn 56s linear infinite;
}

.orbit-ring-b {
  width: 340px;
  height: 170px;
  transform: translate(-50%, -50%) rotate(18deg);
  border-color: rgba(143, 227, 192, 0.09);
  animation: ringTurnReverse 44s linear infinite;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 98px;
  height: 98px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid rgba(200, 255, 122, 0.14);
  border-radius: 50%;
  background: rgba(8, 15, 10, 0.7);
  box-shadow:
    0 0 0 14px rgba(200, 255, 122, 0.025),
    0 0 0 34px rgba(200, 255, 122, 0.012),
    0 28px 60px -20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.orbit-card {
  position: absolute;
  display: flex;
  width: 211px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(236, 255, 242, 0.12);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(24, 38, 29, 0.9), rgba(12, 21, 15, 0.84));
  box-shadow:
    0 18px 45px -20px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
  animation: cardFloat 7s ease-in-out infinite;
}

.orbit-card-a {
  top: 10px;
  left: 0;
}

.orbit-card-b {
  top: 82px;
  right: 0;
  animation-delay: -2.4s;
}

.orbit-card-c {
  bottom: 2px;
  left: 8%;
  animation-delay: -4.8s;
}

.orbit-file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border-radius: 11px;
}

.orbit-file-icon .icon {
  width: 17px;
  height: 17px;
}

.orbit-file-icon.is-photo {
  background: rgba(247, 200, 115, 0.12);
  color: var(--amber);
}

.orbit-file-icon.is-video {
  background: rgba(196, 181, 253, 0.12);
  color: var(--violet);
}

.orbit-file-icon.is-doc {
  background: rgba(142, 216, 255, 0.11);
  color: var(--blue);
}

.orbit-file-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.orbit-file-copy strong {
  overflow: hidden;
  color: #e9f2eb;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orbit-file-copy small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.01em;
}

.orbit-badge {
  margin-left: auto;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(200, 255, 122, 0.14);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.orbit-check {
  display: grid;
  width: 19px;
  height: 19px;
  margin-left: auto;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(200, 255, 122, 0.14);
  color: var(--accent);
}

.orbit-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.orbit-pulse {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(200, 255, 122, 0.055), 0 0 20px rgba(200, 255, 122, 0.42);
}

.orbit-pulse-a {
  top: 44px;
  right: 19%;
  animation: pulseGlow 4.5s ease-in-out infinite;
}

.orbit-pulse-b {
  bottom: 60px;
  left: 38%;
  width: 5px;
  height: 5px;
  background: var(--mint);
  animation: pulseGlow 5.5s ease-in-out infinite 1.8s;
}

.auth-features {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

.auth-features li {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(232, 255, 240, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.024);
  color: var(--text-soft);
  font-size: 10.5px;
}

.auth-features .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.auth-foot {
  position: relative;
  z-index: 2;
  margin-top: 15px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 74px clamp(32px, 4.2vw, 58px) 30px;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(200, 255, 122, 0.035), transparent 55%),
    rgba(7, 12, 8, 0.88);
  backdrop-filter: blur(22px);
}

.auth-panel-top {
  position: absolute;
  top: 28px;
  right: clamp(26px, 3vw, 40px);
  left: clamp(26px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.auth-tabs {
  display: grid;
  width: 100%;
  max-width: 390px;
  grid-template-columns: 1fr 1fr;
  align-self: center;
  margin-bottom: 26px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 9, 6, 0.55);
}

.auth-tab {
  height: 37px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tab:hover {
  color: var(--text-soft);
}

.auth-tab.is-active {
  background: linear-gradient(150deg, rgba(41, 61, 45, 0.9), rgba(24, 38, 28, 0.9));
  box-shadow:
    0 7px 18px -10px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.auth-forms {
  width: 100%;
  max-width: 390px;
  align-self: center;
}

.auth-form {
  animation: formIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h2 {
  margin-bottom: 7px;
  font-size: clamp(27px, 2.7vw, 32px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.auth-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.field {
  display: block;
  margin-bottom: 13px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
  display: flex;
  height: 47px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(4, 9, 6, 0.6);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(200, 255, 122, 0.48);
  background: rgba(7, 14, 9, 0.8);
  box-shadow: 0 0 0 4px rgba(200, 255, 122, 0.055);
}

.field-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--muted-dim);
  pointer-events: none;
  transition: color 180ms ease;
}

.input-wrap:focus-within .field-icon {
  color: var(--accent);
}

.input-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.input-wrap input::placeholder {
  color: #55655a;
}

.password-toggle {
  position: absolute;
  right: 11px;
  padding: 5px 4px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
  transition: color 160ms ease;
}

.password-toggle:hover {
  color: var(--accent);
}

.auth-error {
  min-height: 18px;
  margin: 2px 0 4px;
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.5;
}

.auth-submit {
  margin-top: 2px;
}

.auth-switch {
  margin-top: 17px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.auth-switch button {
  padding: 2px 2px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
}

.auth-switch button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-note {
  display: flex;
  max-width: 390px;
  align-items: flex-start;
  align-self: center;
  gap: 7px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 9.5px;
  line-height: 1.6;
}

.auth-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--muted);
}

/* =========================================================
   App shell / sidebar
   ========================================================= */

.app-shell {
  display: grid;
  width: 100%;
  max-width: 1720px;
  min-height: 100vh;
  grid-template-columns: 258px minmax(0, 1fr);
  margin: 0 auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease 140ms;
}

body:not(.is-locked) .app-shell {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 27px 18px 20px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 15, 11, 0.88), rgba(6, 10, 8, 0.7)),
    radial-gradient(400px 300px at 0% 0%, rgba(200, 255, 122, 0.04), transparent 65%);
  backdrop-filter: blur(24px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 36px;
}

.nav-label {
  margin: 0 0 9px 12px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-btn {
  position: relative;
  display: flex;
  height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-btn .icon {
  width: 17px;
  height: 17px;
  color: var(--muted-dim);
  transition: color 160ms ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.nav-btn.is-active {
  border-color: rgba(200, 255, 122, 0.1);
  background: linear-gradient(100deg, rgba(200, 255, 122, 0.105), rgba(200, 255, 122, 0.025));
  color: var(--text);
  box-shadow: inset 2px 0 0 rgba(200, 255, 122, 0.7);
}

.nav-btn.is-active .icon {
  color: var(--accent);
}

.nav-count {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.nav-badge,
.mobile-badge {
  display: grid;
  min-width: 17px;
  height: 17px;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #081007;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-spacer {
  flex: 1;
}

.code-mini {
  position: relative;
  overflow: hidden;
  margin: 12px 2px 14px;
  padding: 14px;
  border: 1px solid rgba(200, 255, 122, 0.12);
  border-radius: 15px;
  background:
    radial-gradient(130% 100% at 0% 0%, rgba(200, 255, 122, 0.09), transparent 62%),
    rgba(255, 255, 255, 0.022);
}

.code-mini::after {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(200, 255, 122, 0.08);
  border-radius: 50%;
  content: "";
}

.code-mini-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.code-mini-label .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.code-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 5px;
}

.code-mini-row strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.2;
}

.copy-mini {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.copy-mini .icon {
  width: 12px;
  height: 12px;
}

.copy-mini:hover {
  border-color: rgba(200, 255, 122, 0.25);
  background: rgba(200, 255, 122, 0.08);
  color: var(--accent);
}

.code-mini p {
  color: var(--muted-dim);
  font-size: 9px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 2px;
  border-top: 1px solid var(--line);
}

.user-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.user-card-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 9px;
}

.user-card .online-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.mobile-top,
.mobile-nav {
  display: none;
}

/* =========================================================
   Main / page headings
   ========================================================= */

.main {
  min-width: 0;
  padding: 38px clamp(24px, 4vw, 58px) 82px;
}

.view {
  width: 100%;
  max-width: 1210px;
  margin: 0 auto;
  animation: viewIn 430ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.page-top h1 {
  margin: 11px 0 8px;
  font-size: clamp(31px, 3.1vw, 43px);
  font-weight: 580;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.page-top h1 span {
  color: var(--accent);
}

.page-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
}

/* =========================================================
   Composer
   ========================================================= */

.composer-card {
  position: relative;
  overflow: hidden;
  padding: clamp(19px, 2.2vw, 27px);
  border: 1px solid rgba(227, 255, 237, 0.105);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(200, 255, 122, 0.055), transparent 55%),
    linear-gradient(145deg, rgba(16, 27, 20, 0.94), rgba(8, 14, 10, 0.9));
  box-shadow:
    0 35px 90px -50px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.composer-orb {
  position: absolute;
  top: -170px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 255, 122, 0.1), transparent 65%);
  filter: blur(5px);
  pointer-events: none;
}

.composer-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.composer-head h2 {
  margin-top: 5px;
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.composer-note {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 9.5px;
  white-space: nowrap;
}

.composer-note .icon {
  width: 11px;
  height: 11px;
}

.recipient-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 19px 0 13px;
}

.field-label {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.field-label .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.friend-picker {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.friend-picker::-webkit-scrollbar {
  display: none;
}

.friend-pill {
  display: inline-flex;
  height: 34px;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 0 11px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 500;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.friend-pill .avatar {
  width: 25px;
  height: 25px;
  font-size: 9px;
}

.friend-pill:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
  transform: translateY(-1px);
}

.friend-pill.is-active {
  border-color: rgba(200, 255, 122, 0.42);
  background: rgba(200, 255, 122, 0.085);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(200, 255, 122, 0.035);
}

.friend-pill.is-active::after {
  width: 5px;
  height: 5px;
  margin-left: 1px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.friend-picker-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.friend-picker-empty button {
  padding: 2px 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.transfer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(286px, 0.72fr);
  gap: 12px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 232px;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  border: 1.5px dashed rgba(210, 240, 219, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(80% 90% at 50% 100%, rgba(200, 255, 122, 0.045), transparent 65%),
    rgba(4, 9, 6, 0.38);
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropzone::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(228, 255, 237, 0.08) 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
  content: "";
  opacity: 0.38;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: rgba(200, 255, 122, 0.48);
  background:
    radial-gradient(80% 90% at 50% 100%, rgba(200, 255, 122, 0.085), transparent 68%),
    rgba(6, 13, 8, 0.55);
}

.dropzone.is-dragover {
  transform: scale(1.005);
}

.dropzone-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  transition: opacity 160ms ease;
}

.dropzone-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(200, 255, 122, 0.15);
  border-radius: 17px;
  background:
    radial-gradient(circle at 35% 25%, rgba(200, 255, 122, 0.19), transparent 70%),
    rgba(200, 255, 122, 0.07);
  box-shadow:
    0 12px 30px -18px rgba(200, 255, 122, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.dropzone-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.6;
}

.dropzone h3 {
  margin-bottom: 4px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.dropzone p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.dropzone-limit {
  margin-top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted-dim);
  font-size: 8.5px;
}

.dropzone-drag {
  position: absolute;
  z-index: 2;
  inset: 8px;
  display: none;
  place-items: center;
  border: 1px dashed rgba(200, 255, 122, 0.4);
  border-radius: 14px;
  background: rgba(11, 22, 13, 0.92);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dropzone.is-dragover .dropzone-drag {
  display: grid;
}

.dropzone.is-dragover .dropzone-inner {
  opacity: 0.2;
}

.queue-panel {
  display: flex;
  min-height: 232px;
  flex-direction: column;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(4, 9, 6, 0.47);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.queue-head span:last-child {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
}

.queue-list {
  display: flex;
  max-height: 158px;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  padding: 9px 1px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
  scrollbar-width: thin;
}

.queue-empty {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted-dim);
  text-align: center;
}

.queue-empty-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.queue-empty-icon .icon {
  width: 14px;
  height: 14px;
}

.queue-empty p {
  color: var(--muted);
  font-size: 10.5px;
}

.queue-empty small {
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 9px;
}

.queue-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
  animation: queueIn 220ms ease both;
}

.queue-item .file-type {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.queue-item .file-type .icon {
  width: 13px;
  height: 13px;
}

.queue-item-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.queue-item-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-copy small {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.queue-remove {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-dim);
  cursor: pointer;
}

.queue-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.queue-remove .icon {
  width: 11px;
  height: 11px;
}

.queue-footer {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.queue-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
}

.queue-total strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.queue-footer .btn {
  height: 42px;
  font-size: 12px;
}

.upload-progress {
  margin: 0 0 9px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--accent));
  box-shadow: 0 0 12px rgba(200, 255, 122, 0.3);
  transition: width 180ms ease;
}

.upload-progress small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

/* =========================================================
   Stats / sections / file rows
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 27px;
}

.stat-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 25, 19, 0.61), rgba(8, 14, 10, 0.55));
}

.stat-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: rgba(200, 255, 122, 0.075);
  color: var(--accent);
}

.stat-icon .icon {
  width: 14px;
  height: 14px;
}

.stat-icon.is-blue {
  background: rgba(142, 216, 255, 0.075);
  color: var(--blue);
}

.stat-icon.is-amber {
  background: rgba(247, 200, 115, 0.075);
  color: var(--amber);
}

.stat-icon.is-violet {
  background: rgba(196, 181, 253, 0.075);
  color: var(--violet);
}

.stat-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.stat-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.stat-copy strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-spark {
  position: absolute;
  right: -17px;
  bottom: -28px;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.heading-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: 4px;
  place-items: center;
  border-radius: 7px;
  background: rgba(200, 255, 122, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  vertical-align: 2px;
}

.muted-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-dim);
  font-size: 9.5px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.file-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(15, 24, 18, 0.58), rgba(7, 12, 9, 0.5));
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.file-row:hover {
  border-color: rgba(200, 255, 122, 0.16);
  background: linear-gradient(140deg, rgba(19, 30, 22, 0.72), rgba(9, 15, 10, 0.62));
  transform: translateY(-1px);
}

.file-row.is-unread {
  border-color: rgba(200, 255, 122, 0.2);
  background:
    linear-gradient(90deg, rgba(200, 255, 122, 0.045), transparent 25%),
    linear-gradient(140deg, rgba(15, 24, 18, 0.68), rgba(7, 12, 9, 0.55));
}

.file-type {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
}

.file-type .icon {
  width: 18px;
  height: 18px;
}

.file-type.is-image {
  background: rgba(247, 200, 115, 0.1);
  color: var(--amber);
}

.file-type.is-video {
  background: rgba(196, 181, 253, 0.1);
  color: var(--violet);
}

.file-type.is-audio {
  background: rgba(244, 167, 185, 0.1);
  color: var(--rose);
}

.file-type.is-document {
  background: rgba(142, 216, 255, 0.09);
  color: var(--blue);
}

.file-type.is-archive {
  background: rgba(143, 227, 192, 0.09);
  color: var(--mint);
}

.file-type.is-other {
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.file-type-lg {
  width: 52px;
  height: 52px;
  border-radius: 15px;
}

.file-type-lg .icon {
  width: 22px;
  height: 22px;
}

.file-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a100c;
}

.file-main {
  min-width: 0;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-name {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row:hover .file-name {
  color: var(--text);
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 9.5px;
  white-space: nowrap;
}

.file-meta .meta-owner {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-dim);
}

.meta-status {
  display: none;
  align-items: center;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.meta-status.is-done {
  background: rgba(200, 255, 122, 0.075);
  color: #c1dba4;
}

.meta-status.is-waiting {
  background: rgba(142, 216, 255, 0.06);
  color: #9ab8c7;
}

.meta-status.is-new {
  background: rgba(200, 255, 122, 0.1);
  color: var(--accent);
}

.unread-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 255, 122, 0.07);
}

.file-side {
  display: flex;
  align-items: center;
  gap: 7px;
}

.friend-status:not(.is-online) .online-dot {
  background: var(--muted-dim);
  box-shadow: none;
}

.queue-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.status-tag .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.4;
}

.status-tag.is-done {
  background: rgba(200, 255, 122, 0.075);
  color: #c1dba4;
}

.status-tag.is-waiting {
  background: rgba(142, 216, 255, 0.06);
  color: #9ab8c7;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.download-link {
  display: inline-flex;
  height: 33px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.download-link .icon {
  width: 12px;
  height: 12px;
}

.download-link:hover {
  border-color: rgba(200, 255, 122, 0.24);
  background: rgba(200, 255, 122, 0.075);
  color: var(--accent);
}

.download-link.is-primary {
  border-color: rgba(200, 255, 122, 0.13);
  background: rgba(200, 255, 122, 0.065);
  color: #d2e9b9;
}

.empty-state {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 34px 20px;
  border: 1px dashed rgba(221, 250, 230, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(200, 255, 122, 0.035), transparent 75%),
    rgba(5, 10, 7, 0.22);
  text-align: center;
}

.empty-art {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(200, 255, 122, 0.1);
  border-radius: 18px;
  background: rgba(200, 255, 122, 0.055);
  color: var(--accent);
}

.empty-art .icon {
  width: 23px;
  height: 23px;
}

.empty-art::before {
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(200, 255, 122, 0.075);
  border-radius: 23px;
  content: "";
}

.empty-state h3 {
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 550;
}

.empty-state p {
  max-width: 300px;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.65;
}

.empty-state .btn {
  margin-top: 15px;
}

/* =========================================================
   Friends
   ========================================================= */

.code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 12px;
}

.code-card,
.add-friend-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid rgba(200, 255, 122, 0.13);
  border-radius: 23px;
  background:
    radial-gradient(90% 100% at 0% 0%, rgba(200, 255, 122, 0.1), transparent 65%),
    linear-gradient(145deg, rgba(18, 31, 22, 0.92), rgba(8, 14, 10, 0.88));
}

.code-card::before {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 255, 122, 0.13), transparent 68%);
  content: "";
  pointer-events: none;
}

.code-card h2,
.add-friend-card h2 {
  margin: 7px 0 5px;
  font-size: clamp(20px, 2.1vw, 25px);
  letter-spacing: -0.04em;
}

.code-rings {
  position: absolute;
  right: -30px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  pointer-events: none;
}

.code-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(200, 255, 122, 0.075);
  border-radius: 50%;
}

.code-rings span:nth-child(2) {
  inset: 36px;
}

.code-rings span:nth-child(3) {
  inset: 72px;
}

.code-big {
  position: relative;
  z-index: 1;
  margin: 23px 0 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-shadow: 0 0 35px rgba(200, 255, 122, 0.22);
}

.code-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.code-actions > span {
  max-width: 240px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.add-friend-card {
  border-color: var(--line);
  background:
    radial-gradient(80% 100% at 100% 100%, rgba(143, 227, 192, 0.055), transparent 60%),
    linear-gradient(145deg, rgba(15, 24, 18, 0.88), rgba(7, 12, 9, 0.85));
}

.add-friend-lede {
  max-width: 370px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.code-form {
  display: flex;
  gap: 8px;
}

.code-input-wrap {
  flex: 1;
  height: 44px;
}

.code-input-wrap input {
  padding-left: 41px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-form .btn {
  height: 44px;
  padding: 0 19px;
  border-radius: 12px;
}

.form-hint {
  min-height: 17px;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 10px;
}

.form-hint.is-success {
  color: var(--accent);
}

.add-friend-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.65;
}

.add-friend-tip .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  flex: none;
  color: var(--mint);
}

.friends-list-head {
  margin: 30px 0 13px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 9px;
}

.friend-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 24, 18, 0.68), rgba(7, 12, 9, 0.56));
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.friend-card:hover {
  border-color: rgba(200, 255, 122, 0.17);
  background: linear-gradient(145deg, rgba(19, 30, 22, 0.8), rgba(9, 15, 10, 0.65));
  transform: translateY(-1px);
}

.friend-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.friend-copy strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 8.8px;
}

.friend-status.is-online {
  color: #aacb8f;
}

.friend-status .online-dot {
  width: 4px;
  height: 4px;
  box-shadow: none;
}

.friend-card-actions {
  display: flex;
  flex: none;
  gap: 1px;
}

.friend-card-actions .icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

.friend-card-actions .icon-btn .icon {
  width: 14px;
  height: 14px;
}

.friend-card-actions .send-to-friend {
  color: var(--accent);
  background: rgba(200, 255, 122, 0.06);
}

.friends-empty {
  grid-column: 1 / -1;
}

/* =========================================================
   Filters / inbox / sent
   ========================================================= */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 13px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 29px;
  flex: none;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.filter-chip.is-active {
  border-color: rgba(200, 255, 122, 0.16);
  background: rgba(200, 255, 122, 0.075);
  color: var(--accent);
}

.filter-count {
  margin-left: auto;
  padding-left: 10px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.file-list-lg .file-row {
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 13px;
  padding: 12px 13px;
  border-radius: 15px;
}

.file-list-lg .file-type,
.file-list-lg .file-thumb {
  width: 48px;
  height: 48px;
}

.file-list-lg .file-name {
  font-size: 12.5px;
}

/* =========================================================
   Modals
   ========================================================= */

.modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 3, 0.78);
  backdrop-filter: blur(9px);
  animation: fadeIn 220ms ease both;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(230, 255, 239, 0.13);
  border-radius: 23px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(200, 255, 122, 0.045), transparent 60%),
    #0c130f;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
  scrollbar-width: thin;
}

.preview-modal-card {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

.modal-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.modal-title-wrap > div {
  min-width: 0;
}

.modal-title-wrap h3 {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-title-wrap p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.preview-stage {
  display: grid;
  min-height: 280px;
  max-height: 62vh;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(200, 255, 122, 0.035), transparent 70%),
    #050906;
}

.preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
}

.preview-stage video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #000;
}

.preview-stage audio {
  width: min(440px, 88%);
}

.preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  text-align: center;
}

.preview-fallback .file-type {
  width: 66px;
  height: 66px;
  margin-bottom: 13px;
  border-radius: 19px;
}

.preview-fallback .file-type .icon {
  width: 28px;
  height: 28px;
}

.preview-fallback h4 {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
}

.preview-fallback p {
  color: var(--muted-dim);
  font-size: 9.5px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
}

.modal-foot-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 9px;
}

.modal-foot-note .icon {
  width: 11px;
  height: 11px;
}

.welcome-card {
  width: min(435px, 100%);
  padding: 31px 28px 27px;
  text-align: center;
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.welcome-mark {
  position: relative;
  display: grid;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  place-items: center;
}

.welcome-rings {
  position: absolute;
  inset: 0;
}

.welcome-rings span {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(200, 255, 122, 0.16);
  border-radius: 50%;
  animation: welcomeSpin 34s linear infinite;
}

.welcome-rings span:nth-child(2) {
  inset: 12px;
  border-color: rgba(143, 227, 192, 0.12);
  animation-direction: reverse;
  animation-duration: 26s;
}

.welcome-card .card-kicker {
  justify-content: center;
}

.welcome-card h2 {
  margin: 8px 0 7px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.welcome-lede {
  max-width: 340px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.welcome-code {
  margin: 19px 0 9px;
  padding: 13px 8px;
  border: 1px dashed rgba(200, 255, 122, 0.23);
  border-radius: 13px;
  background: rgba(200, 255, 122, 0.055);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-shadow: 0 0 24px rgba(200, 255, 122, 0.2);
}

.welcome-card .btn-block {
  margin-top: 20px;
}

.confirm-card {
  width: min(360px, 100%);
  padding: 26px 23px 21px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(255, 143, 163, 0.17);
  border-radius: 13px;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 18px;
  height: 18px;
}

.confirm-card h3 {
  margin-bottom: 6px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.confirm-card p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  gap: 7px;
  margin-top: 19px;
}

.modal-actions .btn {
  height: 39px;
  flex: 1;
  font-size: 11.5px;
}

/* =========================================================
   Toasts
   ========================================================= */

.toast-stack {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: 20px;
  display: flex;
  width: min(340px, calc(100vw - 40px));
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(200, 255, 122, 0.17);
  border-radius: 13px;
  background: rgba(12, 21, 15, 0.94);
  box-shadow: 0 18px 45px -18px rgba(0, 0, 0, 0.9);
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(8px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(16px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast .toast-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: rgba(200, 255, 122, 0.1);
  color: var(--accent);
}

.toast .toast-icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.toast.is-error {
  border-color: rgba(255, 143, 163, 0.23);
}

.toast.is-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast p {
  margin: 0;
}

/* =========================================================
   Loading shimmer
   ========================================================= */

.is-loading-block {
  position: relative;
  overflow: hidden;
  color: transparent !important;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.is-loading-block::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  content: "";
  animation: shimmer 1.4s infinite;
}

/* =========================================================
   Animations
   ========================================================= */

@keyframes authEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes formIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes queueIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200, 255, 122, 0.07); }
  50% { box-shadow: 0 0 0 5px rgba(200, 255, 122, 0.02); }
}

@keyframes ringTurn {
  from { transform: translate(-50%, -50%) rotate(-14deg); }
  to { transform: translate(-50%, -50%) rotate(346deg); }
}

@keyframes ringTurnReverse {
  from { transform: translate(-50%, -50%) rotate(18deg); }
  to { transform: translate(-50%, -50%) rotate(-342deg); }
}

@keyframes welcomeSpin {
  to { transform: rotate(360deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* =========================================================
   Scrollbars
   ========================================================= */

* {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
  background-clip: content-box;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.92fr);
  }

  .auth-story {
    padding-right: 36px;
    padding-left: 36px;
  }

  .auth-copy h1 {
    font-size: clamp(40px, 4.4vw, 55px);
  }

  .orbit-card {
    width: 192px;
  }

  .orbit-card-a {
    left: 0;
  }

  .orbit-card-b {
    right: 0;
  }
}

@media (max-width: 1020px) {
  .auth-shell {
    min-height: min(760px, calc(100vh - 40px));
    grid-template-columns: minmax(0, 0.94fr) minmax(390px, 1fr);
  }

  .auth-story {
    padding: 30px;
  }

  .auth-copy {
    margin-top: 34px;
  }

  .auth-copy h1 {
    font-size: 42px;
  }

  .orbit-visual {
    height: 225px;
    transform: scale(0.88);
    transform-origin: left center;
    width: 114%;
  }

  .orbit-card {
    width: 184px;
  }

  .orbit-card-c {
    left: 2%;
  }

  .orbit-file-copy strong {
    font-size: 9.5px;
  }

  .auth-features li {
    font-size: 9.5px;
  }

  .transfer-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(266px, 0.9fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .file-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .file-side {
    display: none;
  }

  .meta-status {
    display: inline-flex;
  }

  .file-actions {
    gap: 0;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    width: min(520px, 100%);
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: min(670px, calc(100vh - 32px));
    padding: 78px 28px 28px;
    border-left: 0;
    background:
      radial-gradient(90% 55% at 100% 0%, rgba(200, 255, 122, 0.055), transparent 65%),
      radial-gradient(70% 50% at 0% 100%, rgba(143, 227, 192, 0.035), transparent 65%),
      rgba(7, 12, 8, 0.96);
  }

  .auth-panel-top {
    top: 22px;
    right: 22px;
    left: 22px;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-tabs,
  .auth-forms,
  .auth-note {
    max-width: 390px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    display: none;
  }

  .mobile-top {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 62px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 12, 9, 0.8);
    backdrop-filter: blur(20px);
  }

  .mobile-top .sidebar-brand {
    padding: 0;
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-profile {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
  }

  .mobile-profile:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
  }

  .mobile-profile .icon {
    width: 15px;
    height: 15px;
  }

  .mobile-logout {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.025);
  }

  .main {
    padding: 24px 20px 110px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    height: 62px;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px;
    border: 1px solid rgba(230, 255, 239, 0.12);
    border-radius: 20px;
    background: rgba(9, 16, 11, 0.9);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(24px);
  }

  .mobile-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 15px;
    background: transparent;
    color: var(--muted-dim);
    cursor: pointer;
    font-size: 10px;
    transition: background 160ms ease, color 160ms ease;
  }

  .mobile-nav-btn .icon {
    width: 18px;
    height: 18px;
  }

  .mobile-nav-btn.is-active {
    background: rgba(200, 255, 122, 0.09);
    color: var(--accent);
  }

  .mobile-nav-icon-wrap {
    position: relative;
    display: grid;
    place-items: center;
  }

  .mobile-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 14px;
    height: 14px;
    margin: 0;
    font-size: 7px;
  }

  .page-top {
    margin-bottom: 21px;
  }

  .page-actions {
    display: none;
  }

  #view-inbox .page-actions {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
  }

  #view-inbox .page-actions .btn {
    height: 32px;
  }

  .composer-card {
    border-radius: 22px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-copy strong {
    font-size: 20px;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  .code-big {
    font-size: clamp(30px, 7vw, 40px);
  }
}

@media (max-width: 720px) {
  .transfer-grid {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    min-height: 210px;
  }

  .dropzone {
    min-height: 205px;
  }

  .queue-list {
    max-height: 190px;
  }

  .composer-head {
    align-items: flex-start;
  }

  .composer-note {
    display: none;
  }

  .recipient-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .friend-picker {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .recipient-row > .btn {
    margin-left: auto;
  }

  .file-list-lg .file-row {
    grid-template-columns: 43px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .file-list-lg .file-type,
  .file-list-lg .file-thumb {
    width: 43px;
    height: 43px;
  }

  .download-link span {
    display: none;
  }

  .download-link {
    width: 33px;
    justify-content: center;
    padding: 0;
  }

  .preview-modal-card {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    border-radius: 19px;
  }

  .preview-stage {
    min-height: 220px;
    max-height: 56vh;
  }

  .preview-stage img,
  .preview-stage video {
    max-height: 56vh;
  }

  .toast-stack {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: calc(100vw - 28px);
  }
}

@media (max-width: 560px) {
  .auth-overlay {
    padding: 10px;
  }

  .auth-shell {
    border-radius: 23px;
  }

  .auth-panel {
    min-height: calc(100vh - 20px);
    padding: 73px 20px 22px;
  }

  .auth-panel-top {
    top: 20px;
    right: 18px;
    left: 18px;
  }

  .secure-pill {
    font-size: 9px;
  }

  .auth-tabs {
    margin-bottom: 21px;
  }

  .auth-heading {
    margin-bottom: 20px;
  }

  .auth-heading h2 {
    font-size: 26px;
  }

  .field {
    margin-bottom: 11px;
  }

  .input-wrap {
    height: 46px;
  }

  .auth-note {
    margin-top: 20px;
    padding-top: 15px;
  }

  .main {
    padding: 21px 14px 105px;
  }

  .mobile-top {
    padding: 0 15px;
  }

  .page-top h1 {
    font-size: 30px;
  }

  .page-sub {
    max-width: 300px;
    font-size: 11.5px;
  }

  .composer-card {
    padding: 17px;
    border-radius: 20px;
  }

  .composer-head h2 {
    font-size: 21px;
  }

  .dropzone {
    min-height: 190px;
    padding: 18px;
  }

  .dropzone-icon {
    width: 50px;
    height: 50px;
  }

  .dropzone h3 {
    font-size: 13px;
  }

  .stats-grid {
    gap: 7px;
  }

  .stat-card {
    padding: 12px;
    gap: 8px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
  }

  .stat-copy strong {
    font-size: 18px;
  }

  .stat-copy small {
    font-size: 8px;
  }

  .section-head h2 {
    font-size: 16px;
  }

  .file-row,
  .file-list-lg .file-row {
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px;
  }

  .file-row .file-type,
  .file-row .file-thumb,
  .file-list-lg .file-type,
  .file-list-lg .file-thumb {
    width: 39px;
    height: 39px;
    border-radius: 10px;
  }

  .file-name {
    font-size: 11.5px;
  }

  .file-list-lg .file-name {
    font-size: 11.5px;
  }

  .file-meta {
    gap: 4px;
    font-size: 8.8px;
  }

  .meta-time,
  .meta-time-dot {
    display: none;
  }

  .file-actions .icon-btn {
    width: 30px;
    height: 30px;
  }

  .download-link {
    width: 30px;
    height: 30px;
  }

  .filter-count {
    display: none;
  }

  .code-card,
  .add-friend-card {
    padding: 20px;
    border-radius: 19px;
  }

  .code-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .code-form {
    flex-direction: column;
  }

  .code-form .btn {
    width: 100%;
  }

  .friends-grid {
    grid-template-columns: 1fr;
  }

  .modal-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-foot .btn {
    width: 100%;
  }

  .modal-foot-note {
    justify-content: center;
  }

  .welcome-card {
    padding: 27px 20px 21px;
  }

  .welcome-code {
    font-size: 20px;
  }
}

@media (max-height: 790px) and (min-width: 901px) {
  .auth-shell {
    min-height: calc(100vh - 28px);
  }

  .auth-story {
    padding-top: 28px;
    padding-bottom: 22px;
  }

  .auth-copy {
    margin-top: 22px;
  }

  .auth-copy h1 {
    margin: 12px 0 12px;
    font-size: clamp(38px, 4vw, 54px);
  }

  .orbit-visual {
    height: 195px;
    margin-top: 0;
    transform: scale(0.86);
    transform-origin: left center;
    width: 116%;
  }

  .auth-features {
    padding-top: 0;
  }

  .auth-foot {
    margin-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
