/* AI VIP — quote/sign pages. Brand matched to aivip.ca (dark navy + cyan/violet). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --black: #06080f;
  --navy: #0d1330;
  --navy-light: #141a42;
  --surface: #111631;
  --surface-light: #1a2050;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --cyan: #00d4ff;
  --violet: #7b61ff;
  --amber: #ffb800;
  --green: #00ff88;
  --text: #e8eaf0;
  --text-dim: #8a8fa8;
  --text-muted: #555b78;
  --white: #ffffff;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -10%, var(--navy-light), var(--black) 60%) fixed, var(--black);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }

/* Header / logo */
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 0 28px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--black);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.logo-text { font-family: var(--font-display); font-weight: 800; letter-spacing: .5px; font-size: 18px; }
.logo-text span { color: var(--cyan); }

/* Card */
.card {
  background: linear-gradient(180deg, var(--surface), var(--navy));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 20px;
}
.card h1, .card h2 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.card h1 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 6px; }
.card h2 { font-size: 18px; margin: 4px 0 16px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.muted { color: var(--text-dim); }
.ref { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Line items */
.lineitems { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.lineitems td { padding: 14px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.lineitems tr:last-child td { border-bottom: none; }
.li-label { color: var(--text); font-weight: 500; }
.li-sub { display: block; color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.li-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.li-value .per { color: var(--text-dim); font-weight: 400; font-size: 13px; }

.total-row td { padding-top: 18px; font-size: 18px; }
.total-row .li-value { color: var(--cyan); font-family: var(--font-display); font-size: 22px; }

.services { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-light); border: 1px solid var(--border); color: var(--text-dim);
}

/* Buttons */
.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  border: none; border-radius: 12px; padding: 16px 24px; width: 100%;
  cursor: pointer; color: var(--black); transition: transform .15s var(--ease), filter .15s var(--ease);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.btn-ghost {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  font-size: 14px; padding: 10px 16px; width: auto;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hover); }

/* Form fields */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.field input:focus { outline: none; border-color: var(--cyan); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Signature pad */
.sigwrap { margin: 6px 0 4px; }
.sigpad {
  width: 100%; height: 200px; border-radius: 12px; background: #fbfdff;
  border: 1px solid var(--border-hover); touch-action: none; display: block; cursor: crosshair;
}
.sigbar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.sighint { font-size: 12px; color: var(--text-muted); }

.legal { font-size: 12px; color: var(--text-muted); margin: 16px 0; line-height: 1.6; }

/* Terms & Conditions block */
.terms-block {
  max-height: 320px; overflow-y: auto; padding: 16px; margin-top: 8px;
  background: var(--black); border: 1px solid var(--border); border-radius: 12px;
}
.terms-pre { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.terms-h { font-family: var(--font-display); font-size: 14px; color: var(--text); margin: 14px 0 6px; }
.terms-h:first-child { margin-top: 0; }
.terms-sub { font-size: 13px; font-weight: 600; color: var(--text); margin: 8px 0 2px; }
.terms-body { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; line-height: 1.6; }

/* States */
.state { text-align: center; padding: 60px 20px; }
.state .icon { font-size: 44px; margin-bottom: 12px; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--cyan);
  border-radius: 50%; margin: 0 auto 16px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { border-color: rgba(255,90,90,.35); }
.success .icon { color: var(--green); }

.hidden { display: none !important; }
.foot { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 28px; }
.foot a { color: var(--text-dim); text-decoration: none; }

@media (max-width: 520px) {
  .card { padding: 20px; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---- Admin builder ---- */
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
select {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: var(--black); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
select:focus { outline: none; border-color: var(--cyan); }
.li-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.li-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 4px 6px; font-weight: 600; }
.li-table td { padding: 4px; vertical-align: middle; }
.li-table input, .li-table select { padding: 9px 10px; font-size: 14px; border-radius: 8px; }
.li-table input.num { text-align: right; }
.col-desc { width: 38%; } .col-type { width: 18%; } .col-price { width: 16%; } .col-qty { width: 12%; } .col-tot { width: 12%; }
.li-total { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; padding-right: 8px; }
.del-row { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; }
.del-row:hover { color: #ff6b6b; }
.addbar { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; align-items: center; }
.totsbox { display: flex; gap: 28px; justify-content: flex-end; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.totsbox .t { text-align: right; } .totsbox .t .lbl { font-size: 12px; color: var(--text-dim); } .totsbox .t .val { font-family: var(--font-display); font-size: 20px; color: var(--cyan); font-weight: 700; }
.result-link { display: flex; gap: 10px; margin-top: 10px; }
.result-link input { flex: 1; background: var(--black); }
.copied { color: var(--green); font-size: 13px; }
.inline-note { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
