:root {
  --teal: #1d9e75;
  --teal-mid: #0f6e56;
  --teal-dark: #04342c;
  --teal-light: #5dcaa5;
  --amber: #ef9f27;
  --amber-dark: #ba7517;
  --white: #ffffff;
  --off-white: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #f4f8f6;
  --line: rgba(4, 52, 44, 0.1);
  --ink: #111111;
  --muted: #58646a;
  --muted-soft: #7a858c;
  --success: #25674f;
  --danger: #a84528;
  --shadow-sm: 0 10px 30px rgba(4, 52, 44, 0.06);
  --shadow-md: 0 18px 48px rgba(4, 52, 44, 0.12);
  --radius: 16px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Rubik", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(93, 202, 165, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f6f2 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: stretch;
  padding: 42px;
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(4, 52, 44, 0.98), rgba(15, 110, 86, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  box-shadow: 0 28px 72px rgba(4, 52, 44, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(93, 202, 165, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 202, 165, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 202, 165, 0.22), transparent 68%);
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  font-weight: 800;
  color: var(--white);
}

.lede {
  max-width: 56ch;
  margin-top: 24px;
  font-size: 1.04rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  width: fit-content;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-light);
  background: rgba(93, 202, 165, 0.12);
  border: 1px solid rgba(93, 202, 165, 0.2);
}

.hero-panel,
.workspace-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 24px;
}

.panel-note {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-panel .panel-note {
  color: rgba(255, 255, 255, 0.68);
}

.auth-mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.mode-button {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 11px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.mode-button.active {
  background: rgba(239, 159, 39, 0.18);
  color: #ffe1b8;
  border-color: rgba(239, 159, 39, 0.28);
}

.workspace {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.workspace-section {
  padding: 26px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

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

.section-heading h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  color: var(--teal-dark);
  font-weight: 700;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.workspace-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.data-form,
.data-panel {
  border: 1px solid rgba(4, 52, 44, 0.08);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.data-form h3,
.data-panel h3 {
  margin: 0 0 16px;
  font-size: 1.08rem;
  color: var(--teal-dark);
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(4, 52, 44, 0.12);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(29, 158, 117, 0.55);
  background: var(--white);
  transform: translateY(-1px);
}

.contact-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  background: var(--amber);
  color: var(--teal-dark);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(239, 159, 39, 0.24);
}

.primary-button:hover,
.secondary-button:hover,
.mini-button:hover,
.mode-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  background: rgba(29, 158, 117, 0.08);
  color: var(--teal-mid);
  font-weight: 500;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid rgba(4, 52, 44, 0.08);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 250, 248, 1));
}

.list-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.list-item-title {
  margin: 0;
  font-size: 1rem;
  color: var(--teal-dark);
  font-weight: 600;
}

.list-item-subtitle {
  margin: 6px 0 0;
  color: var(--muted-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.pill,
.session-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.pill {
  background: rgba(29, 158, 117, 0.1);
  color: var(--teal-mid);
}

.session-badge {
  background: rgba(239, 159, 39, 0.16);
  color: #ffe1b8;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-button {
  border: 1px solid rgba(4, 52, 44, 0.1);
  background: rgba(29, 158, 117, 0.04);
  color: var(--teal-mid);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.danger-button {
  border-color: rgba(168, 69, 40, 0.18);
  background: rgba(168, 69, 40, 0.08);
  color: var(--danger);
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(4, 52, 44, 0.94);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.hidden {
  display: none !important;
}

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

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero,
  .workspace-section {
    padding: 20px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 13vw, 3.5rem);
  }

  .contact-group,
  .auth-mode-switch {
    grid-template-columns: 1fr;
  }

  .auth-mode-switch {
    display: grid;
  }

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

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
