@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

* {
  box-sizing: border-box;
}

:root {
  --bg: #ede4d8;
  --surface: rgba(251, 248, 242, 0.88);
  --surface-muted: #f3ece2;
  --border: rgba(110, 91, 68, 0.14);
  --border-strong: rgba(87, 68, 47, 0.22);
  --text: #201912;
  --text-soft: #6d5d4d;
  --accent: #1f56d8;
  --accent-deep: #163b94;
  --error: #fff0ec;
  --shadow: 0 24px 60px rgba(66, 46, 27, 0.08);
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 86, 216, 0.08), transparent 28%),
    radial-gradient(circle at right 20%, rgba(169, 108, 53, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #f4ede4 100%);
  color: var(--text);
}

.splash-shell {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(40, 82, 187, 0.18), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(196, 127, 62, 0.18), transparent 28%),
    linear-gradient(180deg, #f4eee5 0%, #ece2d4 100%);
}

.splash-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.8;
  animation: drift 11s ease-in-out infinite;
}

.splash-orb-left {
  width: 320px;
  height: 320px;
  left: -90px;
  bottom: -70px;
  background: rgba(43, 95, 217, 0.18);
}

.splash-orb-right {
  width: 260px;
  height: 260px;
  right: -60px;
  top: -40px;
  background: rgba(180, 100, 36, 0.18);
  animation-delay: -3s;
}

.app-shell {
  min-height: 100vh;
  padding: 26px;
}

.workspace {
  width: min(1480px, calc(100vw - 52px));
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.78), rgba(248, 242, 233, 0.92));
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.stack {
  display: grid;
  gap: 18px;
}

.banner {
  margin-bottom: 18px;
  border-radius: 18px;
  padding: 13px 16px;
  font-weight: 700;
  border: 1px solid transparent;
}

.banner-info {
  background: #ecf3ff;
  color: #173b87;
  border-color: rgba(23, 59, 135, 0.12);
}

.banner-error {
  background: var(--error);
  color: #8a2811;
  border-color: rgba(138, 40, 17, 0.12);
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.header-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.app-header h1,
.results-head h2 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #22170f;
}

.app-header h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.94;
  max-width: 11ch;
}

.header-summary {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-soft);
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 14px;
  min-width: 280px;
}

.user-badge {
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: right;
}

.field {
  display: block;
}

.field span {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(31, 86, 216, 0.45);
  box-shadow: 0 0 0 4px rgba(31, 86, 216, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

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

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-top: 22px;
}

.control-rail {
  display: grid;
  gap: 16px;
}

.control-block {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
}

.status-block {
  min-height: 118px;
}

.button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #2d6df6 100%);
  color: white;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(31, 86, 216, 0.18);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31, 86, 216, 0.24);
}

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

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.button-secondary:hover:not(:disabled) {
  box-shadow: none;
}

.status {
  margin: 0;
  min-height: 44px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.status-log {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.status-log-row span {
  display: inline-block;
}

.status-log-time {
  color: #8a776a;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-log-info {
  color: var(--text-soft);
}

.status-log-error {
  color: #a72b1f;
  font-weight: 600;
}

.google-button {
  min-height: 44px;
  position: relative;
  z-index: 1;
  animation: rise-in 420ms ease-out;
}

.results-stage {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(247, 242, 235, 0.9)),
    var(--surface);
  overflow: hidden;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.results-head h2 {
  font-size: clamp(1.7rem, 2vw, 2.4rem);
  line-height: 1;
}

.result-shell {
  animation: rise-in 260ms ease-out;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.meta-row {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.empty-state {
  padding: 56px 24px 64px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.8;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 0 4px;
  background: transparent;
  scrollbar-gutter: stable both-edges;
}

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

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(110, 91, 68, 0.12);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(243, 236, 226, 0.96);
  backdrop-filter: blur(8px);
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:hover {
  background: rgba(31, 86, 216, 0.04);
}

td {
  font-size: 14px;
  line-height: 1.55;
}

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

td a:hover {
  text-decoration: underline;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -14px, 0) scale(1.04);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .result-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .workspace {
    width: 100%;
    padding: 18px;
    border-radius: 24px;
  }

  .app-header {
    flex-direction: column;
    gap: 18px;
  }

  .header-actions {
    width: 100%;
    justify-items: stretch;
  }

  .user-badge {
    max-width: none;
    text-align: left;
  }

  .control-block,
  .results-head {
    padding: 16px;
  }

  th,
  td {
    padding: 12px 14px;
  }
}
