:root {
  --bg: #f4efe7;
  --panel: rgba(255, 250, 242, 0.88);
  --panel-border: rgba(106, 74, 45, 0.14);
  --text: #2f241b;
  --muted: #6a5848;
  --accent: #b85c38;
  --accent-dark: #8d4326;
  --accent-soft: #f2d6bf;
  --danger: #a53030;
  --shadow: 0 18px 60px rgba(87, 58, 34, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 215, 170, 0.65), transparent 28%),
    radial-gradient(circle at right, rgba(184, 92, 56, 0.15), transparent 24%),
    linear-gradient(160deg, #f8f4ed 0%, #efe3d2 100%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  padding: 18px 0 34px;
  animation: rise 0.6s ease-out;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.7);
  border: 1px solid rgba(106, 74, 45, 0.12);
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
}

.hero p {
  max-width: 700px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero__actions {
  margin-top: 22px;
}

.hero__link {
  display: inline-flex;
  width: auto;
}

.grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
  animation: rise 0.8s ease-out;
}

.panel__header h2 {
  margin: 0;
  font-size: 24px;
}

.panel__header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.upload-form {
  margin-top: 24px;
}

.admin-form {
  margin-top: 24px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(106, 74, 45, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  color: var(--text);
}

.dropzone {
  display: block;
  padding: 28px 20px;
  border-radius: 24px;
  border: 2px dashed rgba(184, 92, 56, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 235, 224, 0.9));
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dropzone:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 92, 56, 0.75);
}

.dropzone input {
  display: none;
}

.dropzone__title {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.dropzone__text {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.button {
  width: 100%;
  margin-top: 16px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button--primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.message {
  min-height: 24px;
  margin-top: 14px;
  font-weight: 600;
}

.message--success {
  color: #2f6b34;
}

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

.file-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(106, 74, 45, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.file-card__title {
  margin: 0;
  word-break: break-word;
  font-size: 18px;
}

.file-card__meta {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.file-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button--ghost,
.button--danger {
  width: auto;
  margin: 0;
  padding: 12px 16px;
}

.button--ghost {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.button--danger {
  background: #f8dddd;
  color: var(--danger);
}

.empty-state {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  .panel {
    padding: 18px;
    border-radius: 24px;
  }

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

  .file-card__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
