:root {
  --bg: #0d1413;
  --bg-soft: #16201e;
  --panel: rgba(17, 27, 24, 0.92);
  --panel-2: rgba(24, 38, 34, 0.94);
  --border: rgba(179, 220, 201, 0.16);
  --text: #eef6f2;
  --muted: #9eb5ab;
  --accent: #c9f27b;
  --accent-dark: #202915;
  --danger: #ff846f;
  --success: #8ee6b0;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Barlow", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(201, 242, 123, 0.12), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(72, 113, 102, 0.22), transparent 24%),
    linear-gradient(180deg, #0e1514 0%, #09100f 100%);
}

button,
input,
code,
a {
  font: inherit;
}

code {
  font-family: "IBM Plex Mono", monospace;
}

.shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.page-shell {
  width: min(1240px, calc(100vw - 28px));
}

.narrow-shell {
  width: min(720px, calc(100vw - 28px));
}

.page-header,
.panel-title-row,
.header-links,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-header {
  margin-bottom: 20px;
}

.single-grid {
  display: grid;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(201, 242, 123, 0.05), rgba(0, 0, 0, 0)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.form-panel {
  max-width: 760px;
}

.auth-panel {
  margin-top: 6vh;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.3rem;
}

.lead {
  margin-top: 10px;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.5;
}

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

.upload-form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.preview-card small {
  color: var(--muted);
  font-size: 0.95rem;
}

input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 0 14px;
}

input::placeholder {
  color: rgba(238, 246, 242, 0.42);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  border-radius: 22px;
  border: 1px dashed rgba(201, 242, 123, 0.4);
  background:
    linear-gradient(135deg, rgba(201, 242, 123, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel-2);
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: rgba(201, 242, 123, 0.9);
  box-shadow: inset 0 0 0 1px rgba(201, 242, 123, 0.25);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone strong {
  font-size: 1.15rem;
}

.dropzone p,
.dropzone small {
  color: var(--muted);
}

.preview-card {
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.status-chip,
.ghost-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(201, 242, 123, 0.18);
  background: rgba(201, 242, 123, 0.08);
  color: var(--text);
  text-decoration: none;
}

.ghost-link.inline-link {
  width: fit-content;
  margin-top: 16px;
}

.ghost-button,
.primary-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #96cc66);
  color: var(--accent-dark);
  font-weight: 800;
}

.ghost-button:hover,
.primary-button:hover,
.ghost-link:hover {
  transform: translateY(-1px);
}

.feedback {
  min-height: 1.2rem;
  color: var(--muted);
}

.feedback.error {
  color: var(--danger);
}

.feedback.success {
  color: var(--success);
}

.file-table {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

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

.file-main strong,
.file-main code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.action-link,
.action-button {
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.action-button {
  font: inherit;
}

.list-meta,
.setup-info {
  margin-top: 12px;
}

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

@media (max-width: 700px) {
  .shell,
  .page-shell,
  .narrow-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 18px;
  }

  .page-header,
  .panel-title-row,
  .header-links,
  .header-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .row-actions {
    width: 100%;
    justify-content: flex-start;
  }
}