:root {
  color-scheme: light;
  --ink: #172a39;
  --muted: #64727c;
  --blue: #3478a4;
  --blue-dark: #0e1a71;
  --line: #dce3e6;
  --paper: #f6f7f5;
  --card: #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
*[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a { color: inherit; }

.topbar {
  min-height: 78px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand { display: inline-flex; align-items: center; }
.brand img { width: 145px; height: auto; display: block; }
.top-link, .text-link, footer a { color: var(--blue-dark); font-size: 14px; font-weight: 650; text-decoration: none; }
.top-link:hover, .text-link:hover, footer a:hover { text-decoration: underline; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 72px; }

.hero {
  min-height: 320px;
  padding: 62px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .7fr);
  gap: 48px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
}

h1, h2, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 18px; font-size: clamp(40px, 6vw, 68px); line-height: .99; letter-spacing: -.055em; }
.hero-intro { max-width: 570px; margin-bottom: 20px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.text-link { display: inline-block; }

.hero-note {
  padding: 22px;
  border-left: 3px solid var(--blue);
  background: #eaf0f2;
  color: #435663;
  font-size: 14px;
  line-height: 1.55;
}
.hero-note p { margin: 12px 0 0; }
.note-mark { color: var(--blue-dark); font-size: 13px; font-weight: 800; letter-spacing: .16em; }

.catalog { padding: 30px 0 58px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.04em; }
.catalog-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.search-wrap input, .field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #cbd5da;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.search-wrap input { width: min(290px, 34vw); padding: 12px 14px; }
.field input, .field textarea, .field select { padding: 12px; }
.field textarea { resize: vertical; }
.product-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-card {
  min-height: 460px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.product-card:hover { border-color: #9ab8c8; box-shadow: 0 8px 24px #172a3910; transform: translateY(-2px); }
.product-card.is-selected { border: 2px solid var(--blue); padding: 20px; box-shadow: 0 0 0 3px #3478a418; }
.product-category { margin: 0 0 12px; color: var(--blue-dark); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.product-card h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.product-card p { margin: 0 0 17px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.product-gallery {
  width: 100%;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.product-image { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.product-image--primary { grid-column: 1 / -1; }
.product-image img { display: block; width: 100%; height: 102px; object-fit: contain; background: #fff; }
.product-image--primary img { height: 190px; }
.product-image figcaption { min-height: 30px; padding: 6px 8px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.product-select {
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  padding: 0 14px;
  border: 1px solid var(--blue-dark);
  border-radius: 6px;
  background: var(--blue-dark);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.product-select:hover { border-color: #09124e; background: #09124e; }
.product-select.is-selected { border-color: var(--blue); background: var(--blue); }
.product-select:focus-visible { outline: 3px solid #3478a466; outline-offset: 2px; }
.product-source { display: block; margin-top: 11px; font-size: 12px; }
.product-source a { color: var(--muted); }
.status { min-height: 20px; color: var(--muted); font-size: 13px; }

.lead-panel {
  margin: 0 0 60px;
  padding: 34px;
  border-radius: 12px;
  background: #eaf0f2;
}
.lead-actions, .lead-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.storage-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.privacy-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status-error { color: #a12622; }
.account-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.account-email { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.database-notice, .auth-form {
  max-width: 560px;
  margin: 22px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.database-notice h3, .auth-form h3 { margin: 0 0 10px; font-size: 18px; }
.database-notice p, .auth-form p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.database-notice a { color: var(--blue-dark); font-size: 14px; font-weight: 700; }
.auth-form { display: grid; gap: 14px; }
.auth-form p { margin: 0; }
.workspace-actions { justify-content: flex-end; margin-bottom: 14px; }
.activity-panel { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.activity-panel summary { color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.activity-panel .storage-note { margin-top: 12px; }
.activity-list { display: grid; gap: 8px; padding-left: 22px; color: var(--ink); font-size: 13px; }
.activity-list li { padding-left: 3px; }
.activity-list time { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.lead-layout {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.6fr);
  gap: 28px;
  align-items: start;
}
.lead-form { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.lead-form h3, .lead-list h3 { margin: 0; font-size: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; }
.field-hint { color: var(--muted); font-size: 11px; font-weight: 450; }
.button { min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.button:disabled, .icon-button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { background: var(--blue-dark); color: #fff; }
.button-primary:not(:disabled):hover { background: #09124e; }
.button-secondary { border-color: #aab9c1; background: #fff; color: var(--ink); }
.button-secondary:hover { border-color: var(--blue-dark); }
.lead-list { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.lead-list-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 14px; }
.lead-list-heading .status { margin: 6px 0 0; }
.lead-filters input, .lead-filters select { min-height: 40px; padding: 8px 10px; }
.lead-filters input { width: 180px; }
.lead-filters select { max-width: 150px; }
.table-scroll { width: 100%; overflow-x: auto; }
.lead-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.lead-table th { padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.lead-table td { min-width: 90px; padding: 12px 8px; border-bottom: 1px solid #edf0f1; vertical-align: top; }
.lead-table th:first-child, .lead-table td:first-child { min-width: 175px; }
.lead-contact { display: grid; gap: 3px; }
.lead-contact strong { color: var(--ink); font-size: 13px; }
.lead-contact span { color: var(--muted); overflow-wrap: anywhere; }
.demo-tag { width: fit-content; margin-top: 2px; padding: 2px 6px; border-radius: 10px; background: #eaf0f2; color: #435663 !important; font-size: 10px; font-weight: 700; }
.lead-status-select { min-width: 110px; padding: 7px; border: 1px solid #cbd5da; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.icon-button { padding: 6px 8px; border: 1px solid #d6aaaa; border-radius: 5px; background: #fff; color: #8d2924; font: inherit; font-size: 11px; cursor: pointer; }
.icon-button:hover:not(:disabled) { background: #fff3f2; }
.empty-state { margin: 16px 0 0; padding: 24px; border: 1px dashed #cbd5da; border-radius: 6px; color: var(--muted); text-align: center; font-size: 13px; }
.lead-form :focus-visible, .lead-filters :focus-visible, .lead-table :focus-visible { outline: 3px solid #3478a466; outline-offset: 2px; }
footer { max-width: 1180px; margin: 0 auto; padding: 21px 24px 30px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.public-nav, .staff-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.public-nav .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.staff-auth-main { min-height: calc(100vh - 150px); display: grid; place-items: center; }
.staff-auth-card { width: min(100%, 480px); margin: 48px auto; padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 40px #172a390a; }
.staff-auth-card h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 46px); }
.staff-auth-card > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.staff-auth-card .auth-form { margin: 22px 0 14px; padding: 0; border: 0; }
.staff-auth-help { margin-bottom: 0; font-size: 12px !important; }
.staff-main { padding-top: 40px; }
.staff-page-heading { padding: 4px 0 22px; }
.staff-page-heading h1 { max-width: 780px; font-size: clamp(36px, 5vw, 54px); }
.staff-page-heading > p:not(.eyebrow) { max-width: 700px; color: var(--muted); line-height: 1.55; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.staff-nav a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--blue-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.staff-nav a:hover { border-color: var(--blue); background: #eaf0f2; }
.staff-panel { margin: 24px 0; padding: 26px; border: 1px solid var(--line); border-radius: 11px; background: #fff; scroll-margin-top: 18px; }
.staff-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 20px; }
.staff-section-heading h2 { font-size: clamp(25px, 3vw, 34px); }
.staff-section-heading .eyebrow { margin-bottom: 9px; }
.staff-panel-intro { max-width: 700px; margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.staff-status { margin: 14px 0; }
.lead-actions input, .lead-actions select, .social-account-form input, .social-account-form select {
  min-height: 42px; padding: 9px 11px; border: 1px solid #cbd5da; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 13px;
}
.lead-actions input { min-width: 220px; }
.lead-actions select { min-width: 145px; }
.staff-lead-table td { min-width: 115px; }
.staff-lead-table td:first-child { min-width: 200px; }
.staff-lead-table td:nth-child(3) { min-width: 180px; max-width: 280px; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-subtext { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.campaign-layout { display: grid; grid-template-columns: minmax(270px, .75fr) minmax(0, 1.25fr); gap: 28px; align-items: start; }
.staff-form { display: grid; gap: 15px; }
.staff-form .field textarea { min-height: 94px; }
.account-targets { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.account-targets legend { padding: 0 5px; font-size: 13px; font-weight: 700; }
.account-targets .status { margin: 0; }
.social-account-targets { display: grid; gap: 8px; }
.account-target { display: flex; gap: 9px; align-items: center; color: var(--ink); font-size: 12px; }
.account-target input { accent-color: var(--blue-dark); }
.campaign-preview { min-width: 0; }
.campaign-preview > h3, .campaign-history h3 { margin: 0 0 12px; font-size: 17px; }
.campaign-image-preview { max-width: 500px; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.campaign-image-preview img { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.campaign-image-preview figcaption { padding: 9px 11px; color: var(--muted); font-size: 11px; }
.campaign-preview-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.platform-preview { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.platform-preview h4 { margin: 0 0 8px; font-size: 13px; }
.platform-preview p { min-height: 112px; margin: 0 0 10px; color: #435663; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-count { color: var(--muted); font-size: 10px; }
.campaign-history { margin-top: 34px; }
.campaign-history .table-scroll { margin-top: 8px; }
.campaign-history .lead-table td { min-width: 140px; }
.social-account-form { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr auto; gap: 12px; align-items: end; }
.social-account-form .field { min-width: 0; }
.social-account-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.social-account-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font-size: 12px; }
.social-account-list .button { min-height: 34px; }
.staff-panel .activity-list { margin-bottom: 0; }
.staff-panel .database-notice { margin: 0; }
.staff-main .database-notice { max-width: none; }

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 45px 0; }
  .hero-note { max-width: 440px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-layout { grid-template-columns: 1fr; }
  .campaign-layout { grid-template-columns: 1fr; }
  .social-account-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-actions { justify-content: flex-start; }
  .lead-panel { padding: 24px; }
}

@media (max-width: 520px) {
  .topbar { min-height: 65px; padding: 12px 18px; }
  .brand img { width: 122px; }
  .top-link { font-size: 12px; }
  .public-nav, .staff-toolbar { gap: 8px; }
  .public-nav .button, .staff-toolbar .button { min-height: 38px; padding: 0 10px; font-size: 11px; }
  .account-email { display: none; }
  main { padding: 0 18px 48px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-wrap input { width: 100%; }
  .product-list { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .product-image--primary img { height: 170px; }
  .staff-main { padding-top: 26px; }
  .staff-panel { padding: 17px; }
  .staff-auth-card { padding: 22px; }
  .lead-actions input { min-width: 100%; }
  .lead-actions select { flex: 1; }
  .campaign-preview-list { grid-template-columns: 1fr; }
  .social-account-form { grid-template-columns: 1fr; }
  .lead-panel { padding: 18px; }
  .lead-list { padding: 14px; }
  .lead-list-heading { flex-direction: column; }
  .lead-filters { width: 100%; }
  .lead-filters label:first-child { flex: 1; }
  .lead-filters input { width: 100%; }
  .lead-actions { width: 100%; }
  .lead-actions .button { flex: 1; padding: 0 8px; }
  footer { padding-right: 18px; padding-left: 18px; flex-direction: column; }
}
