:root {
  --bg: #f5f7f2;
  --bg-soft: #ecf4ff;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --ink: #121a2a;
  --muted: #5b667d;
  --line: #d8e3f5;
  --brand: #006b7a;
  --brand-2: #ff9f1c;
  --danger-bg: #ffe9e5;
  --danger-text: #8f2412;
  --shadow: 0 18px 40px rgba(9, 33, 66, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(150deg, var(--bg) 0%, var(--bg-soft) 100%);
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
}

.ambient-a {
  top: -120px;
  left: -80px;
  background: rgba(0, 107, 122, 0.14);
}

.ambient-b {
  bottom: -120px;
  right: -60px;
  background: rgba(255, 159, 28, 0.16);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 42px auto;
  padding: 0 20px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
}

.subtitle {
  margin: 10px 0 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.workspace {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  padding: 18px;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 14px;
}

.tab-button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.22s ease;
}

.tab-button.active {
  background: linear-gradient(135deg, #008ea1, #006b7a);
  color: #fff;
}

.panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.panel.active {
  display: block;
}

.panel-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.notice-error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(143, 36, 18, 0.22);
}

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

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

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

.dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-height: 170px;
  padding: 20px;
  border: 2px dashed #b8ccea;
  border-radius: 16px;
  background: linear-gradient(165deg, #fafdff 0%, #f4fbff 100%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 107, 122, 0.09);
  transform: translateY(-1px);
}

.dropzone input[type="file"] {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.dropzone-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.dropzone-hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.dropzone-file {
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  word-break: break-word;
}

.cta {
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--brand-2), #ffbe55);
  color: #142131;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 22px rgba(255, 159, 28, 0.22);
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(255, 159, 28, 0.28);
}

.cta:disabled {
  opacity: 0.8;
  cursor: wait;
  transform: none;
}

@media (max-width: 760px) {
  .app-shell {
    margin: 26px auto;
    padding: 0 14px;
  }

  .workspace {
    padding: 12px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

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