/* ============================================================
   WEB LAUNCH CO. — BUSINESS TOOLS SHARED STYLES  v1.0
   Used by: book-appointment, intake stages, invoice generator.
   Inherits the site design language (same variables, font).
   Does NOT affect any existing public page.
============================================================ */

/* ── Reset & Variables ───────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #1a2f4f;
  --bg-2:     #1e3456;
  --surface:  #22395e;
  --surface-2:#263f68;
  --border:   rgba(255,255,255,0.08);
  --border-h: rgba(139,92,246,0.4);
  --purple:   #8B5CF6;
  --purple-l: #a78bfa;
  --pink:     #EC4899;
  --green:    #22C55E;
  --red:      #EF4444;
  --grad:     linear-gradient(135deg,#8B5CF6 0%,#EC4899 100%);
  --white:    #FFFFFF;
  --g100:     #f4f4f5;
  --g300:     #d4d4d8;
  --g500:     #71717a;
  --g700:     #3f3f46;
  --g800:     #27272a;
  --font:     'Plus Jakarta Sans', sans-serif;
  --r:        12px;
  --tr:       all 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { height: 100%; scroll-padding-top: 80px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.bt-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar / nav ────────────────────────────────────────── */
.bt-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(26,47,79,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.bt-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
}
.bt-topbar-logo img { width: 32px; height: 32px; object-fit: contain; }
.bt-topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--tr);
}
.bt-topbar-back:hover { color: var(--white); }
.bt-topbar-back svg { flex-shrink: 0; }

/* ── Page header ─────────────────────────────────────────── */
.bt-hero {
  padding: 52px 24px 40px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.bt-hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.bt-hero h1 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.bt-hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bt-hero p {
  font-size: 14.5px;
  color: var(--white);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Main content area ───────────────────────────────────── */
.bt-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ── Card ─────────────────────────────────────────────────── */
.bt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 28px;
  margin-bottom: 20px;
}
.bt-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt-card-title svg { color: var(--purple-l); flex-shrink: 0; }

/* ── Form elements ───────────────────────────────────────── */
.bt-form { display: flex; flex-direction: column; gap: 0; }

.bt-field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.bt-field-group.full { grid-template-columns: 1fr; }

@media (max-width: 560px) {
  .bt-field-group { grid-template-columns: 1fr; }
}

.bt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bt-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.bt-field label .req { color: var(--white); margin-left: 2px; }

.bt-input,
.bt-select,
.bt-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: var(--tr);
  -webkit-appearance: none;
  appearance: none;
}
.bt-input::placeholder,
.bt-textarea::placeholder { color: rgba(255,255,255,0.4); }
.bt-input:focus,
.bt-select:focus,
.bt-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.bt-input.is-error,
.bt-select.is-error,
.bt-textarea.is-error { border-color: var(--red); }

.bt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.bt-select option { background: var(--surface); }

.bt-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.bt-field-hint {
  font-size: 11.5px;
  color: var(--white);
  margin-top: 2px;
}
.bt-field-error {
  font-size: 11.5px;
  color: var(--red);
  margin-top: 2px;
  display: none;
}
.bt-field-error.show { display: block; }

/* ── Section divider ─────────────────────────────────────── */
.bt-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.bt-btn-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.bt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--tr);
  text-decoration: none;
  white-space: nowrap;
}
.bt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.bt-btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(139,92,246,0.25);
}
.bt-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139,92,246,0.38);
}

.bt-btn-secondary {
  background: var(--surface-2);
  color: var(--white);
  border: 1px solid var(--border);
}
.bt-btn-secondary:hover {
  border-color: var(--border-h);
  color: var(--white);
}

.bt-btn-ghost {
  background: transparent;
  color: var(--white);
  font-size: 13px;
  padding: 8px 12px;
}
.bt-btn-ghost:hover { color: var(--white); }

/* Spinner inside button */
.bt-btn .spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.bt-btn.is-loading .spinner { display: block; }
.bt-btn.is-loading .btn-label { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert / status messages ─────────────────────────────── */
.bt-alert {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  line-height: 1.5;
  margin-top: 16px;
}
.bt-alert.show { display: flex; }
.bt-alert svg { flex-shrink: 0; margin-top: 1px; }
.bt-alert.success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: #86efac;
}
.bt-alert.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}
.bt-alert.info {
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--purple-l);
}

/* ── Progress steps (intake) ─────────────────────────────── */
.bt-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 20px;
}
.bt-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
  max-width: 120px;
}
.bt-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  transition: var(--tr);
  position: relative;
  z-index: 1;
}
.bt-step.active .bt-step-dot {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(139,92,246,0.2);
}
.bt-step.done .bt-step-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.bt-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  white-space: nowrap;
}
.bt-step.active .bt-step-label { color: var(--white); }
.bt-step.done .bt-step-label   { color: var(--white); }

/* connector line between steps */
.bt-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.bt-step.done:not(:last-child)::after { background: var(--green); }

/* ── Invoice-specific: items table ───────────────────────── */
.bt-invoice-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.bt-invoice-items thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid var(--border);
}
.bt-invoice-items tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.bt-invoice-items tbody tr:last-child td { border-bottom: none; }
.bt-invoice-items .td-num { text-align: right; color: var(--white); }
.bt-invoice-items .td-del { text-align: center; }

.bt-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.bt-totals-row {
  display: flex;
  gap: 24px;
  font-size: 13.5px;
}
.bt-totals-row .label { color: var(--white); min-width: 100px; text-align: right; }
.bt-totals-row .value { min-width: 90px; text-align: right; }
.bt-totals-row.grand .label,
.bt-totals-row.grand .value {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
}

/* ── Footer ──────────────────────────────────────────────── */
.bt-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--white);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.bt-footer a { color: var(--white); text-decoration: none; }
.bt-footer a:hover { color: var(--white); }

/* ── Utility ─────────────────────────────────────────────── */
.bt-hidden { display: none !important; }
.bt-text-muted { color: var(--white); font-size: 13px; }
.bt-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .bt-card { padding: 20px 16px; }
  .bt-hero  { padding: 36px 16px 28px; }
  .bt-btn-row { justify-content: stretch; }
  .bt-btn-row .bt-btn { flex: 1; justify-content: center; }
}
