/* ==========================================================================
   The Comfort Zone Heating & Cooling — one project-scoped design system
   ========================================================================== */
:root {
  --navy: #132238;
  --navy-soft: #1d3550;
  --ink: #132238;
  --blue: #2d6be4;
  --blue-dark: #1e53bd;
  --blue-ink: #1a4aa8;
  --sky: #e9f1ff;
  --sky-soft: #f1f7ff;
  --red: #df4335;
  --red-soft: #fff0ed;
  --cream: #f7f1e6;
  --paper: #ffffff;
  --muted: #5e6c80;
  --muted-light: #8794a7;
  --line: #e5e9f0;
  --line-dark: #d5dbe5;
  --green: #12805c;
  --green-soft: #e8f7f0;
  --amber: #b54708;
  --amber-soft: #fff4e5;
  --purple: #6941c6;
  --purple-soft: #f3efff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(11, 31, 58, 0.1);
  --shadow-soft: 0 12px 32px rgba(11, 31, 58, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 92px 0; }
.section-sm { padding: 56px 0; }
.section-tight { padding: 40px 0; }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-sky { background: var(--sky-soft); }
.bg-cream { background: var(--cream); }

.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 30px; height: 30px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}
.kicker.red { color: var(--red); }
.kicker.light { color: #9dc0ff; }

.display {
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--navy);
}
h1.display { font-size: clamp(2.7rem, 5.4vw, 4.7rem); }
h2.display { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3.display { font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.lede { font-size: 1.12rem; color: var(--muted); line-height: 1.65; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.strong { font-weight: 700; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 750;
  font-size: 0.92rem;
  line-height: 1.1;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(33, 88, 255, 0.24); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #17345f; }
.btn-red { background: var(--red); color: #fff; }
.btn-outline { border-color: var(--line-dark); background: #fff; color: var(--navy); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: rgba(11, 31, 58, 0.05); }
.btn-light { background: #fff; color: var(--navy); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 0.8rem; }
.btn-xs { min-height: 30px; padding: 5px 11px; font-size: 0.74rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; color: var(--blue); }
.link-arrow:hover { gap: 10px; }

/* Brand lockup ------------------------------------------------------------ */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; filter: drop-shadow(0 4px 8px rgba(11, 31, 58, 0.08)); }
.brand-type { display: grid; line-height: 1; gap: 3px; }
.brand-the { font-size: 8px; font-weight: 800; letter-spacing: 0.34em; color: var(--blue); }
.brand-name { font-size: 17px; font-weight: 900; letter-spacing: 0.015em; color: var(--navy); text-transform: uppercase; }
.brand-sub { font-size: 8px; font-weight: 800; letter-spacing: 0.19em; text-transform: uppercase; color: var(--red); }
.brand-sub span { color: var(--blue); }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-the { color: #8bb9ff; }
.brand-light .brand-sub { color: #ff9d96; }
.brand-light .brand-sub span { color: #9dc0ff; }

/* Public top bar and header ------------------------------------------------ */
.public-top {
  background: var(--navy);
  color: #c7d8ee;
  font-size: 12px;
  font-weight: 600;
}
.public-top .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.public-top-left { display: flex; align-items: center; gap: 18px; }
.public-top a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.public-top .dot { width: 5px; height: 5px; border-radius: 50%; background: #6f88a9; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11, 31, 58, 0.08);
}
.site-header .container { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav a { font-size: 13.5px; font-weight: 700; color: #34445c; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--blue); border-bottom-color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: grid; text-align: right; line-height: 1.15; }
.header-phone span { font-size: 9px; font-weight: 800; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.header-phone strong { font-size: 16px; color: var(--navy); letter-spacing: -0.01em; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; align-items: center; justify-content: center; background: #fff; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  display: block; width: 18px; height: 2px; background: var(--navy); position: relative; content: "";
}
.nav-toggle-label span::before { position: absolute; top: -6px; }
.nav-toggle-label span::after { position: absolute; top: 6px; }

@media (max-width: 1000px) {
  .site-nav { position: fixed; inset: 116px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 20px 26px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-140%); transition: transform 0.22s ease; margin: 0; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-header .container { min-height: 72px; }
  .nav-toggle:checked ~ .site-header .site-nav,
  body.nav-open .site-nav { transform: none; }
  .nav-toggle-label { display: inline-flex; margin-left: auto; }
  .header-actions .header-phone { display: none; }
  .header-actions .btn { display: none; }
  .public-top-left span:not(.dot):not(:first-child) { display: none; }
}

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); padding: 68px 0 80px; }
.hero::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; right: -180px; top: -200px; background: radial-gradient(circle, rgba(33, 88, 255, 0.08), transparent 68%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; position: relative; }
.hero-copy .display { margin: 18px 0 20px; }
.hero-copy .lede { max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.rating { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stars { display: flex; gap: 2px; color: #f5a623; }
.stars .icon { width: 14px; height: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: #3b4c64; }
.chip .icon { width: 14px; height: 14px; color: var(--blue); }
.hero-media { position: relative; }
.hero-photo { width: 100%; aspect-ratio: 4 / 3.45; object-fit: cover; border-radius: 30px 30px 30px 8px; box-shadow: var(--shadow); }
.hero-float { position: absolute; left: -26px; bottom: 28px; background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-soft); display: flex; align-items: center; gap: 12px; max-width: 270px; }
.hero-float .icon-wrap { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.hero-float strong { display: block; font-size: 13px; }
.hero-float span { display: block; font-size: 11.5px; color: var(--muted); }
.hero-stamp { position: absolute; right: 18px; top: 18px; width: 88px; height: 88px; background: var(--red); color: #fff; border-radius: 50%; display: grid; place-content: center; text-align: center; font-weight: 850; line-height: 1.05; transform: rotate(6deg); box-shadow: 0 12px 24px rgba(240, 68, 56, 0.3); }
.hero-stamp b { font-size: 22px; letter-spacing: -0.04em; }
.hero-stamp span { font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 920px) {
  .hero { padding: 44px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-media { max-width: 620px; }
  .hero-float { left: 12px; bottom: 12px; }
  .hero-stamp { width: 72px; height: 72px; }
}

/* Trust strip ------------------------------------------------------------- */
.trust-strip { border-top: 1px solid rgba(11, 31, 58, 0.07); border-bottom: 1px solid rgba(11, 31, 58, 0.07); background: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; align-items: center; gap: 13px; padding: 24px 22px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item .icon-wrap { width: 38px; height: 38px; border-radius: 11px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; }
.trust-item strong { display: block; font-size: 12.5px; letter-spacing: -0.01em; }
.trust-item span { display: block; font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr 1fr; } .trust-item:nth-child(2) { border-right: 0; } .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .trust-grid { grid-template-columns: 1fr; } .trust-item { border-right: 0; border-bottom: 1px solid var(--line); } .trust-item:last-child { border-bottom: 0; } }

/* Section headers --------------------------------------------------------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 42px; }
.section-head .lede { max-width: 460px; }
.section-head.center-head { display: block; text-align: center; max-width: 700px; margin: 0 auto 42px; }
.section-head.center-head .lede { margin: 16px auto 0; }
.section-head h2 { margin-top: 12px; }
@media (max-width: 760px) { .section-head { display: block; } .section-head .lede { margin-top: 14px; } .section { padding: 64px 0; } }

/* Service cards ----------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: rgba(33, 88, 255, 0.3); }
.service-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 18px; }
.service-icon.red { background: var(--red-soft); color: var(--red); }
.service-card h3 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.service-card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.service-card .link-arrow { margin-top: 16px; font-size: 12px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

/* Split feature ----------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-copy h2 { margin: 12px 0 18px; }
.split-copy .lede { margin-bottom: 26px; }
.check-list { display: grid; gap: 13px; margin: 24px 0 30px; }
.check-list li { display: flex; gap: 11px; font-size: 14px; color: #34445c; }
.check-list .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.check-list .tick .icon { width: 13px; height: 13px; }
.feature-panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow-soft); }
.feature-panel .metric-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.feature-panel .metric-row:last-child { border-bottom: 0; }
.feature-panel .metric-row strong { font-size: 22px; letter-spacing: -0.04em; }
.feature-panel .metric-row span { font-size: 12px; color: var(--muted); }
.panel-note { background: var(--sky-soft); border-radius: 14px; padding: 16px; font-size: 12.5px; color: #34445c; margin-top: 18px; display: flex; gap: 10px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 34px; } .split.reverse .split-media { order: 0; } }

/* Pricing ----------------------------------------------------------------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; display: flex; flex-direction: column; }
.plan-card.featured { border: 2px solid var(--blue); box-shadow: 0 24px 60px rgba(33, 88, 255, 0.13); }
.plan-flag { position: absolute; top: -13px; left: 24px; background: var(--blue); color: #fff; font-size: 9px; font-weight: 850; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.plan-card h3 { font-size: 1.05rem; font-weight: 800; }
.plan-card .plan-desc { font-size: 12.5px; color: var(--muted); min-height: 38px; margin-top: 5px; }
.plan-price { display: flex; align-items: end; gap: 4px; margin: 20px 0 6px; }
.plan-price b { font-size: 2.6rem; letter-spacing: -0.06em; line-height: 1; color: var(--navy); }
.plan-price span { font-size: 12px; color: var(--muted); padding-bottom: 5px; }
.plan-visits { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; }
.plan-list { display: grid; gap: 10px; margin: 4px 0 26px; }
.plan-list li { display: flex; gap: 9px; font-size: 12.5px; color: #3b4c64; }
.plan-list .icon { width: 15px; height: 15px; color: var(--green); margin-top: 2px; }
.plan-card .btn { margin-top: auto; }
@media (max-width: 880px) { .plan-grid { grid-template-columns: 1fr; } }

/* Steps ------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-bottom: 18px; }
.step h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.step p { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Testimonials ------------------------------------------------------------ */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.quote .stars { margin-bottom: 14px; }
.quote p { font-size: 14px; line-height: 1.65; color: #2d3e57; }
.quote footer { margin-top: 18px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
@media (max-width: 900px) { .quote-grid { grid-template-columns: 1fr; } }

/* CTA band ---------------------------------------------------------------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 30px; padding: 54px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -140px; top: -160px; background: radial-gradient(circle, rgba(33, 88, 255, 0.5), transparent 68%); }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.045em; line-height: 1.04; max-width: 620px; position: relative; z-index: 1; }
.cta-band .lede { color: #b9cbe4; max-width: 540px; margin: 16px 0 26px; position: relative; z-index: 1; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.cta-band .phone-line { margin-top: 22px; display: flex; align-items: center; gap: 9px; color: #c7d8ee; font-size: 12.5px; position: relative; z-index: 1; }
@media (max-width: 700px) { .cta-band { padding: 34px 24px; border-radius: 22px; } }

/* Page hero --------------------------------------------------------------- */
.page-hero { background: var(--navy); color: #fff; padding: 66px 0 62px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 540px; height: 540px; right: -180px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(33, 88, 255, 0.45), transparent 68%); }
.page-hero .display { color: #fff; font-size: clamp(2.3rem, 4.4vw, 3.8rem); margin: 14px 0 14px; max-width: 800px; }
.page-hero .lede { color: #b9cbe4; max-width: 640px; }
.page-hero .kicker { color: #9dc0ff; }
.breadcrumbs { font-size: 11px; color: #89a3c3; margin-bottom: 14px; display: flex; gap: 8px; }
.breadcrumbs a:hover { color: #fff; }

/* Content blocks ---------------------------------------------------------- */
.prose { font-size: 15px; color: #3b4c64; line-height: 1.75; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--navy); font-weight: 800; letter-spacing: -0.02em; }
.prose p { margin-bottom: 14px; }
.prose ul { display: grid; gap: 8px; margin: 8px 0 18px; }
.prose ul li { padding-left: 20px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 26px; } }

/* Forms ------------------------------------------------------------------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-soft); }
.form-card h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; }
.form-intro { color: var(--muted); font-size: 13px; margin-top: 6px; margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; color: #34445c; }
.form-control, .form-select, textarea.form-control {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(33, 88, 255, 0.12); }
textarea.form-control { resize: vertical; }
.form-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b7a90 50%), linear-gradient(135deg, #6b7a90 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-check { width: 18px; height: 18px; accent-color: var(--blue); }
.checkbox-field { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #34445c; }
.checkbox-field label { font-size: 13px; font-weight: 600; }
.help-text { font-size: 11px; color: var(--muted); }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: #b42318; font-size: 11.5px; font-weight: 600; }
.field-error input, .field-error select, .field-error textarea { border-color: #f04438; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.form-note { display: flex; gap: 10px; background: var(--sky-soft); border-radius: 12px; padding: 13px 15px; font-size: 11.5px; color: #3b4c64; margin-top: 18px; }
.form-note .icon { color: var(--blue); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Flash messages ---------------------------------------------------------- */
.flash-stack { display: grid; gap: 8px; margin-bottom: 22px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid transparent; transition: opacity 0.4s ease, transform 0.4s ease; }
.flash-success { background: var(--green-soft); color: #086347; border-color: #b7e6d3; }
.flash-error { background: var(--red-soft); color: #a8271d; border-color: #ffd0cc; }
.flash-info { background: var(--sky-soft); color: #17408f; border-color: #cfe2ff; }
.flash-warning { background: var(--amber-soft); color: #8a3b08; border-color: #f6d7b0; }
.flash-out { opacity: 0; transform: translateY(-4px); }

/* Pills and badges -------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.03em; white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill-blue { background: var(--sky-soft); color: var(--blue-ink); }
.pill-green { background: var(--green-soft); color: #087454; }
.pill-amber { background: var(--amber-soft); color: #9a4a08; }
.pill-red { background: var(--red-soft); color: #b42318; }
.pill-gray { background: #f1f3f7; color: #5b6b80; }
.pill-purple { background: var(--purple-soft); color: var(--purple); }
.pill-nodot::before { display: none; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--navy); color: #a9bdd8; padding: 62px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 38px; }
.footer-brand p { font-size: 12.5px; line-height: 1.7; color: #9db2cd; margin: 18px 0; max-width: 280px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-badges .chip { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); color: #c7d8ee; }
.footer-badges .chip .icon { color: #8bb9ff; }
.footer-col h4 { font-size: 10px; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; color: #fff; margin-bottom: 15px; }
.footer-col a, .footer-col p { display: block; font-size: 12.5px; color: #a9bdd8; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-contact { display: grid; gap: 11px; }
.footer-contact a { display: flex; align-items: center; gap: 8px; color: #dbe7f5; font-weight: 650; }
.footer-contact .icon { color: #8bb9ff; }
.footer-hours { font-size: 11px; color: #8ba2bf; line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 10.5px; color: #7f96b5; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 16px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Utility layout ---------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 10px; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 34px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 34px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.eyebrow { font-size: 10px; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .icon { width: 36px; height: 36px; color: #b8c4d4; margin: 0 auto 12px; }
.empty-state strong { display: block; color: var(--navy); font-size: 14px; margin-bottom: 4px; }
.empty-state p { font-size: 12.5px; max-width: 340px; margin: 0 auto; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Customer portal
   ========================================================================== */
.portal-body { background: #f4f6fa; }
.portal-header { background: #fff; border-bottom: 1px solid var(--line); }
.portal-header .container { display: flex; align-items: center; gap: 24px; min-height: 74px; }
.portal-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.portal-nav a { font-size: 12.5px; font-weight: 700; color: #44546b; }
.portal-nav a:hover, .portal-nav a.active { color: var(--blue); }
.portal-user { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--blue-ink); display: grid; place-items: center; font-size: 11px; font-weight: 850; flex: 0 0 auto; }
.avatar-lg { width: 54px; height: 54px; font-size: 17px; }
.avatar-sm { width: 28px; height: 28px; font-size: 9px; }
.portal-main { padding: 34px 0 70px; }
.portal-title { margin-bottom: 24px; }
.portal-title h1 { font-size: 1.8rem; font-weight: 850; letter-spacing: -0.04em; }
.portal-title p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.portal-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; }
.panel-head a { font-size: 11px; font-weight: 750; color: var(--blue); }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }
.portal-hero { background: linear-gradient(135deg, var(--navy), #173a6b); color: #fff; border-radius: 18px; padding: 26px; display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 20px; }
.portal-hero h2 { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 5px; }
.portal-hero p { color: #b9cbe4; font-size: 12.5px; }
.portal-hero .btn { flex: 0 0 auto; }
.portal-list { display: grid; }
.portal-list-item { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.portal-list-item:last-child { border-bottom: 0; }
.portal-list-item .icon-wrap { width: 38px; height: 38px; border-radius: 11px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; }
.portal-list-item .grow { flex: 1; min-width: 0; }
.portal-list-item strong { display: block; font-size: 12.5px; }
.portal-list-item span { display: block; font-size: 11px; color: var(--muted); }
.portal-stat { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.portal-stat:last-child { border-bottom: 0; }
.portal-stat strong { display: block; font-size: 12.5px; }
.portal-stat span { display: block; font-size: 11px; color: var(--muted); }
.portal-stat .icon-wrap { width: 34px; height: 34px; border-radius: 10px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; }
.portal-mobile-nav { display: none; }
@media (max-width: 840px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-nav { gap: 12px; }
  .portal-nav a span { display: none; }
  .portal-header .brand-sub { display: none; }
  .portal-hero { display: block; }
  .portal-hero .btn { margin-top: 16px; }
}

/* ==========================================================================
   Authentication
   ========================================================================== */
.auth-body { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; background: #fff; }
.auth-aside { background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(33, 88, 255, 0.55), transparent 68%); right: -180px; top: -160px; }
.auth-aside::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 68, 56, 0.24), transparent 70%); left: -120px; bottom: -120px; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h1 { font-size: clamp(2.2rem, 3.4vw, 3.2rem); letter-spacing: -0.045em; line-height: 1.05; margin: 26px 0 16px; max-width: 470px; }
.auth-aside p { color: #b9cbe4; font-size: 14px; max-width: 420px; line-height: 1.65; }
.auth-points { display: grid; gap: 12px; margin-top: 30px; }
.auth-points li { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: #d3e2f4; }
.auth-points .icon { color: #8bb9ff; width: 17px; height: 17px; }
.auth-aside-footer { font-size: 10.5px; color: #7f96b5; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 42px 24px; background: var(--cream); }
.auth-card { width: min(430px, 100%); }
.auth-card .brand { margin-bottom: 38px; }
.auth-card h2 { font-size: 1.75rem; font-weight: 850; letter-spacing: -0.04em; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin: 6px 0 26px; }
.auth-form { display: grid; gap: 15px; }
.auth-links { margin-top: 20px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.auth-links a { color: var(--blue); font-weight: 700; }
.auth-demo-note { margin-top: 26px; padding: 13px 15px; border: 1px dashed var(--line-dark); border-radius: 10px; font-size: 11px; color: var(--muted); }
@media (max-width: 900px) {
  .auth-body { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; }
}

/* ==========================================================================
   Staff console
   ========================================================================== */
.manage-body { background: #f2f4f8; }
#sidebar-toggle { display: none; }
.manage-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; background: #081a33; color: #a9bdd8; z-index: 60; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { padding: 22px 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-brand .brand-mark { width: 38px; height: 38px; }
.sidebar-brand .brand-name { font-size: 14px; }
.sidebar-brand .brand-sub { font-size: 7px; }
.sidebar-scroll { padding: 14px 12px 20px; flex: 1; }
.nav-group { margin-bottom: 18px; }
.nav-label { font-size: 8.5px; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; color: #5d7593; padding: 0 10px 8px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 12.3px; font-weight: 650; color: #b6c7da; margin-bottom: 2px; }
.nav-link .icon { width: 16px; height: 16px; color: #6f8cae; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link:hover .icon { color: #b9d3f5; }
.nav-link.is-active { background: var(--blue); color: #fff; }
.nav-link.is-active .icon { color: #fff; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar-user strong { display: block; font-size: 11.5px; color: #fff; }
.sidebar-user span { display: block; font-size: 9.5px; color: #7f96b5; }
.sidebar-user form { margin-left: auto; }
.logout-btn { background: none; border: 0; color: #7f96b5; padding: 4px; }
.logout-btn:hover { color: #fff; }
.manage-main { margin-left: 258px; min-width: 0; }
.manage-topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.manage-topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; padding: 0 28px; }
.sidebar-toggle-label { display: none; }
.topbar-search { position: relative; flex: 0 1 360px; }
.topbar-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px 0 36px; font-size: 12.5px; background: #f8f9fc; outline: none; }
.topbar-search input:focus { border-color: var(--blue); background: #fff; }
.topbar-search .icon { position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; color: var(--muted-light); }
.topbar-spacer { flex: 1; }
.topbar-date { font-size: 11px; color: var(--muted); font-weight: 650; }
.topbar-action { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 750; color: var(--blue); padding: 8px 11px; border-radius: 8px; }
.topbar-action:hover { background: var(--sky-soft); }
.manage-content { padding: 26px 28px 64px; max-width: 1500px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.55rem; font-weight: 850; letter-spacing: -0.035em; color: var(--navy); }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.breadcrumb { font-size: 10.5px; color: var(--muted); margin-bottom: 5px; display: flex; gap: 6px; }
.breadcrumb a:hover { color: var(--blue); }

/* Staff cards and KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; position: relative; overflow: hidden; }
.kpi .kpi-label { font-size: 9.5px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kpi .kpi-value { font-size: 1.7rem; font-weight: 850; letter-spacing: -0.045em; margin-top: 5px; line-height: 1.1; color: var(--navy); }
.kpi .kpi-note { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.kpi .kpi-icon { position: absolute; right: 15px; top: 15px; width: 30px; height: 30px; border-radius: 9px; background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; }
.kpi .kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi .kpi-icon.green { background: var(--green-soft); color: var(--green); }
.kpi .kpi-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 12.5px; font-weight: 800; letter-spacing: -0.01em; }
.card-head .link-arrow { font-size: 10.5px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 13px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.dash-stack { display: grid; gap: 16px; }
@media (max-width: 1180px) { .kpi-grid { grid-template-columns: 1fr 1fr; } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfe; }
.data-table .primary { font-weight: 750; color: var(--navy); }
.data-table .secondary { font-size: 10.5px; color: var(--muted); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .actions { text-align: right; white-space: nowrap; }
.data-table .empty-row td { text-align: center; color: var(--muted); padding: 30px; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.table-toolbar form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-toolbar .form-control, .table-toolbar .form-select { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.table-toolbar .search-input { min-width: 230px; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }

/* Filters and tabs */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tab { font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 999px; color: #5b6b80; background: #f1f3f7; }
.filter-tab:hover { background: #e7ebf2; }
.filter-tab.is-active { background: var(--navy); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 11.5px; font-weight: 750; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--navy); }
.tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }

/* Schedule board */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.week-nav .week-label { font-size: 13px; font-weight: 800; }
.week-nav .week-actions { display: flex; gap: 6px; }
.schedule-scroll { overflow-x: auto; padding-bottom: 6px; }
.schedule-board { display: grid; grid-template-columns: repeat(7, minmax(148px, 1fr)); gap: 8px; min-width: 1030px; }
.schedule-day { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 300px; overflow: hidden; }
.schedule-day.is-today { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(33, 88, 255, 0.1); }
.day-head { padding: 10px 11px; border-bottom: 1px solid var(--line); background: #fafbfc; display: flex; align-items: center; justify-content: space-between; }
.day-head .dow { font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 850; }
.day-head .dom { font-size: 15px; font-weight: 850; color: var(--navy); line-height: 1; margin-top: 2px; }
.day-head .count { font-size: 9px; font-weight: 800; color: var(--muted); background: #eef1f5; padding: 3px 7px; border-radius: 999px; }
.day-jobs { padding: 7px; display: grid; gap: 6px; }
.job-card { display: block; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 8px; padding: 8px 9px; background: #fff; font-size: 10.5px; }
.job-card:hover { border-color: var(--blue); background: var(--sky-soft); }
.job-card .jc-time { font-size: 9px; font-weight: 800; color: var(--blue); letter-spacing: 0.02em; }
.job-card .jc-title { font-weight: 750; color: var(--navy); margin: 2px 0 1px; line-height: 1.3; }
.job-card .jc-customer { color: var(--muted); font-size: 9.5px; }
.job-card .jc-tech { display: flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 9px; color: var(--muted); }
.job-card.status-completed { border-left-color: var(--green); }
.job-card.status-requested { border-left-color: var(--amber); }
.job-card.status-canceled { opacity: 0.5; }
.queue-panel { margin-top: 16px; }

/* Detail layouts */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.detail-stack { display: grid; gap: 16px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-item .label { font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.info-item .value { font-size: 12.5px; font-weight: 650; color: var(--navy); margin-top: 3px; word-break: break-word; }
.section-title { font-size: 12.5px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.detail-header h1 { font-size: 1.5rem; font-weight: 850; letter-spacing: -0.035em; }
.detail-header .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; margin: 14px 0; }
.stat-cell { background: #fff; padding: 12px 14px; }
.stat-cell span { display: block; font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-cell strong { display: block; font-size: 16px; letter-spacing: -0.03em; margin-top: 3px; }
.money-positive { color: var(--green); }
.money-negative { color: var(--red); }

/* Invoice document */
.doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; border-bottom: 2px solid var(--navy); padding-bottom: 20px; }
.doc-head h1 { font-size: 1.4rem; font-weight: 850; letter-spacing: -0.03em; }
.doc-meta { text-align: right; font-size: 11px; color: var(--muted); }
.doc-meta strong { display: block; color: var(--navy); font-size: 13px; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 24px 0; }
.doc-parties .label { font-size: 9px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.doc-parties p { font-size: 12px; line-height: 1.6; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th { text-align: left; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; }
.doc-table td { padding: 10px; border-bottom: 1px solid #eef1f5; }
.doc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.doc-totals { margin-left: auto; width: min(300px, 100%); margin-top: 18px; }
.doc-totals .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 12px; color: var(--muted); }
.doc-totals .row.total { border-top: 2px solid var(--navy); margin-top: 5px; padding-top: 11px; font-size: 16px; font-weight: 850; color: var(--navy); }
.doc-notes { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.pay-panel { background: var(--sky-soft); border: 1px solid #cfe2ff; border-radius: 14px; padding: 20px; }
.pay-panel .amount { font-size: 2rem; font-weight: 850; letter-spacing: -0.05em; color: var(--navy); line-height: 1.1; margin: 6px 0 14px; }
.secure-note { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--muted); margin-top: 10px; }
.sandbox-banner { background: var(--amber-soft); border: 1px solid #f6d7b0; color: #8a3b08; padding: 10px 14px; border-radius: 10px; font-size: 11.5px; margin-bottom: 16px; }

/* Reports */
.report-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.report-header h2 { font-size: 1.25rem; font-weight: 850; letter-spacing: -0.03em; }
.report-table td.indent { padding-left: 26px; }
.report-total td { font-weight: 850; border-top: 2px solid var(--navy); color: var(--navy); }
.report-section-label td { font-size: 9px; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); background: #fafbfc; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, #4b7bff, var(--blue)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar-col span { font-size: 9px; color: var(--muted); font-weight: 700; }
.bar-col strong { font-size: 9px; color: var(--navy); }
.chart-legend { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); margin-top: 6px; }

/* Journal entry */
.journal-lines { width: 100%; border-collapse: collapse; }
.journal-lines th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.journal-lines td { padding: 8px; border-bottom: 1px solid #eef1f5; font-size: 12px; }
.journal-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.journal-lines tr.total-row td { font-weight: 850; border-top: 2px solid var(--navy); border-bottom: 0; }
.formset-row td { padding: 5px 4px; }
.formset-row .form-control, .formset-row .form-select { min-height: 36px; padding: 7px 9px; font-size: 11.5px; }

/* Support */
.ticket-list { display: grid; }
.ticket-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: #fbfcfe; }
.ticket-row .grow { flex: 1; min-width: 0; }
.ticket-row strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.ticket-row .meta { text-align: right; font-size: 10px; color: var(--muted); }
.thread { display: grid; gap: 14px; }
.thread-msg { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.thread-msg.internal { background: var(--amber-soft); border-color: #f6d7b0; }
.thread-msg .who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 10.5px; color: var(--muted); }
.thread-msg .who strong { color: var(--navy); font-size: 11.5px; }
.thread-msg .body { font-size: 12.5px; color: #34445c; line-height: 1.65; white-space: pre-line; }
.thread-msg.customer { border-left: 3px solid var(--blue); }
.thread-msg.staff { border-left: 3px solid var(--green); }

/* Search results */
.search-section { margin-bottom: 24px; }
.search-section h2 { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.search-hit { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 6px; }
.search-hit:hover { border-color: var(--blue); }
.search-hit strong { display: block; font-size: 12px; }
.search-hit span { display: block; font-size: 10.5px; color: var(--muted); }

/* Toast/misc */
.help-row { display: flex; gap: 10px; align-items: flex-start; font-size: 11px; color: var(--muted); }
.help-row .icon { color: var(--blue); flex: 0 0 auto; }
.mobile-only { display: none; }
@media (max-width: 1180px) {
  .detail-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  #sidebar-toggle:checked ~ .manage-shell .sidebar { transform: none; }
  .manage-main { margin-left: 0; }
  .manage-topbar-inner { padding: 0 16px; }
  .sidebar-toggle-label { display: inline-flex; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; align-items: center; justify-content: center; background: #fff; }
  .sidebar-toggle-label span, .sidebar-toggle-label span::before, .sidebar-toggle-label span::after { display: block; width: 16px; height: 2px; background: var(--navy); position: relative; content: ""; }
  .sidebar-toggle-label span::before { position: absolute; top: -5px; }
  .sidebar-toggle-label span::after { position: absolute; top: 5px; }
  .topbar-search { flex: 1; max-width: 320px; }
  .manage-content { padding: 20px 16px 50px; }
  .topbar-date { display: none; }
  .mobile-only { display: inline-flex; }
}
@media (max-width: 620px) {
  .page-head { display: block; }
  .page-actions { margin-top: 12px; }
  .info-grid { grid-template-columns: 1fr; }
  .doc { padding: 20px; }
  .doc-head, .doc-parties { grid-template-columns: 1fr; display: grid; }
  .doc-meta { text-align: left; }
  .stat-row { grid-template-columns: 1fr; }
}

/* Details / add panels */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details.add-panel { border: 1px dashed var(--line-dark); border-radius: 10px; padding: 11px 14px; background: #fafbfc; }
details.add-panel summary { cursor: pointer; font-size: 11.5px; font-weight: 800; color: var(--blue); }
details.add-panel[open] summary { margin-bottom: 4px; }
details.card summary { color: var(--navy); }

/* Print */
@media print {
  .public-top, .site-header, .site-footer, .pay-panel, .print-hide, .flash-stack { display: none !important; }
  body { background: #fff; }
  .pay-wrap { padding: 0 !important; }
  .doc { border: 0; padding: 0; }
  .container { width: 100%; }
}
