:root {
  color-scheme: light;
  --sand-25: #fcfaf7;
  --sand-50: #f6f1ea;
  --sand-75: #efe6da;
  --sand-100: #e5d6c4;
  --clay-300: #b89d82;
  --clay-400: #a4846b;
  --clay-500: #8d6e57;
  --charcoal-600: #4a3f37;
  --charcoal-700: #3a312b;
  --charcoal-800: #2d251f;
  --accent: #a5733d;
  --accent-strong: #8f5b24;
  --neutral-btn: rgba(73, 63, 55, 0.12);
  --border-strong: rgba(180, 157, 130, 0.6);
  --border-soft: rgba(180, 157, 130, 0.28);
  --shadow-soft: 0 40px 120px -60px rgba(58, 49, 43, 0.7);
  --shadow-small: 0 18px 44px -32px rgba(58, 49, 43, 0.6);
  font-family: "Plus Jakarta Sans", "Spline Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--sand-50);
  color: var(--charcoal-700);
}

body {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 4.5rem 1.75rem 1rem;
}

.background-canvas {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.blur-orb {
  position: absolute;
  filter: blur(180px);
  opacity: 0.9;
  border-radius: 50%;
}

.orb-one {
  width: 38rem;
  height: 38rem;
  top: -12rem;
  right: -8rem;
  background: rgba(196, 179, 158, 0.7);
}

.orb-two {
  width: 28rem;
  height: 28rem;
  bottom: -10rem;
  left: -6rem;
  background: rgba(223, 208, 187, 0.75);
}

.orb-three {
  width: 18rem;
  height: 18rem;
  top: 48%;
  left: 42%;
  background: rgba(150, 127, 107, 0.55);
}

.grain {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
    radial-gradient(at 20% 20%, rgba(196, 179, 158, 0.18), transparent 55%),
    radial-gradient(at 80% 10%, rgba(173, 152, 129, 0.16), transparent 60%),
    radial-gradient(at 10% 80%, rgba(223, 208, 187, 0.12), transparent 65%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.page-shell {
  position: relative;
  width: min(1200px, 100%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.48));
  backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.topbar {
  position: sticky;
  top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem;
  z-index: 3;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand-icon {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-small);
}

.spark {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(165, 115, 61, 0.28);
  animation: pulse 4s infinite;
}

.spark-one {
  width: 18px;
  height: 18px;
  top: 16px;
  left: 16px;
  animation-delay: 0s;
  background: rgba(165, 115, 61, 0.8);
}

.spark-two {
  width: 30px;
  height: 30px;
  animation-delay: 1s;
  background: rgba(196, 179, 158, 0.85);
}

.spark-three {
  width: 46px;
  height: 46px;
  animation-delay: 2s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.6;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--charcoal-800);
}

.brand-subtitle {
  font-family: "Spline Sans", sans-serif;
  font-size: 0.95rem;
  color: rgba(58, 49, 43, 0.7);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: rgba(232, 223, 213, 0.8);
  border: 1px solid rgba(196, 179, 158, 0.45);
}

.profile-meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--charcoal-700);
}

.profile-tag {
  font-size: 0.8rem;
  color: rgba(58, 49, 43, 0.65);
}

.profile-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(58, 49, 43, 0.55);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(143, 91, 36, 0.5);
  outline-offset: 2px;
}

.btn.accent {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: rgba(143, 91, 36, 0.6);
  box-shadow: 0 18px 40px -20px rgba(143, 91, 36, 0.8);
}

.btn.accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px -22px rgba(143, 91, 36, 0.9);
}

.btn.subtle {
  background: transparent;
  color: var(--charcoal-600);
  border-color: rgba(90, 73, 63, 0.2);
}

.btn.subtle:hover {
  border-color: rgba(90, 73, 63, 0.35);
  background: rgba(232, 223, 213, 0.35);
}

.btn.neutral {
  background: rgba(232, 223, 213, 0.65);
  color: var(--charcoal-700);
  border-color: rgba(180, 157, 130, 0.4);
}

.btn.neutral:hover {
  background: rgba(232, 223, 213, 0.85);
}

.top-action {
  margin: 0;
}

.main-shell {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.toast-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.toast-error {
  background: rgba(209, 73, 73, 0.12);
  border: 1px solid rgba(209, 73, 73, 0.35);
  color: #7c2626;
}

.toast-success {
  background: rgba(124, 159, 81, 0.12);
  border: 1px solid rgba(124, 159, 81, 0.35);
  color: #4d6a2f;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-copy {
  padding: 2.75rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-radius: 999px;
  background: rgba(180, 157, 130, 0.18);
  color: rgba(74, 63, 55, 0.65);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw + 1rem, 3.1rem);
  color: var(--charcoal-800);
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.hero-copy p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.68;
  color: rgba(58, 49, 43, 0.78);
}

.hero-points {
  display: grid;
  gap: 1.25rem;
}

.point {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  filter: saturate(120%);
}

.point strong {
  display: block;
  font-size: 1rem;
  color: var(--charcoal-700);
  letter-spacing: 0.01em;
}

.point p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: rgba(58, 49, 43, 0.68);
  line-height: 1.55;
}

.hero-panel {
  padding: 2.4rem 2.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.upload-panel header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  color: var(--charcoal-800);
}

.upload-panel header p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(58, 49, 43, 0.65);
  line-height: 1.5;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--charcoal-700);
}

.field input[type="file"] {
  border: 1px dashed rgba(167, 135, 105, 0.6);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  background: rgba(248, 242, 235, 0.75);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--charcoal-700);
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.field input[type="file"]:hover {
  border-color: rgba(167, 135, 105, 0.9);
  background: rgba(248, 242, 235, 0.95);
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: rgba(58, 49, 43, 0.7);
}

.field.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.login-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
}

.login-panel h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--charcoal-800);
}

.login-panel p {
  margin: 0;
  font-size: 1rem;
  color: rgba(58, 49, 43, 0.7);
  line-height: 1.6;
}

.files-hub {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.section-head h2 {
  margin: 0.35rem 0 0;
  font-size: 1.9rem;
  color: var(--charcoal-800);
}

.section-head p {
  margin: 0;
  max-width: 420px;
  font-size: 0.97rem;
  color: rgba(58, 49, 43, 0.7);
  line-height: 1.5;
}

.empty-canvas {
  padding: 3rem 3.4rem;
  text-align: center;
  font-size: 1.05rem;
  color: rgba(58, 49, 43, 0.68);
}

.status-panel {
  padding: 3rem 3.3rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  align-items: flex-start;
}

.status-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem);
  line-height: 1.2;
  color: var(--charcoal-800);
}

.status-panel p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(58, 49, 43, 0.72);
  max-width: 520px;
}

.status-panel details {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(247, 241, 234, 0.75);
  border: 1px solid rgba(180, 157, 130, 0.35);
}

.status-panel summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--charcoal-700);
}

.status-panel pre {
  margin-top: 0.8rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--charcoal-700);
  font-family: "Spline Sans", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.file-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  border: 1px solid rgba(232, 223, 213, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.file-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180, 157, 130, 0.9);
  box-shadow: 0 24px 60px -48px rgba(58, 49, 43, 0.85);
}

.file-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.file-name {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.file-name strong {
  font-size: 1.05rem;
  color: var(--charcoal-800);
  word-break: break-word;
}

.file-ext {
  align-self: flex-start;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(58, 49, 43, 0.55);
}

.file-size {
  font-size: 0.9rem;
  color: rgba(58, 49, 43, 0.6);
}

.file-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.file-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.file-meta dt {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(58, 49, 43, 0.45);
}

.file-meta dd {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(58, 49, 43, 0.78);
  line-height: 1.45;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-tag.active {
  background: rgba(124, 159, 81, 0.16);
  color: #4d6a2f;
}

.status-tag.permanent {
  background: rgba(165, 115, 61, 0.18);
  color: #6d4b27;
}

.status-tag.expiring {
  background: rgba(206, 160, 100, 0.16);
  color: #805721;
}

.status-tag.expired {
  background: rgba(209, 73, 73, 0.12);
  color: #7c2626;
}

.status-tag.muted {
  background: rgba(58, 49, 43, 0.1);
  color: rgba(58, 49, 43, 0.6);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(58, 49, 43, 0.2);
  background: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: rgba(58, 49, 43, 0.75);
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(90, 73, 63, 0.35);
  background: rgba(248, 242, 235, 0.85);
}

.icon-button.copied,
.btn.copied {
  background: rgba(124, 159, 81, 0.2);
  color: #4d6a2f;
  border-color: rgba(124, 159, 81, 0.4);
}

.modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(44, 37, 31, 0.25);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 2rem;
  z-index: 10;
}

.share-dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 2.6rem 2.4rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--charcoal-600);
  transition: background 0.2s ease;
}

.dialog-close:hover {
  background: rgba(255, 255, 255, 0.85);
}

.dialog-headline h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--charcoal-800);
}

.dialog-headline p {
  margin: 0.6rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(58, 49, 43, 0.7);
}

.share-link {
  display: flex;
  gap: 0.8rem;
  align-items: stretch;
  border-radius: 18px;
  padding: 0.75rem;
  background: rgba(247, 241, 234, 0.75);
  border: 1px dashed rgba(165, 115, 61, 0.4);
}

.share-link code {
  flex: 1;
  padding: 0.85rem 1rem;
  font-family: "Spline Sans", monospace;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  color: var(--charcoal-700);
  overflow-wrap: anywhere;
}

.copy-action {
  white-space: nowrap;
}

.qr-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1rem;
}

.qr-pane img {
  width: 180px;
  height: 180px;
  border-radius: 26px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(196, 179, 158, 0.4);
}

.qr-pane p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(58, 49, 43, 0.6);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  font-size: 0.9rem;
  color: rgba(58, 49, 43, 0.7);
}

.footer-title {
  margin: 0;
  font-weight: 600;
  color: var(--charcoal-700);
}

.footer-copy {
  margin: 0.4rem 0 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
}

a {
  color: var(--accent-strong);
}

code {
  font-family: "Spline Sans", monospace;
}

@media (max-width: 1080px) {
  body {
    padding-top: 3.5rem;
  }

  .topbar {
    position: static;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }
}

@media (max-width: 840px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-meta {
    grid-template-columns: 1fr;
  }

  .file-actions {
    flex-wrap: wrap;
  }

  .page-shell {
    gap: 2.2rem;
  }
}

@media (max-width: 640px) {
  body {
    padding: 2.5rem 1.1rem 3rem;
  }

  .topbar,
  .hero-copy,
  .hero-panel,
  .empty-canvas,
  .share-dialog,
  .site-footer {
    padding: 1.8rem 1.3rem;
  }

  .brand-mark {
    gap: 0.9rem;
  }

  .brand-title {
    font-size: 1.4rem;
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }

  .share-link {
    flex-direction: column;
  }

  .btn,
  .icon-button {
    width: 100%;
  }

  .profile-pill {
    display: none;
  }
}

.is-deleted {
  filter: grayscale(0.7);
  opacity: 0.7;
}

.is-expired {
  border-style: dashed;
}

.is-permanent {
  border-color: rgba(165, 115, 61, 0.65);
}

.is-active {
  border-color: rgba(180, 157, 130, 0.6);
}
