@import url("/css/theme.css?v=2");
@import url("/css/site-nav.css?v=36-sidebar-unread");
/* Shared Brokermint-style date field (calendar chip + popover) */
@import url("/css/bia-date-field.css?v=2");
@import url("/css/mobile.css?v=1");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* Layout */
.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ── SaaS landing page (homepage) ── */
.landing-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--landing-max), 92vw);
  margin: 0 auto;
  padding: 1rem 0;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.landing-brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.landing-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.12);
}

.landing-brand__name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.landing-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-header__user {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing {
  flex: 1;
  width: min(var(--landing-max), 92vw);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.landing-hero__title {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.landing-hero__title img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.landing-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--accent-navy);
}

.landing-lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.landing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.landing-pills li {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.landing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 36rem;
}

.landing-actions[data-count="5"],
.landing-actions[data-count="7"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.landing-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.landing-card__label {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent-navy);
}

.landing-card__desc {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.landing-card--admin {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
}

.landing-hero__visual {
  margin: 0;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}

.landing-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-footer {
  width: min(var(--landing-max), 92vw);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-hero__visual {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .landing-actions {
    grid-template-columns: 1fr;
  }

  .landing-header__user {
    display: none;
  }
}

/* Legacy hero (portal subpages that still use .hero) */
body > .hero {
  min-height: auto;
  display: block;
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero__content {
  width: min(640px, 100%);
  margin: 0 auto;
}

.hero__brand {
  margin: 0 auto 2rem;
  width: min(180px, 44vw);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}

.hero__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-logo {
  display: block;
  height: 12px;
  width: auto;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-link:hover {
  text-decoration: none;
  opacity: 0.92;
}

body > .hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

body > .hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  margin: 2rem auto 0;
}

.hero__actions .btn--hero {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 240px;
  min-height: 3.75rem;
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  text-decoration: none;
}

@media (max-width: 700px) {
  .hero__actions .btn--hero {
    flex: 1 1 100%;
    max-width: none;
  }
}

.home-scripts {
  margin-top: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.home-scripts__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.home-scripts__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.home-scripts__all {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.home-scripts__all:hover {
  text-decoration: underline;
}

.home-scripts__gate {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.home-scripts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.home-scripts__list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.home-scripts__list li:last-child {
  border-bottom: none;
}

.home-scripts__list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.home-scripts__list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.home-scripts__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero__domains {
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero__content p {
  margin-left: auto;
  margin-right: auto;
}

.hero__features {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.hero__features a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.hero__features a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.hero__nav a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.hero__nav a:hover {
  text-decoration: underline;
}

.hero__nav a.is-active {
  color: var(--text);
  text-decoration: underline;
}

.hero__features span::before {
  content: "✓ ";
  color: var(--success);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn--hero:hover {
  text-decoration: none;
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Auth & Setup panels */
.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.panel__card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
}

.panel__card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.panel__card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
}

.dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dashboard__brand {
  font-weight: 700;
  font-size: 1.1rem;
}

.dashboard__brand span {
  color: var(--accent);
}

.dashboard__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard__greeting {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dashboard__main {
  padding: 2rem;
}

.dashboard__title {
  margin-bottom: 1.5rem;
}

.dashboard__title h1 {
  font-size: 1.75rem;
}

.dashboard__title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card__header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card__body {
  padding: 0.75rem 1.25rem 1.25rem;
}

.card-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.card-item:last-child { border-bottom: none; }

.card-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.card-item__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.badge--active, .badge--closed { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge--pending, .badge--draft, .badge--lead { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.dashboard__actions {
  margin-bottom: 1.5rem;
}

