/* Alireta: one stylesheet for the storefront, customer dashboard and admin area. */
:root {
  --al-ink: #0b1f3a;          /* text and headings */
  --al-navy: #0f2f66;         /* deep blue: header, footer */
  --al-deep: #1450a3;         /* links, hover */
  --al-blue: #1e63d6;         /* primary buttons */
  --al-sky: #3ba7f0;          /* accents */
  --al-soft: #cfe0fa;         /* borders, subtle fills */
  --al-pale: #eaf2fd;         /* tinted panels */
  --al-bg: #f5f8fe;           /* page background */
  --al-white: #ffffff;
  --al-muted: #5b6b85;
  --al-good: #127a4b; --al-good-bg: #e3f5ec;
  --al-warn: #8a5a00; --al-warn-bg: #fff3d6;
  --al-bad: #b42318;  --al-bad-bg: #fde7e5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 4px 16px rgba(11, 31, 58, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--al-ink); background: var(--al-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--al-deep); }
a:hover { color: var(--al-blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--al-ink); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.muted { color: var(--al-muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt { margin-top: 24px; } .mb0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.topbar { background: var(--al-navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: .2px; display: inline-flex; align-items: center; gap: 8px; }
.logo-dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--al-sky), var(--al-blue)); display: inline-block; }
.logo:hover { color: #fff; }
.topnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.topnav a, .topnav button { color: #dce8fb; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; background: none; border: 0; font: inherit; cursor: pointer; }
.topnav a:hover, .topnav button:hover, .topnav a.on { background: rgba(255,255,255,.12); color: #fff; }
.footer { color: var(--al-muted); font-size: .875rem; padding: 32px 0 96px; }

/* Cards and panels */
.card { background: var(--al-white); border: 1px solid var(--al-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.panel { background: var(--al-pale); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { font-size: 1.6rem; font-weight: 800; color: var(--al-navy); }
.stat-label { color: var(--al-muted); font-size: .9rem; }
.page { padding: 24px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; background: var(--al-blue); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--al-deep); color: #fff; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .choice input:focus-visible + span { outline: 3px solid var(--al-sky); outline-offset: 2px; }
.btn-light { background: var(--al-white); color: var(--al-deep); border-color: var(--al-soft); }
.btn-light:hover { background: var(--al-pale); color: var(--al-deep); }
.btn-danger { background: var(--al-bad); }
.btn-danger:hover { background: #8f1c13; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; }

/* Forms */
label { display: block; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { color: var(--al-muted); font-size: .875rem; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9cdee; border-radius: 10px; font: inherit; color: var(--al-ink); background: #fff;
}
textarea { min-height: 90px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; }

/* Domain box */
.domain-box { display: flex; gap: 8px; flex-wrap: wrap; }
.domain-box input { flex: 1 1 220px; font-size: 1.1rem; }
.domain-box .btn { flex: 0 0 auto; }
.toggle { display: flex; max-width: 420px; background: var(--al-pale); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.toggle label { margin: 0; flex: 1 1 0; min-width: 0; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { display: block; text-align: center; white-space: nowrap; font-size: .875rem; padding: 8px 6px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--al-deep); }
.toggle input:checked + span { background: var(--al-blue); color: #fff; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--al-navy), var(--al-deep) 60%, var(--al-blue)); color: #fff; padding: 48px 0 56px; }
.hero h1 { color: #fff; font-size: 2rem; }
.hero p.lead { font-size: 1.15rem; color: #dce8fb; }
.hero .card { color: var(--al-ink); max-width: 640px; }
@media (min-width: 720px) { .hero h1 { font-size: 2.6rem; } }

/* Choice cards (website type, plans, payment) */
.choices { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .choices-3 { grid-template-columns: repeat(3, 1fr); } }
.choice { margin: 0; font-weight: 400; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; }
.choice > span { display: block; height: 100%; border: 2px solid var(--al-soft); border-radius: var(--radius); padding: 16px; background: #fff; }
.choice strong { display: block; font-size: 1.05rem; color: var(--al-ink); }
.choice input:checked + span { border-color: var(--al-blue); background: var(--al-pale); box-shadow: 0 0 0 3px rgba(30, 99, 214, .15); }
.choice .price { font-size: 1.4rem; font-weight: 800; color: var(--al-navy); margin: 6px 0; display: block; }
.ribbon { display: inline-block; background: var(--al-sky); color: #04203f; font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.features { list-style: none; padding: 0; margin: 8px 0 0; color: var(--al-muted); font-size: .92rem; }
.features li { padding: 2px 0; }

/* Step indicator */
.steps { display: flex; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; flex-wrap: wrap; }
.steps li { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: var(--al-pale); color: var(--al-muted); }
.steps li.on { background: var(--al-blue); color: #fff; font-weight: 700; }
.steps li.done { background: var(--al-soft); color: var(--al-deep); }

/* Progress list */
.progress { list-style: none; padding: 0; margin: 0; }
.progress li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--al-pale); }
.progress li:last-child { border-bottom: 0; }
.dot { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; background: var(--al-pale); color: var(--al-muted); }
.dot.ok { background: var(--al-good); color: #fff; }
.dot.now { background: var(--al-blue); color: #fff; animation: pulse 1.4s ease-in-out infinite; }
.dot.bad { background: var(--al-bad); color: #fff; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .dot.now { animation: none; } }

/* Badges and alerts */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge-good { background: var(--al-good-bg); color: var(--al-good); }
.badge-info { background: var(--al-pale); color: var(--al-deep); }
.badge-warn { background: var(--al-warn-bg); color: var(--al-warn); }
.badge-bad { background: var(--al-bad-bg); color: var(--al-bad); }
.badge-muted { background: #eef1f6; color: var(--al-muted); }
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.alert-good { background: var(--al-good-bg); color: var(--al-good); }
.alert-warn { background: var(--al-warn-bg); color: var(--al-warn); }
.alert-bad { background: var(--al-bad-bg); color: var(--al-bad); }
.alert-info { background: var(--al-pale); color: var(--al-deep); }
.alert ul { margin: 0; padding-left: 18px; }
.rehearsal-bar { background: var(--al-warn-bg); color: var(--al-warn); text-align: center; padding: 8px 16px; font-weight: 600; font-size: .9rem; }

/* Copyable values */
.copy { display: flex; gap: 8px; align-items: center; background: var(--al-pale); border-radius: 10px; padding: 8px 8px 8px 12px; margin-bottom: 8px; }
.copy code { flex: 1; font-size: 1rem; overflow-wrap: anywhere; color: var(--al-ink); }
details.reveal summary { cursor: pointer; color: var(--al-deep); font-weight: 600; }

/* Meter */
.meter { height: 10px; background: var(--al-pale); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--al-blue); }
.meter.warn > span { background: #d98a00; }

/* Data tables: normal tables on desktop, labelled cards on phones */
.table-wrap { width: 100%; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--al-muted); background: var(--al-pale); padding: 10px 12px; }
.data-table td { padding: 12px; border-top: 1px solid var(--al-pale); vertical-align: top; overflow-wrap: anywhere; }
.data-table td.cell-actions .btn-row { justify-content: flex-end; }
@media (max-width: 782px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table { background: none; box-shadow: none; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table tr { background: #fff; border: 1px solid var(--al-soft); border-radius: var(--radius); margin-bottom: 12px; padding: 12px; box-shadow: var(--shadow); }
  .data-table td { border: 0; padding: 4px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .data-table td::before { content: attr(data-label); font-weight: 600; color: var(--al-muted); text-align: left; flex: 0 0 40%; }
  .data-table td.cell-title { font-size: 1.05rem; font-weight: 700; display: block; text-align: left; padding-bottom: 8px; border-bottom: 1px solid var(--al-pale); margin-bottom: 6px; }
  .data-table td.cell-title::before, .data-table td.cell-actions::before { display: none; }
  .data-table td.cell-actions { display: block; padding-top: 10px; }
  .data-table td.cell-actions .btn-row { flex-direction: column; }
  .data-table td.cell-actions .btn, .data-table td.cell-actions form { width: 100%; }
}

/* Dashboard tab bar: bottom on phones, sidebar on desktop */
.dash { display: block; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--al-navy); border-top: 1px solid rgba(255,255,255,.1); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; color: #b9cdee; text-decoration: none; font-size: .75rem; padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: #fff; }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--al-sky); }
.tabbar .count { position: absolute; top: 4px; right: 22%; background: var(--al-bad); color: #fff; font-size: .7rem; border-radius: 999px; padding: 0 6px; }
@media (min-width: 900px) {
  .dash { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
  .tabbar { position: sticky; top: 16px; align-self: start; flex-direction: column; border-radius: var(--radius); padding: 8px; margin-top: 24px; bottom: auto; }
  .tabbar a { flex-direction: row; gap: 10px; font-size: .95rem; padding: 10px 12px; border-radius: 8px; text-align: left; }
  .tabbar a.on { background: rgba(255,255,255,.12); }
  .tabbar a.on::before { display: none; }
  .tabbar .count { position: static; margin-left: auto; }
  .footer { padding-bottom: 32px; }
}

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.checklist a { font-weight: 600; }

/* Site cards on the customer home */
.site-card { display: flex; flex-direction: column; gap: 10px; }
.site-card .domain { font-size: 1.2rem; font-weight: 800; overflow-wrap: anywhere; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status-line .led { width: 10px; height: 10px; border-radius: 50%; background: var(--al-good); }
.status-line .led.wait { background: #d98a00; }

pre.log { background: #0b1f3a; color: #dce8fb; padding: 12px; border-radius: 10px; overflow-x: auto; font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
html:not(.js) [data-copy] { display: none; }
