/* QuickBiz Web — one stylesheet for site, admin and customer portal */
:root {
  --blue: #1E6FD0;
  --blue-dark: #1757A6;
  --blue-soft: #E8F1FC;
  --text: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --green: #16A34A;
  --green-soft: #DCFCE7;
  --yellow: #CA8A04;
  --yellow-soft: #FEF9C3;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.hidden { display: none !important; }
.show-sm { display: none; }

/* ---------- Cards, grid ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.card h2 { margin-bottom: 1rem; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; min-height: 42px;
}
.btn:hover { background: #F3F4F6; text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #12833B; }
.btn-danger { color: var(--red); border-color: #FCA5A5; }
.btn-block { width: 100%; }
.btn-lg { padding: .9rem 1.25rem; font-size: 1.05rem; min-height: 52px; }
.btn-sm { padding: .35rem .7rem; min-height: 32px; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
form.inline { display: inline; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel],
input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid #D1D5DB; border-radius: 10px;
  font: inherit; color: var(--text); background: #fff; min-height: 42px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }

/* ---------- Flash, badges ---------- */
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.flash-success { background: var(--green-soft); color: #14532D; }
.flash-error { background: var(--red-soft); color: #7F1D1D; }
.flash-info { background: var(--blue-soft); color: #1E3A8A; }
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem;
  font-weight: 700; letter-spacing: .02em; background: #F3F4F6; color: #374151; white-space: nowrap;
}
.badge-blue { background: var(--blue-soft); color: var(--blue-dark); }
.badge-green { background: var(--green-soft); color: #166534; }
.badge-yellow { background: var(--yellow-soft); color: #854D0E; }
.badge-red { background: var(--red-soft); color: #991B1B; }
.badge-upper { text-transform: uppercase; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: #EEF0F3; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.progress-lg { height: 14px; }
.progress-green > span { background: var(--green); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Admin shell ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 1.25rem 1rem; position: sticky; top: 0; height: 100vh; }
.sidebar .logo img { width: 150px; display: block; margin: 0 .25rem 1.5rem; }
.nav a {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 10px;
  color: #374151; font-weight: 500; margin-bottom: .15rem;
}
.nav a:hover { background: #F3F4F6; text-decoration: none; }
.nav a.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .logout { margin-top: 1.5rem; }
.main { padding: 1.75rem 2rem 6rem; max-width: 1200px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
@media (max-width: 800px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 50;
    border-right: 0; border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .sidebar .logo, .sidebar .logout { display: none; }
  .nav { display: flex; justify-content: space-around; }
  .nav a { flex-direction: column; gap: .15rem; font-size: .7rem; padding: .35rem .4rem; margin: 0; }
  .main { padding: 1rem 1rem 6rem; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn { flex: 1 1 auto; }
  .hide-sm { display: none; }
  .show-sm { display: inline-block; }
  h1 { font-size: 1.4rem; }
}

/* ---------- Stats ---------- */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: .15rem; }
.stat .sub { color: var(--muted); font-size: .8rem; }
.goal-amount { font-size: 2rem; font-weight: 800; }

/* ---------- Call mode ---------- */
.call-wrap { max-width: 640px; margin: 0 auto; }
.call-counter { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.call-counter strong { font-size: 1.15rem; }
.call-card h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.call-meta { color: var(--muted); margin-bottom: 1rem; }
.call-btn { font-size: 1.2rem; min-height: 60px; margin: .5rem 0 1rem; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.outcomes .btn { min-height: 52px; width: 100%; }
.script-box { white-space: pre-wrap; background: #F9FAFB; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; font-size: .95rem; }
details summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }

/* ---------- Filters ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filters .field { margin: 0; }

/* ---------- Portal (customer status page) ---------- */
.portal { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.portal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.portal-top img { width: 110px; }
.portal-title { text-align: center; margin: .5rem 0 2rem; }
.portal-title h1 { font-size: 2rem; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.kv .k { color: #374151; font-size: .9rem; }
.kv .v { font-weight: 600; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr 1fr; } .portal-title h1 { font-size: 1.5rem; } }
.phase { color: var(--blue); font-weight: 600; font-size: 1.1rem; }
.milestones { list-style: none; margin: 0; padding: 0; }
.milestones li { display: grid; grid-template-columns: 28px 1fr auto; gap: .75rem; padding: .7rem 0; }
.milestones .ico { width: 22px; height: 22px; margin-top: 2px; }
.milestones .title { font-weight: 600; }
.milestones .desc { color: var(--muted); }
.milestones .date { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ico-done { color: var(--green); }
.ico-current { color: var(--blue); }
.ico-pending { color: #9CA3AF; }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { border-left: 3px solid var(--blue); padding: .1rem 0 .1rem .75rem; margin-bottom: 1rem; }
.updates li.green { border-color: var(--green); }
.updates li.yellow { border-color: #EAB308; }
.updates .when { color: var(--muted); font-size: .85rem; }
.pm-row { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.pm-row svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.preview-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.contract-text { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.65; }
.contract-text strong { font-family: Inter, system-ui, sans-serif; }

/* ---------- Public site ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .inner { max-width: 1140px; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header img { width: 130px; display: block; }
.site-nav { display: flex; gap: 1.25rem; align-items: center; }
.site-nav a { color: var(--text); font-weight: 500; }
@media (max-width: 640px) { .site-nav a:not(.btn) { display: none; } .site-header img { width: 110px; } }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 2rem; margin-bottom: .75rem; }
.lead-text { font-size: 1.15rem; color: #374151; max-width: 640px; }
.hero { padding: 5rem 0 4rem; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.02em; max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .btn-row { margin-top: 1.75rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.75rem 0 0; padding: 0; list-style: none; color: #374151; font-weight: 500; }
.hero-points li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: .4rem; }
.steps { counter-reset: s; }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-dark); font-weight: 800; display: grid; place-items: center; margin-bottom: .75rem; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card .price { font-size: 2.4rem; font-weight: 800; margin: .25rem 0; }
.price-card .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card ul { padding-left: 1.1rem; margin: .5rem 0 1.25rem; flex: 1; }
.price-card li { margin-bottom: .35rem; }
.price-card.featured { border: 2px solid var(--blue); }
.price-card .tag { position: absolute; top: -12px; left: 1.5rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: .6rem; }
.faq details p { margin: .6rem 0 0; color: #374151; }
.cta-band { background: var(--blue); color: #fff; border-radius: 18px; padding: 2.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band .btn { background: #fff; color: var(--blue-dark); border-color: #fff; }
.site-footer { color: var(--muted); font-size: .9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Public site specifics ---------- */
:root { --sun: #FFC93C; --sky: #EEF5FD; }
.site { background: #fff; }
.site h1, .site h2, .site h3, .page-h1 { font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; letter-spacing: -.015em; }
.site .section-alt { background: var(--sky); border-color: #DCE8F7; }
.site .section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.page-h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .75rem; }
.hero { background: #fff; padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.hero .lead-text { margin-top: 1.25rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } .hero { padding-top: 2.5rem; } }
.price-tag { position: absolute; right: -14px; top: 38%; background: var(--sun); color: #111827; border-radius: 10px; padding: .55rem .8rem; transform: rotate(4deg); box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); text-align: center; line-height: 1.1; }
.price-tag strong { display: block; font-family: "Bricolage Grotesque", Inter, sans-serif; font-size: 1.5rem; }
.price-tag span { font-size: .75rem; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .price-tag { animation: tag-in .6s .3s both cubic-bezier(.2, .9, .3, 1.3); } }
@keyframes tag-in { from { opacity: 0; transform: rotate(-8deg) scale(.6); } to { opacity: 1; transform: rotate(4deg) scale(1); } }
ol.steps { list-style: none; padding: 0; margin: 2rem 0 0; }
.steps .card { margin: 0; }
.steps p { color: #374151; margin: 0; }
.prices { margin-top: 2rem; align-items: stretch; }
.prices .price-card { margin: 0; }
.rules { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr; gap: 1rem; } }
.rules-list { margin: 0; }
.rules-list > div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.rules-list > div:first-child { padding-top: 0; }
.rules-list dt { font-weight: 700; font-size: 1.05rem; }
.rules-list dd { margin: .2rem 0 0; color: #374151; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 1rem; } }
.plain-list { padding-left: 1.1rem; margin: 0; }
.plain-list li { margin-bottom: .4rem; }
.site-nav a[aria-current] { color: var(--blue); }

/* ---------- Auth / install ---------- */
.auth-box { max-width: 440px; margin: 8vh auto; padding: 0 1rem; }
.auth-box .logo { display: block; width: 180px; margin: 0 auto 1.5rem; }

@media print {
  .no-print, .site-header, .sidebar { display: none !important; }
  body { background: #fff; }
  .card { border: 0; box-shadow: none; padding: 0; }
}
