/* QuoteCrew — app styles (on top of Bootstrap 5.3) */
:root {
  --qc-primary: #2563eb;
  --qc-ink: #0f172a;
  --qc-muted: #5b6577;   /* 4.5:1+ on the app background (WCAG 1.4.3) */
  --qc-bg: #f5f7fb;
  --qc-sidebar: #0f172a;
  --qc-sidebar-ink: #cbd5e1;
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: #1e293b;
}
body { font-family: var(--bs-body-font-family); }
.btn-primary { --bs-btn-bg: #2563eb; --bs-btn-border-color: #2563eb; --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; --bs-btn-active-bg: #1e40af; }
.btn-outline-primary { --bs-btn-color: #2563eb; --bs-btn-border-color: #2563eb; --bs-btn-hover-bg: #2563eb; --bs-btn-hover-border-color: #2563eb; --bs-btn-active-bg: #2563eb; --bs-btn-active-border-color: #2563eb; }
.brand { font-weight: 800; font-size: 1.2rem; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.brand i { color: #60a5fa; }
.brand-dark { color: var(--qc-ink); }
.brand-dark i { color: var(--qc-primary); }
.brand { display: inline-flex; align-items: center; gap: .4rem; }
.brand-mark { width: 1.6em; height: 1.6em; }
.brand-crew { color: #16a34a; }

/* ---------- app shell */
.app-body { background: var(--qc-bg); min-height: 100vh; }
.sidebar { width: 240px; background: var(--qc-sidebar); color: var(--qc-sidebar-ink); display: flex; flex-direction: column; }
@media (min-width: 992px) {
  /* Bootstrap makes .offcanvas-lg transparent at lg+; keep our dark sidebar */
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; visibility: visible !important; transform: none !important; background-color: var(--qc-sidebar) !important; }
  .main { margin-left: 240px; }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem .5rem; }
.sidebar-company { padding: .25rem 1.25rem 1rem; font-weight: 600; color: #fff; font-size: .9rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-company small { display: block; font-weight: 400; color: #94a3b8; font-size: .75rem; }
.sidebar-nav { padding: .75rem .6rem; flex: 1; overflow-y: auto; }
.sidebar-nav a, .sidebar-foot a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: .5rem; color: var(--qc-sidebar-ink); text-decoration: none; font-size: .92rem; margin-bottom: 2px; }
.sidebar-nav a:hover, .sidebar-foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active { background: var(--qc-primary); color: #fff; }
.sidebar-nav i { font-size: 1.05rem; width: 1.2rem; }
.sidebar-foot { padding: .6rem; border-top: 1px solid rgba(255,255,255,.08); }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; }
.topbar-title { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.content { padding: 1.5rem 1.25rem 4rem; max-width: 1400px; }
@media (max-width: 575px) { .content { padding: 1rem .75rem 4rem; } }

.lang-switch { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 999px; overflow: hidden; font-size: .75rem; font-weight: 600; }
.lang-switch a { padding: .2rem .55rem; color: var(--qc-muted); text-decoration: none; }
.lang-switch a.on { background: var(--qc-ink); color: #fff; }

.card { border-color: #e2e8f0; border-radius: .75rem; }
.card-header { background: #fff; border-bottom-color: #eef2f7; }
.card-footer { background: #fafbfd; border-top-color: #eef2f7; }
.table > :not(caption) > * > * { padding-top: .65rem; padding-bottom: .65rem; }
.row-link { cursor: pointer; }

/* ---------- dashboard */
.stat-card .card-body { position: relative; }
.stat-icon { position: absolute; right: 1rem; top: 1rem; width: 2.2rem; height: 2.2rem; border-radius: .6rem; display: grid; place-items: center; opacity: .9; }
.stat-label { color: var(--qc-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.7rem; font-weight: 700; color: var(--qc-ink); line-height: 1.2; margin: .3rem 0 .15rem; }
.stat-sub { color: var(--qc-muted); font-size: .8rem; }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 30px; gap: .6rem; align-items: center; font-size: .85rem; margin-bottom: .45rem; }
.funnel-bar { background: #f1f5f9; border-radius: 999px; height: 8px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; background: #94a3b8; }
.fill-sent { background: #3b82f6; } .fill-viewed { background: #06b6d4; } .fill-accepted { background: #16a34a; } .fill-rejected { background: #dc2626; } .fill-expired { background: #f59e0b; }
.funnel-n { text-align: right; font-weight: 600; }

/* ---------- bid builder */
.step-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .9rem; }
.step-title span { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--qc-primary); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.day-btn { min-width: 3.4rem; }
.bid-result { top: 76px; border: 2px solid #dbeafe; }
.bid-price { font-size: 2.6rem; font-weight: 800; color: var(--qc-ink); letter-spacing: -.03em; }
.bid-price small { font-size: 1rem; color: var(--qc-muted); font-weight: 500; }
.bid-result.loading .bid-price { opacity: .5; }
.profit-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; background: #f0fdf4; border-radius: .6rem; padding: .7rem; text-align: center; }
.profit-box.bad { background: #fef2f2; }
.profit-box.bad .fw-bold { color: #b91c1c; }

/* ---------- quote document */
.quote-doc { font-size: .95rem; }
.quote-totals td { border: 0; padding: .3rem .5rem; }
.quote-totals tr:last-child td { border-top: 2px solid var(--qc-ink); padding-top: .6rem; }
.public-body, .auth-body { background: var(--qc-bg); min-height: 100vh; }
.print-body { background: #fff; }
@media print { .no-print { display: none !important; } body { background: #fff !important; } .card { border: 0 !important; box-shadow: none !important; } }

/* ---------- auth & onboarding */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 3rem 1rem; }
.onboarding-wrap { max-width: 760px; margin: 0 auto; padding: 2rem 1rem; }
.auth-card { border-radius: 1rem; }

/* ---------- crew mobile view */
.today-head { display: flex; justify-content: space-between; align-items: center; max-width: 640px; }
.job-cards { display: grid; gap: .9rem; max-width: 640px; }
.job-card { border-left: 5px solid #94a3b8; }
.job-card.status-on_my_way { border-left-color: #06b6d4; }
.job-card.status-in_progress { border-left-color: #f59e0b; }
.job-card.status-completed { border-left-color: #16a34a; opacity: .8; }
.job-card .btn-lg { padding: .8rem; font-weight: 600; }

/* ---------- week schedule */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.week-col { background: #fff; border: 1px solid #e2e8f0; border-radius: .6rem; min-height: 180px; padding: .4rem; }
.week-col.is-today { border-color: var(--qc-primary); box-shadow: 0 0 0 1px var(--qc-primary); }
.week-col-head { text-align: center; font-size: .8rem; color: var(--qc-muted); padding: .2rem 0 .5rem; }
.week-col-head strong { color: var(--qc-ink); font-size: 1rem; }
.week-job { display: block; font-size: .78rem; padding: .4rem .45rem; border-radius: .4rem; margin-bottom: .35rem; text-decoration: none; background: #eff6ff; color: #1e3a8a; border-left: 3px solid #3b82f6; }
.week-job:hover { filter: brightness(.96); }
.week-job.unassigned { background: #fffbeb; color: #78350f; border-left-color: #f59e0b; }
.week-job.status-completed { background: #f0fdf4; color: #14532d; border-left-color: #16a34a; }
.week-job.status-cancelled { background: #f1f5f9; color: #64748b; border-left-color: #94a3b8; text-decoration: line-through; }
@media (max-width: 991px) {
  .week-grid { grid-template-columns: 1fr; }
  .week-col { min-height: 0; }
  .week-col-head { text-align: left; }
}

/* ---------- marketing */
.mk-body { background: #f8fafc; color: #1e293b; }
.mk-nav { background: rgba(248,250,252,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0; }
.mk-hero { padding: 5rem 0 4rem; background: radial-gradient(1200px 500px at 80% -10%, #dbeafe 0%, transparent 60%); }
.mk-eyebrow { display: inline-block; background: #dbeafe; color: #1e40af; font-weight: 600; font-size: .8rem; padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
.mk-h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; color: var(--qc-ink); }
.mk-h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; color: var(--qc-ink); }
.mk-lead { font-size: 1.2rem; color: #475569; margin: 1.2rem 0 1.8rem; }
.mk-section { padding: 5rem 0; }
.mk-mock { background: #fff; border-radius: 1rem; box-shadow: 0 30px 60px -20px rgba(15,23,42,.25); border: 1px solid #e2e8f0; overflow: hidden; }
.mk-mock-head { display: flex; gap: .35rem; padding: .7rem 1rem; background: #f1f5f9; }
.mk-mock-head span { width: .65rem; height: .65rem; border-radius: 50%; background: #cbd5e1; }
.mk-mock-row { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px dashed #e2e8f0; }
.mk-mock-price { font-size: 2.2rem; font-weight: 800; color: var(--qc-ink); letter-spacing: -.03em; }
.mk-mock-price small { font-size: .9rem; color: var(--qc-muted); }
.mk-pain { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .8rem; padding: 1.2rem; height: 100%; }
.mk-pain i { font-size: 1.4rem; color: #dc2626; display: block; margin-bottom: .5rem; }
.mk-pain p { color: var(--qc-muted); margin: .3rem 0 0; font-size: .92rem; }
.mk-feature { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.5rem; height: 100%; }
.mk-feature h3 { font-size: 1.05rem; font-weight: 700; margin: .9rem 0 .4rem; }
.mk-feature p { color: var(--qc-muted); margin: 0; font-size: .94rem; }
.mk-feature-icon { width: 2.8rem; height: 2.8rem; border-radius: .8rem; background: #dbeafe; color: var(--qc-primary); display: grid; place-items: center; font-size: 1.3rem; }
.mk-step-n { width: 3rem; height: 3rem; border-radius: 50%; background: var(--qc-ink); color: #fff; font-weight: 800; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.2rem; }
.mk-plan { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 2rem 1.6rem; height: 100%; display: flex; flex-direction: column; }
.mk-plan.featured { border: 2px solid var(--qc-primary); box-shadow: 0 20px 40px -20px rgba(37,99,235,.4); }
.mk-plan h3 { font-size: 1.15rem; font-weight: 700; }
.mk-plan-price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--qc-ink); }
.mk-plan-price small { font-size: 1rem; color: var(--qc-muted); font-weight: 500; }
.mk-plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.mk-plan li { padding: .3rem 0; font-size: .93rem; }
.mk-plan li i { color: #16a34a; }
.mk-plan-badge { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); background: var(--qc-primary); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px; }
.mk-cta { background: var(--qc-ink); }
.mk-footer { padding: 2rem 0; border-top: 1px solid #e2e8f0; font-size: .9rem; color: var(--qc-muted); }
.mk-footer a { color: var(--qc-muted); text-decoration: none; }

/* ---------- v0.2 additions */
[hidden] { display: none !important; }
.mini-stat .stat-label { color: var(--qc-muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
a.card { color: inherit; transition: box-shadow .15s; }
a.card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.settings-nav .nav-link { color: var(--qc-muted); }
.settings-nav .nav-link.active { background: var(--qc-ink); color: #fff; }

/* revenue bars */
.bar-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; height: 180px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 70%; max-width: 56px; background: linear-gradient(180deg, #3b82f6, #2563eb); border-radius: .4rem .4rem 0 0; min-height: 2px; }
.bar-value { font-size: .72rem; color: var(--qc-muted); margin-bottom: .25rem; white-space: nowrap; }
.bar-label { font-size: .78rem; color: var(--qc-muted); margin-top: .35rem; text-transform: capitalize; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { background: #eef2f7; border-radius: .75rem; padding: .5rem; min-height: 300px; display: flex; flex-direction: column; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: .25rem .25rem .6rem; }
.kanban-list { flex: 1; display: flex; flex-direction: column; gap: .5rem; border-radius: .5rem; min-height: 80px; }
.kanban-list.drop { background: #dbeafe; outline: 2px dashed #3b82f6; }
.kanban-card { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .6rem .7rem; color: inherit; text-decoration: none; cursor: grab; }
.kanban-card:hover { border-color: #93c5fd; }
.kanban-card.dragging { opacity: .5; }

/* checklist + photos */
.checklist .task-label { cursor: pointer; }
.checklist .form-check-input { width: 1.4em; height: 1.4em; flex-shrink: 0; }
.job-progress { background: #f8fafc; border-radius: .5rem; padding: .45rem .6rem; color: var(--qc-ink); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.photo-item { position: relative; }
.photo-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .5rem; display: block; }
.photo-item .badge { position: absolute; left: .35rem; top: .35rem; }
.photo-item .photo-del { position: absolute; right: .3rem; top: .3rem; }

/* month calendar */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-head { text-align: center; font-size: .78rem; font-weight: 600; color: var(--qc-muted); padding: .3rem 0; }
.month-cell { background: #fff; border: 1px solid #e2e8f0; border-radius: .4rem; min-height: 96px; padding: .3rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.month-cell.other { opacity: .45; }
.month-cell.today { border-color: var(--qc-primary); box-shadow: 0 0 0 1px var(--qc-primary); }
.month-day { font-size: .8rem; font-weight: 600; }
.month-job { font-size: .68rem; background: #eff6ff; color: #1e3a8a; border-radius: 3px; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-job.unassigned { background: #fffbeb; color: #78350f; }
.month-job.status-completed { background: #f0fdf4; color: #14532d; }
@media (max-width: 767px) { .month-cell { min-height: 60px; } .month-job { display: none; } .month-cell:has(.month-job)::after { content: '•'; color: var(--qc-primary); font-size: 1.2rem; line-height: 1; } }

/* public report */
.report-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.report-times > div { background: #f8fafc; border-radius: .6rem; padding: .6rem .8rem; display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; align-items: center; }
.report-times i { grid-row: span 2; font-size: 1.3rem; color: var(--qc-primary); }
.report-times span { font-size: .75rem; color: var(--qc-muted); }
.report-tasks li { padding: .2rem 0; }
.report-tasks li.done i { color: #16a34a; }
.report-tasks li.todo { color: var(--qc-muted); }
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: .25rem; }
.star-rating input { display: none; }
.star-rating label { font-size: 2.4rem; color: #cbd5e1; cursor: pointer; line-height: 1; }
.star-rating input:checked ~ label, .star-rating label:hover, .star-rating label:hover ~ label { color: #d97706; }

/* automations */
.automation-card { border-left: 4px solid #cbd5e1; }
.automation-card.on { border-left-color: #16a34a; }
.auto-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }

/* marketing sectors */
.mk-sector { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.2rem .8rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 1rem; text-decoration: none; color: var(--qc-ink); text-align: center; height: 100%; font-weight: 600; font-size: .92rem; }
.mk-sector i { font-size: 1.8rem; color: var(--qc-primary); }
.mk-sector:hover, .mk-sector.active { border-color: var(--qc-primary); background: #eff6ff; }

/* stat card label must not run under the icon */
.stat-card .stat-label { padding-right: 2.6rem; }
.mk-math { background: var(--qc-ink, #0f172a); color: #e2e8f0; border-radius: 1rem; padding: 1.1rem 1.3rem; }
.mk-math h3 { color: #fff; }
.mk-shot { max-height: 620px; object-fit: cover; object-position: top; }
.company-logo { max-height: 72px; max-width: 240px; width: auto; height: auto; object-fit: contain; display: block; }
.portal-logo { margin-left: auto; margin-right: auto; max-height: 84px; }
.doc-logo { max-height: 64px; }
.logo-preview { min-width: 140px; min-height: 60px; display: grid; place-items: center; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: .6rem; padding: .5rem; }
.portal-stat .fs-3, .portal-stat .fs-5 { line-height: 1.2; }
.portal-contact summary { cursor: pointer; list-style: none; }
.portal-contact summary::-webkit-details-marker { display: none; }
.portal-contact[open] summary .bi-chevron-down { transform: rotate(180deg); }

/* ---------------------------------------------------------------- public directory */
.dir-hero { background: linear-gradient(180deg, #e6eeff, #fff); border-bottom: 1px solid #e2e8f0; padding: 3rem 0 2.2rem; }
.dir-hero-compact { padding: 1.5rem 0 1.2rem; }
.dir-h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; max-width: 20ch; color: #0f172a; }
.dir-lead { color: #5b6577; max-width: 56ch; margin: .5rem 0 0; }
.dir-search { margin-top: 1.2rem; display: grid; grid-template-columns: 1.5fr 1fr auto; gap: .5rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: .5rem; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); max-width: 760px; }
@media (max-width: 640px) { .dir-search { grid-template-columns: 1fr; } }
.dir-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.dir-cat { display: flex; align-items: center; gap: .7rem; padding: .8rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; text-decoration: none; color: inherit; }
.dir-cat:hover { border-color: #2563eb; }
.dir-cat.is-empty { opacity: .65; }
.dir-cat b { display: block; color: #0f172a; font-size: .95rem; }
.dir-cat small { color: #5b6577; }
.dir-cat-ic { width: 2.2rem; height: 2.2rem; border-radius: 9px; display: grid; place-items: center; background: #e6eeff; color: #2563eb; flex: none; }
.dir-chip { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: #eef2f9; color: #1e293b; text-decoration: none; font-size: .9rem; }
.dir-chip:hover { background: #e6eeff; color: #2563eb; }
.dir-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.dir-trust div { padding: 1rem; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; display: grid; gap: .2rem; }
.dir-trust b { color: #0f172a; }
.dir-trust span { color: #5b6577; font-size: .9rem; }
.dir-filters { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; }
.dir-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1rem; padding: 1rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; align-items: start; }
.dir-card:hover { border-color: #2563eb; }
.dir-card h2 a { color: #0f172a; text-decoration: none; }
@media (max-width: 640px) { .dir-card { grid-template-columns: 52px minmax(0, 1fr); } .dir-card-actions { grid-column: 1 / -1; flex-direction: row !important; } .dir-card-actions .btn { flex: 1; } }
.dir-logo, .dir-plogo { width: 64px; height: 64px; border-radius: 14px; background: #0f172a; color: #fff; display: grid; place-items: center; font-weight: 800; overflow: hidden; text-decoration: none; }
.dir-logo-img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.dir-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .85rem; color: #5b6577; margin-top: .15rem; }
.dir-svc { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.dir-svc span { font-size: .78rem; background: #eef2f9; padding: .15rem .5rem; border-radius: 6px; }
.dir-card-actions { display: flex; flex-direction: column; gap: .4rem; }
.dir-badge-verified { background: #e3f5ea; color: #15803d; font-weight: 700; }
.dir-empty { text-align: center; padding: 2.5rem 1rem; border: 1px dashed #cbd5e1; border-radius: 12px; display: grid; gap: .5rem; justify-items: center; color: #5b6577; }
.dir-empty b { color: #0f172a; }
.dir-cover { height: 120px; background: linear-gradient(120deg, #1e3a8a, #2563eb 55%, #60a5fa); }
.dir-phead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: end; padding: .9rem 0 1.1rem; border-bottom: 1px solid #e2e8f0; }
.dir-plogo { width: 92px; height: 92px; border-radius: 20px; border: 4px solid #fff; margin-top: -56px; position: relative; font-size: 1.8rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.dir-pactions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 768px) { .dir-phead { grid-template-columns: 1fr; } }
.dir-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.1rem; }
.dir-svc-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.dir-svc-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #e2e8f0; }
.dir-svc-list li:last-child { border-bottom: 0; }
.dir-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.dir-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.dir-gallery-sm { grid-template-columns: repeat(3, 1fr); }
.dir-hours { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; font-size: .9rem; }
.dir-hours dd { margin: 0; }
.dir-hours dt { font-weight: 400; }
.dir-verify-note { background: #e3f5ea; border-radius: 10px; padding: .8rem 1rem; font-size: .88rem; }
.dir-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.dir-ok { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: #e3f5ea; color: #15803d; display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto; }
.dir-ok-warn { background: #fdf1dc; color: #b45309; }

/* consumer account (phase 5) */
.consumer-list li { padding: .65rem 0; border-bottom: 1px solid #eef2f7; }
.consumer-list li:last-child { border-bottom: 0; }
.consumer-biz { border-top: 1px solid #eef2f7; padding-top: .8rem; margin-top: .8rem; }
.dir-box.border-danger { border-color: #f1aeb5 !important; }
.dir-account-hint { background: #f1f5ff; border-radius: 8px; padding: .5rem .75rem; }

/* day board: one column per crew member (phase 6) */
.day-board-wrap { overflow-x: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.day-board { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(64px + var(--cols) * 150px); }
.day-col, .day-times { border-left: 1px solid #eef2f7; }
.day-times { border-left: 0; }
.day-col-head { position: sticky; top: 0; background: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: .5rem .6rem; font-weight: 600; font-size: .85rem; z-index: 2; }
.day-col-body { position: relative; }
.day-hour { position: absolute; right: 6px; font-size: .7rem; color: #5b6577; transform: translateY(-50%); }
.day-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #eef2f7; }
.day-job { position: absolute; left: 4px; right: 4px; background: #e0ecff; border-left: 4px solid #2563eb; border-radius: 6px; padding: 2px 6px;
  font-size: .78rem; line-height: 1.25; color: #0f172a; text-decoration: none; overflow: hidden; z-index: 1; }
.day-job:hover { z-index: 3; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); }
.day-job.status-completed { background: #dcfce7; border-left-color: #16a34a; }
.day-job.status-in_progress, .day-job.status-on_my_way { background: #fef3c7; border-left-color: #d97706; }
.day-job.is-conflict, .day-legend.is-conflict { outline: 2px solid #dc2626; background: #fee2e2; }
.day-job.is-conflict i { color: #dc2626; }
.day-legend { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: middle; }
.week-job.is-conflict { outline: 2px solid #dc2626; }

/* public reviews (phase 8) */
.dir-review { border-top: 1px solid #eef2f7; padding: .75rem 0; }
.dir-review:first-of-type { border-top: 0; }
.dir-review details summary { cursor: pointer; font-size: .8rem; }
.dir-review-reply { background: #f8fafc; border-left: 3px solid #cbd5e1; border-radius: 6px; padding: .4rem .7rem; margin-top: .4rem; font-size: .9rem; }

/* accessibility (phase 9) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: #0f172a; color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible { outline: 3px solid #2563eb; outline-offset: 1px; box-shadow: none; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Bootstrap's yellow (#ffc107) is 1.6:1 on white: stars and warning text use a darker amber (5:1) */
.text-warning { color: #b45309 !important; }
.text-muted { color: #5b6577 !important; }

/* profile cover + picture cards (illustration when the business has no photos yet) */
.dir-cover { height: 230px; background-color: #1e3a8a; background-size: cover; background-position: center; }
.dir-cover.is-photo { box-shadow: inset 0 -60px 60px -30px rgba(15, 23, 42, .35); }
@media (max-width: 640px) { .dir-cover { height: 150px; } }
.dir-gallery-lg { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dir-card { grid-template-columns: 150px minmax(0, 1fr) auto; }
.dir-thumb { position: relative; display: block; width: 150px; aspect-ratio: 4 / 3; border-radius: 10px; background-color: #e2e8f0; background-size: cover; background-position: center; }
.dir-thumb .dir-logo { position: absolute; left: 8px; bottom: -14px; width: 46px; height: 46px; border-radius: 11px; border: 3px solid #fff; font-size: .85rem; box-shadow: 0 2px 6px rgba(15, 23, 42, .2); }
@media (max-width: 640px) { .dir-card { grid-template-columns: 1fr; } .dir-thumb { width: 100%; aspect-ratio: 16 / 7; } .dir-card-body { padding-top: .6rem; } }
.dir-cat { position: relative; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.dir-cat-img { display: block; height: 92px; background-size: cover; background-position: center; }
.dir-cat .dir-cat-ic { position: absolute; top: 64px; left: 12px; border: 3px solid #fff; }
.dir-cat > span:last-child { padding: 1.1rem .8rem .8rem; }

/* landing hero art: three trade illustrations on the right (desktop only) */
.dir-hero .container { position: relative; }
.dir-hero-art { position: absolute; right: .75rem; top: -1rem; width: 42%; max-width: 520px; grid-template-columns: 1fr 1fr; grid-template-rows: 110px 110px; gap: .6rem; }
.dir-hero-art span { border-radius: 14px; background-size: cover; background-position: center; box-shadow: 0 6px 18px rgba(15, 23, 42, .12); }
.dir-hero-art span:first-child { grid-row: span 2; }
@media (min-width: 992px) { .dir-hero:not(.dir-hero-compact) .dir-h1, .dir-hero:not(.dir-hero-compact) .dir-lead, .dir-hero:not(.dir-hero-compact) .dir-search { max-width: 54%; } }

/* marketing: real product screenshots */
.mk-devices { position: relative; padding: 0 0 2.5rem 0; }
.mk-laptop { background: #0f172a; border-radius: 14px; padding: 0 .6rem .6rem; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35); }
.mk-laptop-bar { display: flex; gap: .3rem; padding: .55rem .2rem; }
.mk-laptop-bar span { width: .55rem; height: .55rem; border-radius: 50%; background: #334155; }
.mk-laptop img { display: block; width: 100%; height: auto; border-radius: 6px; }
.mk-phone { width: 34%; max-width: 210px; background: #0f172a; border-radius: 28px; padding: 8px; box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .45); }
.mk-phone img { display: block; width: 100%; height: auto; aspect-ratio: 780 / 1300; object-fit: cover; object-position: top; border-radius: 21px; }
.mk-devices .mk-phone { position: absolute; right: -4%; bottom: 0; }
.mk-phone-static { width: 70%; max-width: 250px; margin: 0 auto; }
.mk-price-chip { position: absolute; left: -4%; bottom: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: .7rem 1rem; box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .3); }
.mk-price-chip .mk-mock-price { font-size: 1.6rem; line-height: 1.1; }
@media (max-width: 991px) { .mk-devices .mk-phone { right: 2%; } .mk-price-chip { left: 2%; } }
@media (max-width: 575px) { .mk-devices { padding-bottom: 4rem; } .mk-phone { width: 38%; } .mk-price-chip { padding: .5rem .7rem; } .mk-price-chip .mk-mock-price { font-size: 1.25rem; } }
.mk-showcase { background: linear-gradient(180deg, #eef4ff, #fff); }
.mk-sector { padding: 0; overflow: hidden; gap: 0; }
.mk-sector-img { display: block; width: 100%; height: 86px; background-size: cover; background-position: center; }
.mk-sector > span:last-child { padding: .8rem .6rem; }
.mk-sector > span:last-child i { font-size: 1rem; margin-right: .2rem; }
