﻿@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg-base: #eaf4ec;
  --bg-soft: #f2f9f3;
  --surface: rgba(246, 252, 248, 0.92);
  --surface-strong: #f5fcf7;
  --line: #bdd4c3;
  --ink: #1a231c;
  --muted: #5c6a5f;
  --brand-900: #0d3320;
  --brand-700: #1d5e38;
  --brand-500: #3d8a58;
  --gold: #b28a62;
  --success-bg: #e8f6ec;
  --success-ink: #27533a;
  --notice-bg: #fff2e7;
  --notice-ink: #7c4424;
  --shadow-soft: 0 22px 48px rgba(13, 51, 32, 0.14);
  --radius-xl: 28px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 560px at 10% -10%, rgba(95, 183, 120, 0.18), transparent 58%),
    radial-gradient(980px 540px at 100% 0%, rgba(29, 94, 56, 0.1), transparent 56%),
    linear-gradient(160deg, var(--bg-base), var(--bg-soft));
  padding: 26px 20px 34px;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(2px);
}

.shape-a {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -110px;
  background: radial-gradient(circle at 20% 20%, rgba(29, 94, 56, 0.15), rgba(29, 94, 56, 0));
}

.shape-b {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(178, 138, 98, 0.18), rgba(178, 138, 98, 0));
}

.masthead,
.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand-700), var(--brand-900));
  color: #fff;
  box-shadow: 0 14px 26px rgba(13, 51, 32, 0.25);
}

.brand-mark span {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  transform: translateX(0.08em);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-title {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1;
  font-weight: 800;
  color: var(--brand-900);
}

.brand-tagline {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: #3d5442;
}

.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 51, 32, 0.16);
  background: rgba(245, 252, 248, 0.8);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a5236;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease;
}

.top-link:hover {
  background: rgba(245, 252, 248, 0.98);
  transform: translateY(-1px);
}

.dashboard {
  display: grid;
  gap: 14px;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: end;
}

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  animation: rise 520ms ease both;
}

.panel-main {
  background:
    linear-gradient(135deg, rgba(242, 252, 245, 0.98), rgba(245, 253, 248, 0.94));
}

.panel-settings {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(242, 252, 245, 0.98), rgba(245, 253, 248, 0.96));
}

.license-box {
  border: 1px solid #bdd4c3;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(242, 252, 246, 0.95), rgba(232, 246, 238, 0.96));
  padding: 16px;
  display: grid;
  gap: 12px;
}

.panel-settings .license-box {
  margin-bottom: 0;
}

.license-copy {
  display: grid;
  gap: 4px;
}

.license-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--gold);
}

.license-box h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-900);
}

.license-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.license-field {
  display: grid;
  gap: 8px;
}

.license-input {
  width: 100%;
  border: 1px solid #b0ccb8;
  border-radius: 12px;
  background: #f5fdf8;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

.license-input:focus {
  outline: 2px solid rgba(29, 94, 56, 0.2);
  border-color: var(--brand-500);
}

.license-btn {
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 16px;
  background: #d0ebda;
  color: #0d3320;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.license-btn:hover {
  background: #bde0ca;
}

.license-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.license-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.license-chip.is-active {
  background: #e8f6ec;
  color: #27533a;
}

.license-chip.is-warning {
  background: #fff2e7;
  color: #7c4424;
}

.license-chip.is-danger {
  background: #fbe9e7;
  color: #8f3026;
}

.license-chip.is-neutral {
  background: #ece8e3;
  color: #5f555e;
}

.license-status-text,
.license-hint,
.license-meta {
  margin: 0;
}

.license-status-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e3a24;
}

.license-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.license-meta {
  color: #736670;
  font-size: 0.76rem;
  font-weight: 600;
}

.robot-deco {
  justify-self: end;
  align-self: end;
  width: min(220px, 26vw);
  pointer-events: auto;
  cursor: pointer;
}

.robot-deco img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(13, 51, 32, 0.22));
  transition: transform 0.18s ease;
}

.robot-deco:hover img {
  transform: translateY(-4px) scale(1.02);
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head-compact {
  margin-bottom: 14px;
}

.panel-eyebrow {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--brand-500);
}

.panel-main h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  line-height: 1.1;
  color: var(--brand-900);
}

.panel-description {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.inline-license-note {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid #bdd4c3;
  background: #f2fbf5;
  padding: 0 14px;
  color: #1a4a2a;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.inline-license-note:hover {
  background: #e8f7ed;
}

.flow-strip {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.flow-strip li {
  border: 1px solid #bdd4c3;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #f5fdf7, #edf7f1);
  padding: 12px;
  display: grid;
  gap: 6px;
  min-height: 86px;
}

.step-index {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a24;
}

.quick-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: end;
}

.file-field {
  display: grid;
  gap: 8px;
}

.file-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border: 1px dashed #8ec4a0;
  border-radius: 14px;
  padding: 12px;
  background: #f4fcf6;
}

.file-picker-stack {
  grid-template-columns: 1fr;
  gap: 10px;
}

.picker-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.file-input {
  display: none;
}

.file-trigger {
  border: 0;
  border-radius: 10px;
  background: #d0ebda;
  color: #0d3320;
  font-weight: 700;
  font-family: inherit;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.file-trigger:hover {
  background: #bde0ca;
}

.file-name {
  min-height: 1.25rem;
  grid-column: 2 / 3;
  font-size: 0.78rem;
  color: #6a8a70;
}

.file-name.has-file {
  color: #1e3a24;
  font-weight: 600;
}

.run-btn {
  border: 0;
  border-radius: 16px;
  min-height: 66px;
  padding: 12px 16px;
  display: grid;
  justify-items: start;
  gap: 2px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-700), var(--brand-900));
  box-shadow: 0 14px 28px rgba(13, 51, 32, 0.34);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.run-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(13, 51, 32, 0.36);
}

.run-btn:disabled,
.run-btn.is-loading {
  opacity: 0.88;
}

.run-btn:disabled {
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.run-btn.is-loading {
  cursor: progress;
}

.button-main {
  font-size: 0.98rem;
  font-weight: 800;
}

.button-sub {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
}

.panel-notices {
  border-color: #a8d4b4;
  background: #f0fbf4;
  padding: 14px 18px;
}

.settings-help {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid #b8d9c2;
  background: rgba(242, 252, 246, 0.86);
  padding: 14px 16px;
}

.settings-help-title,
.settings-help-text {
  margin: 0;
}

.settings-help-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-700);
}

.settings-help-text {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.notice {
  margin: 0;
  border-radius: 12px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  border: 1px solid #b0d4ba;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

.notice + .notice {
  margin-top: 8px;
}

.panel-result {
  border-color: #b8d8c1;
  background: linear-gradient(160deg, #f0fbf3, #f8fdf9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.panel-result.is-pending {
  border-color: #d8d0c4;
  background: linear-gradient(160deg, #faf7f2, #fefcf9);
}

.panel-result.is-pending .result-eyebrow {
  color: #7f766a;
}

.panel-result.is-pending h2 {
  color: #4c433d;
}

.panel-result.is-pending p {
  color: #6d625b;
}

.result-copy {
  display: grid;
  gap: 6px;
}

.result-eyebrow {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-weight: 800;
  color: #4e8a63;
}

.panel-result h2 {
  margin: 0;
  font-size: 1.32rem;
  color: var(--success-ink);
}

.panel-result p {
  margin: 0;
  color: #476853;
}

.download-btn {
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(140deg, #2f7a4a, #235f39);
  padding: 12px 18px;
  min-width: 250px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(36, 95, 58, 0.3);
  transition: transform 0.16s ease;
}

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

.download-btn.is-disabled {
  background: linear-gradient(140deg, #88948d, #6f7c74);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

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

@media (max-width: 900px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-link {
    white-space: normal;
  }

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

  .robot-deco {
    display: none;
  }

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

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

  .run-btn {
    justify-items: center;
    text-align: center;
  }

  .panel-result {
    flex-direction: column;
    align-items: stretch;
  }

  .download-btn {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    padding: 16px 12px 20px;
  }

  .brand-mark {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: clamp(1.35rem, 8vw, 1.8rem);
  }

  .brand-tagline {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .panel {
    border-radius: 20px;
    padding: 16px;
  }

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

/* ── Loading overlay ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 51, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.loading-overlay.is-active {
  display: flex;
}
.loading-card {
  background: var(--surface-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 48px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(380px, 92vw);
  text-align: center;
}
.loading-orb {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  animation: orb-spin linear infinite;
}
.orb-ring-1 {
  border-top-color: var(--brand-500);
  animation-duration: 1.2s;
}
.orb-ring-2 {
  inset: 10px;
  border-right-color: var(--gold);
  animation-duration: 1.8s;
  animation-direction: reverse;
}
.orb-ring-3 {
  inset: 22px;
  border-bottom-color: var(--brand-700);
  animation-duration: 2.6s;
}
@keyframes orb-spin {
  to { transform: rotate(360deg); }
}
.orb-core {
  position: absolute;
  inset: 32px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orb-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}
.loading-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-900);
  margin: 0;
}
.loading-step {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  min-height: 1.2em;
  transition: opacity 0.3s;
}
.loading-bar-track {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-700), var(--brand-500));
  border-radius: 99px;
  transition: width 1s ease;
}
.loading-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
  opacity: 0.7;
  letter-spacing: 0.03em;
}
