:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #5c6877;
  --line: #d9e1ea;
  --accent: #0f6b5f;
  --accent-dark: #0a4f46;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(100%, 440px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 55px rgba(23, 32, 42, 0.08);
}

.panel.wide {
  width: min(100%, 760px);
}

.home-hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  padding: 24px clamp(18px, 4vw, 64px) 72px;
  color: white;
  background: #10221f;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 21, 19, 0.92), rgba(9, 21, 19, 0.62) 46%, rgba(9, 21, 19, 0.18)),
    radial-gradient(circle at 80% 18%, rgba(18, 122, 107, 0.32), transparent 34%),
    #10221f;
}

.mock-window {
  position: absolute;
  right: clamp(-280px, -8vw, -40px);
  top: 92px;
  width: min(960px, 74vw);
  min-width: 620px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(245, 247, 250, 0.95);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  transform: rotate(-1deg);
}

.mock-topbar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.mock-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7d1dc;
}

.mock-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 420px;
}

.mock-sidebar {
  background:
    linear-gradient(#dce8e5 0 0) 24px 30px / 96px 12px no-repeat,
    linear-gradient(#dce8e5 0 0) 24px 68px / 126px 10px no-repeat,
    linear-gradient(#dce8e5 0 0) 24px 100px / 108px 10px no-repeat,
    linear-gradient(#dce8e5 0 0) 24px 132px / 132px 10px no-repeat,
    #edf3f2;
  border-right: 1px solid var(--line);
}

.mock-content {
  padding: 28px;
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.mock-kpis span,
.mock-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.mock-kpis span {
  min-height: 74px;
  display: flex;
  align-items: center;
  padding: 14px;
  color: var(--accent-dark);
  font-weight: 700;
}

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

.mock-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.mock-list span {
  color: var(--accent-dark);
  font-weight: 700;
}

.home-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: white;
  font-size: 22px;
  text-decoration: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding-top: clamp(84px, 16vh, 150px);
}

.hero-copy h1 {
  font-size: clamp(46px, 7vw, 86px);
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
}

.text-link {
  color: white;
}

.compact {
  min-height: 38px;
}

.content-band {
  background: white;
  padding: 54px clamp(18px, 4vw, 64px) 72px;
}

.content-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.content-inner h2 {
  margin: 0 0 24px;
  font-size: 34px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow div {
  border-top: 3px solid var(--accent);
  padding-top: 16px;
}

.workflow span {
  color: var(--accent-dark);
  font-weight: 700;
}

.workflow h3 {
  margin: 8px 0;
  font-size: 20px;
}

.workflow p {
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}

textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: white;
  color: var(--accent-dark);
}

.google-button {
  gap: 10px;
}

.google-button img {
  width: 20px;
  height: 20px;
}

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

.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.error,
.success {
  border-radius: 6px;
  padding: 10px 12px;
  margin: 14px 0;
}

.error {
  border: 1px solid #f3b4ad;
  background: #fff4f2;
  color: var(--danger);
}

.success {
  border: 1px solid #a8d8c9;
  background: #eefaf6;
  color: var(--accent-dark);
}

.details {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.details div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
}

.brand.dark {
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.app-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions form {
  margin: 0;
}

.dashboard-layout,
.form-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.dashboard-title {
  margin-bottom: 20px;
}

.dashboard-title h1,
.form-page h1 {
  margin-bottom: 6px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metrics-row div,
.panel-table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics-row div {
  padding: 18px;
}

.metrics-row span {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-dark);
}

.metrics-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel-table {
  padding: 18px;
  margin-bottom: 18px;
}

.alert-panel {
  border-color: #b9ded5;
  background: #f2fbf8;
}

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

.table-header h2,
.panel-table h2 {
  margin: 0;
  font-size: 22px;
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #c9e7df;
  border-radius: 6px;
  background: white;
  text-decoration: none;
}

.requests-list {
  display: grid;
  gap: 14px;
}

.request-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.request-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.request-main h3 {
  margin: 0 0 4px;
}

.request-main p,
.request-message {
  color: var(--muted);
}

.request-message {
  margin: 14px 0;
  line-height: 1.5;
}

.status-pill {
  align-self: flex-start;
  border-radius: 999px;
  background: #e7f4f1;
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.request-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.request-meta dt {
  margin-bottom: 4px;
  font-size: 13px;
}

.tracking-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto;
  align-items: end;
  gap: 12px;
  margin: 0;
}

.empty-state {
  padding: 28px 0 12px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.form-page {
  display: grid;
  gap: 22px;
}

.business-form {
  margin-top: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e7f4f1;
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

.pill-stack {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.source-tag {
  align-self: flex-start;
  border-radius: 999px;
  background: #fdecef;
  color: #9b2242;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.gmail-send-form {
  margin: 12px 0 0;
}

.small {
  font-size: 13px;
}

.ai-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-head h4 {
  margin: 0;
  font-size: 16px;
}

.ai-head form {
  margin: 0;
}

.ai-reply {
  margin-top: 12px;
  border: 1px solid #c9e7df;
  border-radius: 8px;
  background: #f7fcfa;
  padding: 14px;
}

.ai-reply-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.ai-reply-head strong {
  color: var(--accent-dark);
}

.ai-reply-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.offer-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  background: white;
}

.offer-card-highlight {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(15, 107, 95, 0.12);
}

.offer-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.offer-card h3 {
  margin: 0 0 8px;
}

.offer-credits {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
}

.offer-price {
  margin: 4px 0 14px;
  color: var(--muted);
}

.offer-card form {
  margin: 0;
}

.tx-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.tx-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.tx-amount {
  font-weight: 700;
}

.tx-plus {
  color: var(--accent-dark);
}

.tx-minus {
  color: var(--danger);
}

.tx-balance {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 780px) {
  .home-hero {
    min-height: 86vh;
  }

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

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

  .mock-window {
    opacity: 0.28;
    right: -420px;
    top: 140px;
  }

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

  .details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .app-header,
  .request-main,
  .table-header,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-row,
  .request-meta,
  .tracking-form,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
