:root {
  --bg: #f6f8ee;
  --surface: #ffffff;
  --surface-soft: #f7f9ff;
  --text: #122018;
  --muted: #5b6c61;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #f59e0b;
  --danger: #b91c1c;
  --border: #d5ddd8;
  --shadow: 0 14px 40px rgba(18, 32, 24, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(245, 158, 11, 0.2), transparent 32%),
    radial-gradient(circle at 82% 7%, rgba(15, 118, 110, 0.22), transparent 40%),
    radial-gradient(circle at 40% 100%, rgba(16, 185, 129, 0.12), transparent 35%),
    var(--bg);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.shell {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 24px 16px 36px;
}

.header {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.brand small {
  color: var(--muted);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: #fef3c7;
  color: #92400e;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid #edf1ee;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  animation: rise 0.45s ease;
}

.grid-2 {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

input,
button,
select,
textarea {
  font: inherit;
}

.input,
.file-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 11px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.file-input {
  padding: 8px;
}

.input:focus,
.file-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

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

.field label {
  color: #284238;
  font-size: 14px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  background: #e6f6f4;
  color: #115e59;
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
}

.btn-ghost {
  background: #f6f7f7;
  color: #33413a;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #ebf0ec;
  text-align: left;
  padding: 12px 10px;
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5f55;
}

.file-list {
  margin-top: 8px;
  border: 1px dashed #bfd4c8;
  border-radius: 12px;
  background: #f9fcfb;
  padding: 10px;
  font-size: 13px;
  color: #355447;
  min-height: 42px;
}

.status {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

.status-warn {
  background: #fef3c7;
  color: #92400e;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 24, 18, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal.open {
  display: flex;
}

.modal-panel {
  width: min(920px, 100%);
  height: min(85vh, 800px);
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid #e8efea;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-top {
  padding: 12px 14px;
  border-bottom: 1px solid #e8efea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  background: linear-gradient(140deg, #0f766e, #1f2937);
  color: #f2fffa;
  border-radius: 20px;
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -60px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.35);
}

.hero-panel p {
  color: #dbf6ef;
  line-height: 1.45;
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.list li {
  margin-bottom: 8px;
}

.upload-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.upload-item {
  border: 1px solid #e5ece7;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.upload-item small {
  color: #6c8075;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .shell {
    padding: 16px 12px 28px;
  }

  .card {
    padding: 18px;
  }

  .upload-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
