:root {
  --bg: #080b12;
  --panel: rgba(17, 24, 39, .78);
  --panel-strong: rgba(20, 30, 48, .94);
  --line: rgba(255,255,255,.12);
  --text: #f5f7fb;
  --muted: #aab4c4;
  --soft: #d9e3f5;
  --accent: #4fb7ff;
  --accent-2: #72e0c4;
  --danger: #ff657a;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(79,183,255,.25), transparent 30%),
    radial-gradient(circle at 86% 22%, rgba(114,224,196,.16), transparent 30%),
    linear-gradient(145deg, #070a11 0%, #0c1320 54%, #081018 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 82%);
}

a { color: var(--soft); text-decoration: none; }
a:hover { color: #fff; }

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
  align-items: start;
}
.shell.compact {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card, .panel, .stat, .admin-topbar {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: sticky;
  top: 28px;
  min-height: 520px;
  padding: 34px;
  border-radius: 32px;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 80px rgba(79,183,255,.12);
}

.brand-row { display: flex; gap: 16px; align-items: center; }
.brand-row.center { justify-content: center; margin-bottom: 24px; }
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #05131d;
  font-weight: 900;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 38px rgba(79, 183, 255, .26);
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
}
h1, h2 { margin: 0; line-height: 1.04; letter-spacing: -.04em; }
h1 { font-size: clamp(30px, 5vw, 58px); }
h2 { font-size: 24px; }
.lead {
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 38px;
}
.info-grid div, .stat {
  padding: 17px;
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
}
.info-grid span, .stat span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.info-grid strong, .stat strong { display: block; color: #fff; font-size: 16px; }

.panel { border-radius: var(--radius); padding: 28px; }
.upload-panel { background: var(--panel-strong); }
.login-panel { width: min(440px, 100%); }
.field { display: block; margin-bottom: 18px; }
.field span {
  display: block;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 9px;
}
input, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7, 10, 17, .68);
  color: #fff;
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  outline: none;
}
input:focus, textarea:focus { border-color: rgba(79,183,255,.8); box-shadow: 0 0 0 4px rgba(79,183,255,.13); }
textarea { resize: vertical; min-height: 110px; }

.dropzone {
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  margin: 20px 0 16px;
  padding: 28px;
  border: 1.5px dashed rgba(255,255,255,.22);
  border-radius: 22px;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  transition: .2s ease;
}
.dropzone:hover, .dropzone.dragging { border-color: rgba(79,183,255,.88); background: rgba(79,183,255,.08); }
.dropzone input { display: none; }
.drop-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(79,183,255,.14);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}
.dropzone strong { font-size: 18px; }
.dropzone small { max-width: 520px; color: var(--muted); line-height: 1.6; }
.selected-file {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: var(--soft);
}
.hidden { display: none !important; }

.progress-wrap { margin: 18px 0; }
.progress-meta { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 9px; }
.progress-meta strong { color: #fff; }
.progress-bar { height: 12px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.progress-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s ease; }
.result-box, .alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--soft);
  line-height: 1.55;
}
.alert.error, .result-box.error { border-color: rgba(255,101,122,.4); background: rgba(255,101,122,.1); }
.alert.warning { border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.1); color: #fff4d0; }
.result-box.success { border-color: rgba(114,224,196,.45); background: rgba(114,224,196,.1); }

.btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { width: 100%; background: linear-gradient(135deg, #1b93f0, #41c9af); color: #04121d; border: none; }
.btn.ghost { background: rgba(255,255,255,.06); }
.btn.danger, .btn.danger-soft { background: rgba(255,101,122,.14); border-color: rgba(255,101,122,.35); }
.btn.small { padding: 9px 11px; border-radius: 12px; font-size: 13px; width: auto; }
.btn:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 14px 0 0; }
.footer-note { grid-column: 1 / -1; color: var(--muted); display: flex; justify-content: center; gap: 9px; font-size: 13px; }

.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 24px;
  padding: 22px;
}
.admin-topbar nav { display: flex; gap: 10px; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.stat { background: rgba(255,255,255,.055); }
.stat strong { font-size: 24px; }
.table-panel { padding: 0; overflow: hidden; }
.panel-head { padding: 24px; border-bottom: 1px solid var(--line); }
.panel-head p { color: var(--muted); margin: 8px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td strong { display: block; margin-bottom: 6px; }
td small { display: block; color: var(--muted); }
.note-cell { max-width: 280px; color: var(--soft); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }
.empty-state { padding: 42px 24px; color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-top: 20px; }
  .hero-card { position: relative; top: auto; min-height: auto; }
  .info-grid, .stats-grid { grid-template-columns: 1fr; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 540px) {
  .shell, .admin-shell { width: min(100% - 20px, 100%); }
  .panel, .hero-card { padding: 20px; border-radius: 20px; }
  h1 { font-size: 34px; }
  .lead { font-size: 15px; }
  .dropzone { min-height: 170px; padding: 20px; }
}
