/* Stitches — Matching FRESH. premium style */
:root {
  --bg: #ffffff;
  --fg: #001a2d;
  --muted: #6b7280;
  --accent: #529ab7;
  --accent-hover: #2f7691;
  --accent-light: #eaf3f7;
  --line: #e5e7eb;
  --card: #ffffff;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color: var(--fg); background: var(--bg); line-height: 1.5; }

/* Header */
.site-header { padding: 16px 24px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 100; }
.site-header .logo { height: 28px; width: auto; }
.site-header nav { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.site-header nav a { color: var(--fg); text-decoration: none; font-size: 14px; }
.site-header .btn { background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--radius); font-weight: 500; }
.site-header .btn:hover { background: var(--accent-hover); }

/* Mobile nav */
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; gap: 12px; }
  .site-header nav { width: 100%; justify-content: flex-end; gap: 12px; }
  .site-header nav a:not(.btn) { font-size: 13px; }
}

/* Hero */
.hero { text-align: center; padding: 64px 24px; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.2; margin: 0 0 16px; font-weight: 700; }
.hero p { font-size: clamp(16px, 2vw, 18px); color: var(--muted); margin: 0 0 28px; }
.hero .cta { display: inline-block; background: var(--accent); color: #fff; padding: 14px 28px; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 16px; }
.hero .cta:hover { background: var(--accent-hover); }

@media (max-width: 600px) {
  .hero { padding: 40px 16px; }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto; padding: 56px 24px; }
.feature { text-align: center; padding: 20px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* Plans */
.plans { background: #f8fafc; padding: 56px 24px; text-align: center; }
.plans h2 { margin: 0 0 28px; font-size: 28px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.plan h3 { margin: 0 0 8px; font-size: 20px; }
.plan .price { font-size: 32px; font-weight: 700; margin: 8px 0; }
.plan .price span { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0; text-align: left; font-size: 14px; }
.plan li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan .btn { display: block; background: var(--accent); color: #fff; padding: 12px; border-radius: var(--radius); text-decoration: none; margin-top: 16px; font-weight: 500; }
.plan .btn:hover { background: var(--accent-hover); }

/* Forms */
.form-page { max-width: 420px; margin: 0 auto; padding: 40px 24px; }
.form-page h1 { font-size: 28px; margin: 0 0 8px; }
.form-page .lead { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.form-page label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
.form-page input, .form-page select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 16px; }
.form-page input:focus, .form-page select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82,154,183,.15); }
.form-page button { margin-top: 24px; width: 100%; padding: 14px; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.form-page button:hover { background: var(--accent-hover); }
.form-page button:disabled { opacity: .6; cursor: not-allowed; }
.form-page .err { color: #b91c1c; font-size: 14px; margin-top: 12px; }
.form-page .ok { color: var(--accent); font-size: 14px; margin-top: 12px; }
.form-page .alt { margin-top: 24px; text-align: center; font-size: 14px; }
.form-page .alt a { color: var(--accent); }

/* Dashboard */
.dash-header { padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-header strong { font-size: 18px; }
.dash-header a { margin-left: auto; color: var(--accent); text-decoration: none; }
.dash-main { padding: 32px 24px; max-width: 1100px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.stat-card h3 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.stat-card .num { font-size: 28px; font-weight: 700; }
.stat-card .sub { font-size: 12px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); background: #f8fafc; }

@media (max-width: 600px) {
  th, td { padding: 8px; font-size: 13px; }
}

/* Footer */
.site-footer { text-align: center; padding: 40px 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge.trial { background: #fef3c7; color: #92400e; }
.badge.active { background: #d1fae5; color: #065f46; }
.badge.past_due { background: #fee2e2; color: #991b1b; }
.badge.recibido { background: #dbeafe; }
.badge.en_proceso { background: #fef3c7; }
.badge.listo { background: #d1fae5; }
.badge.entregado { background: #e5e5e5; }
