* {
  box-sizing: border-box;
}

:root {
  --bg: #070a12;
  --card: rgba(17, 24, 39, 0.82);
  --card2: rgba(15, 23, 42, 0.92);
  --text: #f9fafb;
  --muted: #a1a1aa;
  --border: rgba(255,255,255,0.12);
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --green: #22c55e;
  --green-dark: #16a34a;
  --red: #ef4444;
  --red-dark: #dc2626;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.28), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(236, 72, 153, 0.20), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.12), transparent 30%),
    linear-gradient(135deg, #070a12 0%, #111827 55%, #09090b 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.88), transparent 88%);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(18px);
}

.topbar-inner,
.container,
.footer {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.35);
  font-size: 24px;
}

.brand strong {
  display: block;
  font-size: 20px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.container {
  position: relative;
  z-index: 1;
  padding: 28px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 22px;
  margin-bottom: 22px;
}

.hero-panel,
.stats-panel,
.card,
.file-card,
.login-box {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 34px;
}

.hero-panel::before,
.card::before,
.file-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.26), transparent 38%);
}

.badge {
  position: relative;
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  position: relative;
  margin: 0;
  max-width: 850px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -2.2px;
  background: linear-gradient(90deg, #ffffff, #bfdbfe, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  position: relative;
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.stats-panel {
  border-radius: 32px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.stat {
  border-radius: 22px;
  padding: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat strong {
  font-size: 34px;
  line-height: 1;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid transparent;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, filter 0.18s ease;
}

.btn:hover,
button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.btn-soft {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: #e5e7eb;
}

.btn-soft:hover {
  background: rgba(255,255,255,0.13);
}

.btn-green {
  background: var(--green);
  color: #052e16;
}

.btn-green:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-red {
  background: var(--red);
}

.btn-red:hover {
  background: var(--red-dark);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 20px;
}

.card > * {
  position: relative;
}

.card h2 {
  margin-top: 0;
  font-size: 26px;
}

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

.grid-files {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.file-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.file-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(31, 41, 55, 0.86);
}

.file-card > * {
  position: relative;
}

.file-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 30px;
  margin-bottom: 16px;
}

.file-name {
  font-weight: 900;
  line-height: 1.25;
  word-break: break-word;
  margin-bottom: 8px;
}

.file-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(96, 165, 250, 0.82);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

label {
  display: block;
  color: #dbeafe;
  font-weight: 800;
  margin: 12px 0 7px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 12px;
  align-items: end;
}

.message {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.12);
}

.message.success {
  background: rgba(20, 83, 45, 0.75);
  color: #dcfce7;
}

.message.error {
  background: rgba(127, 29, 29, 0.75);
  color: #fee2e2;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a,
.breadcrumbs span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.empty {
  color: var(--muted);
  line-height: 1.6;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-box {
  width: min(430px, 100%);
  border-radius: 30px;
  padding: 34px;
  text-align: center;
}

.login-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  box-shadow: 0 18px 45px rgba(139, 92, 246, 0.38);
  font-size: 36px;
}

.login-box h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.login-box p {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.55;
}

.preview-image {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}

.footer {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

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

@media (max-width: 680px) {
  .topbar-inner,
  .container,
  .footer {
    width: min(100% - 22px, 1380px);
  }

  .brand small {
    display: none;
  }

  .nav {
    width: 100%;
  }

  .nav .btn {
    flex: 1;
  }

  .hero-panel,
  .card {
    padding: 20px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 52px);
    letter-spacing: -1.3px;
  }

  .hero p {
    font-size: 15px;
  }

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

  .file-card {
    min-height: auto;
  }

  .file-actions .btn {
    flex: 1;
  }
}
