/* A2P Pro — SaaS dashboard styles. Brand-consistent with marketing site. */
:root {
  --brand:        #dc2626;
  --brand-dark:   #991b1b;
  --brand-tint:   #fef2f2;
  --ink:          #0f172a;
  --ink-2:        #334155;
  --ink-3:        #64748b;
  --ink-4:        #94a3b8;
  --line:         #e2e8f0;
  --line-2:       #f1f5f9;
  --bg:           #f8fafc;
  --bg-card:      #ffffff;
  --good:         #16a34a;
  --warn:         #f59e0b;
  --bad:          #dc2626;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-hover: 0 4px 12px rgba(15,23,42,0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------- Top bar -------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--brand); color: white;
  border-radius: 7px; font-weight: 700; font-size: 14px;
}
.brand-name { font-size: 16px; letter-spacing: -0.01em; }
.topnav { display: inline-flex; align-items: center; gap: 12px; }
.topnav a { color: var(--ink-2); font-size: 14px; }
.topnav a:hover { color: var(--ink); text-decoration: none; }

/* -------- Layout -------- */
.container { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }
.container.narrow { max-width: 480px; }
.hero { padding: 56px 0; }
.hero-text h1 { font-size: 40px; line-height: 1.1; margin: 8px 0 12px; letter-spacing: -0.02em; }
.hero-text .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 24px; max-width: 640px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 14px; font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  line-height: 1.2;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: var(--bg-card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); text-decoration: none; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-points { margin: 28px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14px; }
.hero-points li { margin: 6px 0; padding-left: 18px; position: relative; }
.hero-points li:before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

/* -------- Cards -------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 0 0 20px;
}
.card h1 { font-size: 22px; margin: 0 0 12px; letter-spacing: -0.01em; }
.card h2 { font-size: 16px; margin: 0; font-weight: 700; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mt-3 { margin-top: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* -------- Forms -------- */
.field { display: block; margin: 0 0 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.field-input {
  display: block; width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}

/* -------- Status / alerts -------- */
.status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin: 14px 0;
  border: 1px solid var(--line);
  background: var(--line-2);
  color: var(--ink-2);
}
.status.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.status.warn    { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.status.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.status a { color: inherit; text-decoration: underline; }

/* -------- Dashboard -------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.dash-head h1 { font-size: 28px; margin: 4px 0 6px; letter-spacing: -0.02em; }
.dash-head-cta { display: flex; gap: 10px; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; }
.kv dt { color: var(--ink-3); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-card);
  display: flex; flex-direction: column; gap: 12px;
}
.project-head { display: flex; align-items: center; gap: 12px; }
.project-mark {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand);
  border-radius: 8px;
  font-weight: 700; font-size: 16px;
}
.project-title { font-weight: 600; }
.project-body { display: flex; flex-direction: column; gap: 4px; }
.project-status { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-3); width: max-content; }
.project-status.status-live, .project-status.status-published { background: #ecfdf5; color: #065f46; }
.project-status.status-draft { background: #f1f5f9; color: var(--ink-3); }
.project-foot { display: flex; gap: 8px; margin-top: auto; }

.empty { color: var(--ink-3); font-size: 14px; padding: 24px 0; text-align: center; }
.empty.error { color: var(--bad); }

/* -------- Pricing -------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 24px 0 0; }
.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 16px;
}
.plan-card.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220,38,38,0.08), var(--shadow); }
.plan-tag { position: absolute; top: -10px; right: 16px; background: var(--brand); color: white; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.plan-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.plan-price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.plan-period { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.plan-features { list-style: none; padding: 0; margin: 0; flex: 1; }
.plan-features li { padding: 6px 0; font-size: 14px; color: var(--ink-2); position: relative; padding-left: 22px; }
.plan-features li:before { content: "✓"; color: var(--good); position: absolute; left: 0; font-weight: 700; }

/* -------- Footer -------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-card);
  padding: 20px 24px;
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-3);
  flex-wrap: wrap; gap: 8px;
}
.footer a { color: var(--ink-3); }
.footer a:hover { color: var(--ink); text-decoration: none; }

/* -------- Responsive -------- */
@media (max-width: 640px) {
  .container { padding: 20px 16px 40px; }
  .hero-text h1 { font-size: 30px; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
