:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f4c5c;
  --accent-2: #147a8a;
  --border: #d8e0e8;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --bad: #991b1b;
  --bad-bg: #fee2e2;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9eef1 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e8eef8 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.6;
}

.status-card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.status-card {
  padding: 1rem 1.1rem;
  align-self: start;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.status-row:last-child { border-bottom: none; }
.status-row span { color: var(--muted); }

.panel {
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--accent);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel-head h2 { margin: 0; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 150px;
  border: 2px dashed #b7c9d1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbfc, #f3f7fa);
  cursor: pointer;
  padding: 1.25rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: #eef8fa;
}

.dropzone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.drop-title { font-weight: 650; }
.drop-sub { color: var(--muted); font-size: 0.88rem; }

.form-row, .form-grid, .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
  align-items: end;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.45rem;
}

input[type="text"], select, textarea {
  font: inherit;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 650;
  cursor: pointer;
  font: inherit;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--accent);
}

.hint { color: var(--muted); font-size: 0.88rem; margin: 0.75rem 0 0; }
.optional { font-weight: 500; color: #94a3b8; }

.hidden { display: none !important; }

.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  border: none;
  background: transparent;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  color: var(--muted);
  font-weight: 650;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { padding: 0.55rem 0.7rem; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
td code { background: #f5f3ff; color: #5b21b6; padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.78rem; }
.empty { color: #94a3b8; font-style: italic; }

.summary { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: #e2e8f0; color: #334155; }

pre, .result-box {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 420px;
}

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