:root {
  --bg: #f4fbf8;
  --card: rgba(255,255,255,.9);
  --text: #10231d;
  --muted: #5f756e;
  --mint: #26c99b;
  --mint-dark: #0b8e70;
  --line: #dbeee8;
  --shadow: 0 24px 70px rgba(19, 79, 62, .12);
  --danger: #e45757;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(38,201,155,.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(21,162,126,.14), transparent 30%),
    linear-gradient(180deg, #f4fbf8 0%, #ffffff 100%);
  min-height: 100vh;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.shell.narrow {
  width: min(760px, calc(100% - 32px));
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  color: var(--mint-dark);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: .98;
  margin: 0 0 16px;
  max-width: 820px;
}

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

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.status-dot.ok { background: var(--mint); }

.grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 16px 50px rgba(19,79,62,.08);
}

.card.wide {
  grid-column: 1 / -1;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e9faf5;
  font-size: 24px;
  margin-bottom: 16px;
}

.form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.file-box {
  min-height: 128px;
  border: 2px dashed #b8ddd2;
  background: #f7fffc;
  border-radius: 22px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}

.file-box input { max-width: 100%; }

textarea, input, select {
  width: 100%;
  border: 1px solid #cfe8df;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea:focus, input:focus, select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(38,201,155,.13);
}

label span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

button, .button {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  color: #fff;
  font-weight: 850;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

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

.button.ghost, .ghost-link {
  background: #fff;
  color: var(--mint-dark);
  border: 1px solid var(--line);
}

.ghost-link {
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.new-grid {
  grid-template-columns: repeat(4, 1fr);
}

.wide-button {
  grid-column: 1 / -1;
}

.history {
  margin-top: 24px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  box-shadow: 0 16px 50px rgba(19,79,62,.08);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head.top {
  margin-bottom: 28px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf6f3;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eefaf6;
  font-size: 13px;
  color: #2c6657;
}

td {
  color: #203f36;
}

td a {
  color: var(--mint-dark);
  font-weight: 800;
}

.small {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
}

.empty {
  padding: 28px;
  background: #fff;
  border: 1px dashed #cce4dc;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.success-card {
  margin-top: 46px;
  padding: 34px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: #e8faf4;
  color: var(--mint-dark);
  font-size: 42px;
  font-weight: 900;
}

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

.result-info {
  margin: 26px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.result-info div {
  background: #f7fffc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

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

.result-info strong {
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

details {
  margin-top: 24px;
  text-align: left;
  background: #f7fffc;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #37584f;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 24px;
  }

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

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

  .result-info {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-card {
    white-space: normal;
  }
}


.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

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

.login-shell {
  width: min(520px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-card {
  width: 100%;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: clamp(34px, 8vw, 54px);
}

.alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff0f0;
  color: #a83232;
  border: 1px solid #ffd1d1;
  font-weight: 800;
}

@media (max-width: 820px) {
  .hero-actions {
    justify-items: start;
  }
}
