* {
  box-sizing: border-box;
}

:root {
  --ink: #e8f4ff;
  --muted: #98b1ca;
  --panel: rgba(4, 17, 36, 0.66);
  --panel-strong: rgba(4, 17, 36, 0.8);
  --line: rgba(125, 211, 252, 0.26);
  --accent-a: #2dd4bf;
  --accent-b: #38bdf8;
  --danger-a: #fb7185;
  --danger-b: #be123c;
  --ok: #67e8f9;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #050507;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-page {
  display: block;
}

.ethereal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ethereal-bg::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at 20% 30%, rgba(134, 148, 168, 0.16), transparent 36%),
    radial-gradient(circle at 80% 70%, rgba(128, 128, 128, 0.22), transparent 44%);
  filter: blur(70px);
  animation: auraSpin 36s linear infinite;
}

.ethereal-svg {
  position: absolute;
  width: 0;
  height: 0;
}

.ethereal-distort {
  position: absolute;
  inset: -82px;
  will-change: filter;
  animation: etherealFloat 12s ease-in-out infinite alternate;
}

.ethereal-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 26%, rgba(188, 199, 214, 0.28), transparent 32%),
    radial-gradient(circle at 80% 74%, rgba(156, 171, 191, 0.24), transparent 35%),
    rgba(128, 128, 128, 0.96);
  background-size: 140% 140%;
  background-position: 45% 50%;
  -webkit-mask-image: url("https://framerusercontent.com/images/ceBGguIpUU8luwByxuQz79t7To.png");
  -webkit-mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("https://framerusercontent.com/images/ceBGguIpUU8luwByxuQz79t7To.png");
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: center;
  mix-blend-mode: normal;
  animation:
    etherealGradient 16s ease-in-out infinite alternate,
    etherealPulse 7s ease-in-out infinite;
}

.ethereal-noise {
  position: absolute;
  inset: 0;
  background-image: url("https://framerusercontent.com/images/g0QcWrxr87K0ufOxIUFBakwYA8.png");
  background-size: 260px 260px;
  background-repeat: repeat;
  opacity: 0.28;
  mix-blend-mode: overlay;
  animation: noiseShift 0.55s steps(7) infinite;
}

.ethereal-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 32%, rgba(5, 7, 14, 0.7) 100%),
    linear-gradient(180deg, rgba(3, 6, 12, 0.62), rgba(2, 2, 5, 0.86));
}

.ethereal-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50.5%);
  display: grid;
  place-items: center;
  gap: 20px;
  z-index: 2;
}

.landing-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 6.2rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  color: rgba(236, 241, 248, 0.92);
  text-shadow:
    0 0 30px rgba(216, 224, 235, 0.2),
    0 22px 48px rgba(0, 0, 0, 0.58);
  white-space: nowrap;
  opacity: 0.95;
  animation: titleBreathe 9s ease-in-out infinite;
}

.open-auth-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #eef2f7;
  background: rgba(12, 15, 21, 0.66);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.open-auth-btn:hover {
  transform: translateY(-1px);
  background: rgba(16, 20, 28, 0.82);
  border-color: rgba(255, 255, 255, 0.4);
}

@keyframes auraSpin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.08);
  }
}

@keyframes etherealFloat {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.6%, 1.3%, 0) scale(1.03);
  }
}

@keyframes etherealGradient {
  0% {
    background-position: 20% 25%;
  }
  50% {
    background-position: 80% 70%;
  }
  100% {
    background-position: 35% 85%;
  }
}

@keyframes etherealPulse {
  0% {
    opacity: 0.86;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.88;
  }
}

@keyframes noiseShift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-8px, 5px);
  }
}

@keyframes titleBreathe {
  0% {
    opacity: 0.82;
    transform: scale(0.985);
  }
  50% {
    opacity: 1;
    transform: scale(1.012);
  }
  100% {
    opacity: 0.86;
    transform: scale(0.99);
  }
}

.shell {
  position: relative;
  z-index: 2;
  width: min(95vw, 980px);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 32px 95px rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(14px);
}

.auth-shell {
  width: min(96vw, 1120px);
  padding: 16px;
  margin: 0;
}

.auth-page .auth-shell {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.35s ease, opacity 0.25s ease, filter 0.25s ease;
  max-height: calc(100vh - 48px);
  overflow: auto;
  max-width: 1040px;
  width: min(95vw, 1040px);
  background: rgba(4, 4, 4, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.62);
  z-index: 4;
}

.auth-page .auth-shell.collapsed {
  transform: translate(-50%, -47%) scale(0.94);
  opacity: 0;
  pointer-events: none;
  filter: blur(4px);
}

.auth-page .auth-shell.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
}

.auth-modal .auth-hero,
.auth-modal .auth-panel {
  opacity: 0;
  transform: translateY(10px);
}

.auth-modal.open .auth-hero,
.auth-modal.open .auth-panel {
  animation: panelIn 0.42s ease forwards;
}

.auth-modal.open .auth-panel {
  animation-delay: 0.06s;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
}

.auth-hero {
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(10, 10, 10, 0.94), rgba(2, 2, 2, 0.86));
}

.hero-title {
  margin: 12px 0 8px;
  font-size: clamp(1.6rem, 2.4vw + 0.9rem, 2.4rem);
  letter-spacing: 0.01em;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw + 1rem, 2.25rem);
  letter-spacing: 0.02em;
}

p.sub {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.hero-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.hero-list li {
  position: relative;
  padding-left: 24px;
  color: #d9ecff;
  font-weight: 600;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.16);
}

.hero-chips {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(8, 33, 61, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #cce9ff;
}

.auth-panel {
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(10, 10, 10, 0.94), rgba(2, 2, 2, 0.86));
}

.panel-title {
  margin: 14px 0 4px;
  font-size: 1.25rem;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab-link {
  text-decoration: none;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: #d1d5db;
  background: rgba(14, 14, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tab-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #202020, #0b0b0b);
  border-color: rgba(255, 255, 255, 0.28);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 36, 66, 0.75);
  border: 1px solid rgba(125, 211, 252, 0.4);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ok);
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2dd4bf;
  box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.18);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  margin-top: 14px;
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.field-label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #c7dcf0;
}

.helper {
  font-size: 0.78rem;
  color: #84a4c2;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(7, 7, 7, 0.9);
  font-size: 0.98rem;
  color: #f3f4f6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  background: rgba(4, 4, 4, 0.98);
}

input[type="file"] {
  border: 2px dashed rgba(56, 189, 248, 0.58);
  background: linear-gradient(180deg, rgba(7, 26, 49, 0.9), rgba(3, 20, 38, 0.76));
  padding: 14px;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  margin-right: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-b), var(--accent-a));
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.toggle-pass {
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 10px;
  background: rgba(8, 34, 63, 0.72);
  color: #c8e4fa;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

.toggle-pass:hover {
  border-color: rgba(45, 212, 191, 0.58);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  color: #032a2a;
  background: linear-gradient(135deg, var(--accent-b), var(--accent-a));
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.32);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn.alt {
  color: #dbeafe;
  background: linear-gradient(135deg, #334155, #1e293b);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.5);
}

.btn.danger {
  color: #fff1f2;
  background: linear-gradient(135deg, var(--danger-a), var(--danger-b));
  box-shadow: 0 10px 24px rgba(190, 24, 93, 0.38);
}

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

.btn-sm {
  padding: 9px 12px;
  font-size: 0.85rem;
}

.switch {
  margin: 14px 0 2px;
  color: var(--muted);
}

.switch a {
  color: #7dd3fc;
  font-weight: 700;
}

.alerts {
  display: grid;
  gap: 9px;
  margin: 12px 0 16px;
}

.alert {
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
}

.alert.ok {
  color: #99f6e4;
  background: rgba(6, 78, 59, 0.55);
  border-color: rgba(45, 212, 191, 0.35);
}

.alert.info {
  color: #bae6fd;
  background: rgba(12, 74, 110, 0.45);
  border-color: rgba(56, 189, 248, 0.3);
}

.alert.err {
  color: #fecdd3;
  background: rgba(136, 19, 55, 0.5);
  border-color: rgba(251, 113, 133, 0.36);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 14px;
}

.stat-card {
  border-radius: 14px;
  padding: 14px;
  background: rgba(3, 14, 30, 0.55);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #dff5ff;
}

.stat-small {
  font-size: 0.95rem;
}

.upload-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.panel {
  border-radius: 15px;
  padding: 15px;
  background: rgba(2, 13, 30, 0.56);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.upload-panel {
  min-height: 100%;
}

.upload-layout .upload-panel:first-child {
  width: min(100%, 760px);
  margin: 0 auto;
}

.upload-layout .upload-panel:last-child {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.dashboard-page .upload-panel .form-grid {
  width: min(100%, 640px);
  margin: 12px auto 0;
}

.dashboard-page .upload-panel .panel-head {
  justify-content: center;
}

.dashboard-page .upload-layout .upload-panel:last-child .panel-head {
  justify-content: space-between;
}

.dashboard-page .upload-panel .subtiny,
.dashboard-page .upload-panel .drop-note {
  text-align: center;
}

.dashboard-page .upload-layout .upload-panel:last-child .drop-note,
.dashboard-page .upload-layout .upload-panel:last-child .subtiny {
  text-align: left;
}

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

.panel h2 {
  margin: 0;
  font-size: 1.08rem;
}

.subtiny {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #d8f1ff;
  background: rgba(8, 34, 63, 0.76);
  border: 1px solid rgba(125, 211, 252, 0.34);
}

.drop-note {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 11px;
  color: #9fbed6;
  background: rgba(7, 30, 56, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.22);
  font-size: 0.85rem;
}

.upload-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 6px;
}

.upload-kicker {
  display: inline-flex;
  align-self: center;
  justify-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(8, 35, 64, 0.72);
  color: #bfeaff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-drop {
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(8, 31, 58, 0.72), rgba(5, 20, 40, 0.66));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-drop:hover {
  border-color: rgba(45, 212, 191, 0.56);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.upload-drop.drag-active {
  border-color: rgba(56, 189, 248, 0.88);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), 0 16px 34px rgba(8, 47, 73, 0.42);
  transform: translateY(-1px) scale(1.01);
}

.upload-drop.has-files {
  border-color: rgba(45, 212, 191, 0.72);
}

.upload-drop-title {
  font-size: 1rem;
}

.upload-drop-copy {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: -2px;
}

.upload-drop-state {
  color: #d0f2ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.upload-input {
  margin-top: 8px;
}

.list-tools {
  margin: 8px 0 4px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.search-wrap {
  display: grid;
  gap: 6px;
}

.search-label {
  color: #bfddf8;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-input {
  border: 1px solid rgba(125, 211, 252, 0.4);
  border-radius: 10px;
  background: rgba(8, 26, 48, 0.75);
  color: #eaf8ff;
  font-size: 0.92rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: rgba(45, 212, 191, 0.65);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.search-meta {
  color: #a5c6df;
  font-size: 0.82rem;
  font-weight: 700;
}

.filtered-empty {
  margin-top: 10px;
}

.list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(6, 24, 47, 0.65);
}

.file-main {
  display: grid;
  gap: 5px;
}

.file-name {
  max-width: 70%;
  word-break: break-word;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.empty {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: var(--muted);
  background: rgba(2, 13, 30, 0.45);
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    order: 2;
  }

  .auth-panel {
    order: 1;
  }
}

@media (max-width: 820px) {
  .stats-grid,
  .upload-layout,
  .row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  body {
    padding: 14px;
  }

  .shell {
    padding: 18px;
  }

  .list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-name {
    max-width: 100%;
  }

  .landing-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    opacity: 0.96;
  }

  .open-auth-btn {
    padding: 9px 14px;
    font-size: 0.84rem;
  }

  .auth-page .auth-shell {
    width: min(96vw, 96vw);
    max-height: calc(100vh - 26px);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.auth-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
