/* =============================================================================
   Apex Pools — Stylesheet
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Variables & Reset
   ----------------------------------------------------------------------------- */
:root {
	--navy:         #2c3e50;
	--navy-light:   #34495e;
	--blue:         #2980b9;
	--blue-dark:    #2471a3;
	--green:        #27ae60;
	--orange:       #e67e22;
	--orange-dark:  #d35400;
	--red:          #e74c3c;
	--grey-bg:      #f0f2f5;
	--grey-border:  #d1d5db;
	--grey-text:    #6b7280;
	--white:        #ffffff;
	--shadow:       0 2px 10px rgba(0,0,0,0.1);
	--shadow-hover: 0 4px 15px rgba(52,152,219,0.2);
	--radius:       8px;
	--radius-lg:    10px;
	--nav-height:   64px;
}

[x-cloak] { display: none !important; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--grey-bg);
	color: #1f2937;
	min-height: 100vh;
}

html { scroll-behavior: smooth; }
p { line-height: 1.6; }

/* -----------------------------------------------------------------------------
   Alerts
   ----------------------------------------------------------------------------- */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 0.9rem; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* -----------------------------------------------------------------------------
   Cards
   ----------------------------------------------------------------------------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0,0,0,0.08); padding: 28px; margin-bottom: 24px; }
.card h2 { color: var(--navy); font-size: 1.125rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--grey-border); }

/* Standalone page card (centered, token-gated pages) */
.page-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.page-wrap--wide { max-width: 520px; width: 100%; margin: 48px auto; padding: 0 20px 60px; }
.page-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 4px 16px rgba(0,0,0,0.1); padding: 40px; width: 100%; max-width: 420px; }
.page-card--wide { max-width: 480px; padding: 36px 32px; }

/* Brand mark inside page cards */
.page-brand { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 28px; letter-spacing: 0.02em; }
.page-brand--centered { text-align: center; }
.page-brand h1 { color: var(--navy); font-size: 1.5rem; }
.page-brand p  { color: var(--grey-text); font-size: 0.875rem; margin-top: 4px; }

/* Result states (success / error / done) */
.result { text-align: center; padding: 20px 0; }
.result-icon  { font-size: 3rem; margin-bottom: 12px; }
.result-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.result-body  { font-size: 0.9rem; color: var(--grey-text); line-height: 1.6; }

/* -----------------------------------------------------------------------------
   Forms
   ----------------------------------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--navy-light); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--grey-border);
	border-radius: 6px;
	font-size: 0.95rem;
	transition: border-color 0.15s;
	background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41,128,185,0.12); }
.form-group.form-checkbox { flex-direction: row; align-items: center; gap: 8px; }
.form-group.form-checkbox input { width: auto; }
.form-group.form-checkbox label { font-size: 0.9rem; margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.hint { font-size: 0.8rem; color: var(--grey-text); margin-top: 4px; }

/* Monospace access code input */
.code-ref   { font-family: 'Courier New', monospace; font-size: 1rem; color: var(--grey-text); margin-top: 4px; text-align: center; }
.code-input { text-align: center; font-family: 'Courier New', monospace; font-size: 1.5rem; letter-spacing: 0.3em; padding: 12px; }

/* Checkbox row */
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* Field hint (below inputs) */
.field-hint { font-size: 0.78rem; color: var(--grey-text); margin-top: 4px; }

/* Help text (bottom of card, separated) */
.help-text { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--grey-border); font-size: 0.82rem; color: var(--grey-text); text-align: center; line-height: 1.5; }

/* -----------------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 20px; border: none; border-radius: 6px;
	font-size: 0.9rem; font-weight: 600; cursor: pointer;
	text-decoration: none; transition: all 0.15s;
}
.btn-primary   { background: var(--navy);    color: var(--white); }
.btn-primary:hover  { background: var(--navy-light); }
.btn-danger    { background: var(--red);     color: var(--white); }
.btn-danger:hover   { background: #c0392b; }
.btn-secondary { background: var(--grey-bg); color: var(--navy); border: 1.5px solid var(--grey-border); }
.btn-secondary:hover { background: #e5e7eb; }
.btn-full { width: 100%; justify-content: center; }
.btn-blocked { opacity: 0.7; border: 1.5px dashed var(--orange) !important; color: var(--orange) !important; background: #fffbeb !important; cursor: help !important; }

/* Small action buttons */
.btn-xs { padding: 4px 10px; font-size: 0.775rem; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.btn-xs-secondary       { background: #e5e7eb; color: #374151; }
.btn-xs-secondary:hover { background: #d1d5db; }
.btn-xs-danger          { background: #fee2e2; color: #991b1b; }
.btn-xs-danger:hover    { background: #fca5a5; }
.btn-xs-success         { background: #d1fae5; color: #065f46; }
.btn-xs-success:hover   { background: #a7f3d0; }

/* Accept / decline (token response pages) */
.btn-accept  { flex: 1; padding: 14px; background: var(--green); color: #fff; border: none; border-radius: 6px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.btn-accept:hover  { background: #219a52; }
.btn-decline { flex: 1; padding: 14px; background: #fff; color: var(--red); border: 2px solid var(--red); border-radius: 6px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.btn-decline:hover { background: #fef2f2; }

/* Toggle link button */
.btn-link { background: none; border: none; color: var(--blue); font-size: 0.8rem; cursor: pointer; padding: 0; }

/* Status strip transition buttons */
.strip-btn { padding: 6px 14px; font-size: 0.82rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all 0.15s; }

/* Public site: large CTA button (orange, hero/quote builder) */
.btn-cta { display: inline-block; padding: 14px 32px; background: var(--orange); color: var(--white); text-decoration: none; font-weight: 700; font-size: 0.9375rem; border-radius: var(--radius); border: none; cursor: pointer; transition: background 0.2s; }
.btn-cta:hover { background: var(--orange-dark); }

/* Public site: ghost outline button (white border, dark backgrounds) */
.btn-outline { display: inline-block; padding: 14px 32px; background: transparent; color: var(--white); text-decoration: none; font-weight: 600; font-size: 0.9375rem; border-radius: var(--radius); border: 2px solid rgba(255,255,255,0.4); cursor: pointer; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* Public site: primary action button (blue, large, quote builder) */
.btn-action { display: inline-block; padding: 15px 40px; font-size: 1rem; font-weight: bold; color: white; background: var(--blue); border: none; border-radius: var(--radius); cursor: pointer; transition: background 0.3s; }
.btn-action:hover    { background: var(--blue-dark); }
.btn-action:disabled { background: #95a5a6; cursor: not-allowed; }

/* WhatsApp */
.btn-whatsapp { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; background: #25d366; color: var(--white); text-decoration: none; font-weight: 700; font-size: 0.9375rem; border-radius: var(--radius); border: none; cursor: pointer; transition: background 0.2s; margin-top: 10px; }
.btn-whatsapp:hover { background: #1da851; }

/* -----------------------------------------------------------------------------
   Tables
   ----------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th { background: var(--navy); color: var(--white); padding: 10px 12px; text-align: left; white-space: nowrap; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--grey-border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f9fafb; }
.row-inactive { opacity: 0.55; }
@keyframes row-flash { 0% { background: #fef9c3; } 100% { background: transparent; } }
.row-new-flash { animation: row-flash 2s ease-out forwards; }
.action-form { display: inline; }
.empty-state { color: var(--grey-text); font-size: 0.875rem; padding: 20px 0; text-align: center; }

/* Line items table */
.line-items-table td:last-child,
.line-items-table th:last-child { text-align: right; }
.line-items-table .excluded-row { opacity: 0.5; text-decoration: line-through; }

/* Table container */
.table-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -----------------------------------------------------------------------------
   Badges
   ----------------------------------------------------------------------------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.775rem; font-weight: 600; }
.badge-admin  { background: #dbeafe; color: #1e40af; }
.badge-sub    { background: #d1fae5; color: #065f46; }
.badge-super  { background: #fef3c7; color: #92400e; }
.badge-off    { background: #f3f4f6; color: #6b7280; }
.badge-locked { background: #fee2e2; color: #991b1b; }

/* Payment type badge */
.payment-type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: #e5e7eb; color: #374151; }

/* Quote status badges */
.status-generated      { background: #f3f4f6; color: #374151; }
.status-sent           { background: #dbeafe; color: #1e40af; }
.status-under-revision { background: #fef3c7; color: #92400e; }
.status-deposit-received { background: #d1fae5; color: #065f46; }
.status-scheduled      { background: #d1fae5; color: #065f46; }
.status-on-hold        { background: #fef3c7; color: #92400e; }
.status-in-progress    { background: #dbeafe; color: #1e40af; }
.status-job-completed  { background: #d1fae5; color: #065f46; }
.status-pending-signoff { background: #fef3c7; color: #92400e; }
.status-signed-off     { background: #d1fae5; color: #065f46; }
.status-invoiced       { background: #ede9fe; color: #5b21b6; }
.status-disputed       { background: #fee2e2; color: #991b1b; }
.status-client-paid    { background: #d1fae5; color: #065f46; }
.status-no-show        { background: #fee2e2; color: #991b1b; }
.status-cancelled      { background: #f3f4f6; color: #6b7280; }
.status-expired        { background: #f3f4f6; color: #6b7280; }
.status-written-off    { background: #f3f4f6; color: #6b7280; }

/* Misc indicators */
.paid-indicator { color: var(--green); font-weight: 600; }
.date-expired   { color: var(--red); }

/* -----------------------------------------------------------------------------
   App shell: header, nav, main content
   ----------------------------------------------------------------------------- */
.app-header {
	background: var(--navy); color: var(--white);
	padding: 0 24px; height: 56px;
	display: flex; align-items: center; justify-content: space-between;
}
.app-header .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
.app-header .user-info { font-size: 0.875rem; display: flex; align-items: center; gap: 16px; }
.app-header .user-info span { color: rgba(255,255,255,0.75); }

.app-nav { background: var(--navy-light); padding: 0 24px; display: flex; align-items: center; gap: 4px; }
.app-nav .nav-inner { display: none; }
.app-nav .nav-links { display: flex; list-style: none; gap: 0; flex-wrap: nowrap; }
.app-nav .nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; padding: 10px 14px; font-size: 0.875rem; border-bottom: 3px solid transparent; display: inline-block; white-space: nowrap; transition: all 0.15s; }
.app-nav .nav-links a:hover  { color: var(--white); background: rgba(255,255,255,0.08); }
.app-nav .nav-links a.active { color: var(--white); border-bottom-color: var(--orange); }
@media (max-width: 860px) {
    .app-nav { padding: 0 16px; }
    .app-nav .nav-inner { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 10px 0; }
    .app-nav .nav-links { display: none; flex-direction: column; width: 100%; padding-bottom: 8px; }
    .app-nav .nav-links.open { display: flex; }
    .app-nav .nav-links a { border-bottom: 1px solid rgba(255,255,255,0.1); border-right: none; padding: 12px 4px; font-size: 0.9rem; }
    .app-nav .nav-links li:last-child a { border-bottom: none; }
    .app-nav .nav-burger { display: flex; }
}

.main         { max-width: 1000px; margin: 32px auto; padding: 0 24px; }
.main--wide   { max-width: 1200px; }
.main--full   { max-width: 1400px; }
.main--narrow { max-width: 480px; }

/* Logout */
.logout-form { display: inline; }
.logout-form button { background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer; font-size: 0.875rem; padding: 0; }
.logout-form button:hover { color: var(--white); text-decoration: underline; }

/* -----------------------------------------------------------------------------
   Dashboard
   ----------------------------------------------------------------------------- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dashboard-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 20px; background: var(--grey-bg); border: 2px solid var(--grey-border); border-radius: var(--radius); text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.95rem; transition: all 0.15s; text-align: center; }
.dashboard-link:hover { border-color: var(--blue); background: #eef4fb; color: var(--blue); }
.dashboard-link .icon { font-size: 2rem; }

/* -----------------------------------------------------------------------------
   Quote detail page
   ----------------------------------------------------------------------------- */
.detail-header { background: var(--white); border: 1px solid var(--grey-border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; }
.detail-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-ref { font-family: 'Courier New', monospace; font-size: 1.4rem; font-weight: 700; color: var(--navy); letter-spacing: 0.05em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--grey-border); }
.detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey-text); font-weight: 600; }
.detail-meta-value { font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.detail-meta-value.amount { font-size: 1.1rem; }
.detail-meta-value.outstanding { color: var(--orange); }
.detail-meta-value.paid        { color: var(--green); }

/* Status strip */
.detail-strip { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--grey-border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-strip-label { font-size: 0.8rem; color: var(--grey-text); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* SVG flow diagram */
.svg-panel { display: none; margin-top: 16px; overflow-x: auto; }
.svg-panel.open { display: block; }
.svg-toggle { font-size: 0.8rem; color: var(--blue); background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }

/* Tabs */
.detail-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--grey-border); margin-bottom: 20px; overflow-x: auto; }
.detail-tab { padding: 10px 18px; font-size: 0.875rem; font-weight: 600; color: var(--grey-text); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: all 0.15s; }
.detail-tab:hover { color: var(--navy); }
.detail-tab.active { color: var(--navy); border-bottom-color: var(--blue); }
.detail-tab-content { display: none; }
.detail-tab-content.active { display: block; }

/* Warnings bar */
.warnings-bar { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 10px 16px; margin-bottom: 16px; }
.dep-warning { font-size: 0.78rem; color: var(--orange); margin-top: 4px; display: none; }
.dep-warning.visible { display: block; }

/* Operations grid */
.ops-section h4 { font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; padding-top: 16px; border-top: 1px solid var(--grey-border); }
.ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Financials summary */
.financials-box { background: var(--grey-bg); border-radius: 6px; padding: 16px; }
.financials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.fin-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--grey-border); font-size: 0.875rem; }
.fin-label { color: var(--grey-text); font-weight: 600; }

/* Quotes list toolbar */
.list-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.toolbar-panel { background: var(--white); border: 1px solid var(--grey-border); border-radius: 6px; padding: 16px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.filter-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* Ref links in tables */
.ref-link { font-family: 'Courier New', monospace; font-weight: 600; color: var(--blue); text-decoration: none; }
.ref-link:hover { text-decoration: underline; }

/* Summary bar (quotes list totals) */
.summary-bar { background: var(--white); border: 1px solid var(--grey-border); border-radius: 6px; padding: 14px 20px; display: flex; gap: 24px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.summary-item  { display: flex; flex-direction: column; gap: 2px; }
.summary-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey-text); font-weight: 600; }
.summary-value { font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.summary-divider { width: 1px; align-self: stretch; background: var(--grey-border); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 20px; }
.pg-current  { background: var(--navy) !important; color: var(--white) !important; border-color: var(--navy) !important; font-weight: 700; }
.pg-disabled { color: var(--grey-text) !important; }

/* Activity timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--grey-border); }
.timeline-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--grey-bg); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-desc { font-size: 0.875rem; color: #1f2937; line-height: 1.5; word-break: break-word; }
.timeline-meta { font-size: 0.775rem; color: var(--grey-text); margin-top: 3px; }

/* Revise page */
.revise-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px; background: var(--grey-bg); border-radius: 6px; margin-bottom: 8px; }
.new-item-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.exclusion-reason-wrap { grid-column: 1 / -1; display: none; padding-left: 32px; }
.item-name  { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.item-meta  { font-size: 0.78rem; color: var(--grey-text); margin-top: 2px; }
.item-price { font-weight: 600; font-size: 0.9rem; text-align: right; white-space: nowrap; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 24px 0 12px; }

/* Client search */
.search-row { display: flex; gap: 10px; margin-bottom: 20px; }
.search-row input { flex: 1; }

/* Confirm panel */
.confirm-panel { display: none; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; padding: 16px; margin-top: 12px; }
.confirm-panel.active { display: block; }

/* -----------------------------------------------------------------------------
   Token-gated pages (dispatch accept/decline, onboarding, access code)
   ----------------------------------------------------------------------------- */
.token-wrap { max-width: 460px; margin: 60px auto; padding: 0 20px; }
.token-card { background: #fff; border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
.token-title { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.token-sub   { font-size: 0.875rem; color: var(--grey-text); margin-bottom: 24px; }
.token-actions { display: flex; gap: 12px; margin-top: 28px; }

/* Job detail rows (within token cards) */
.job-row   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--grey-border); font-size: 0.875rem; }
.job-label { color: var(--grey-text); font-weight: 600; }
.job-value { color: var(--navy); font-weight: 600; text-align: right; }

/* Job cards (scadmin offer list) */
.job-card { background: var(--white); border: 1px solid var(--grey-border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.job-card--offer { background: #fffbeb; border-color: #f97316; }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--grey-text); margin-top: 10px; }
.job-ref  { font-family: 'Courier New', monospace; font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.job-expires { font-size: 0.8rem; color: var(--orange); font-weight: 600; margin-top: 4px; }
.job-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Link list (scadmin nav) */
.link-list { display: flex; flex-direction: column; gap: 10px; }
.link-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--grey-bg); border: 1.5px solid var(--grey-border); border-radius: 6px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.9rem; transition: all 0.15s; }
.link-item:hover { border-color: var(--blue); background: #eef4fb; color: var(--blue); }
.link-item .icon { font-size: 1.25rem; }

/* -----------------------------------------------------------------------------
   Pricing page
   ----------------------------------------------------------------------------- */
.filters { background: var(--white); padding: 20px; border-radius: var(--radius); margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group label { font-weight: 600; color: var(--navy); }
.size-buttons { display: flex; gap: 5px; }
.size-btn { padding: 8px 16px; border: 2px solid var(--grey-border); background: var(--white); border-radius: 6px; cursor: pointer; font-weight: 500; transition: all 0.2s; text-decoration: none; color: inherit; display: inline-block; }
.size-btn:hover  { border-color: var(--blue); background: #eff6ff; }
.size-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pricing-table { background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow-x: auto; }
.pricing-table thead th { padding: 12px; position: sticky; top: 0; }
.pricing-table thead th:first-child { border-top-left-radius: var(--radius); }
.pricing-table thead th:last-child  { border-top-right-radius: var(--radius); }
.pricing-table tbody td { padding: 16px 12px; }
.package-name  { font-weight: 600; color: var(--navy); }
.price-cell    { text-align: center; cursor: pointer; transition: background 0.2s; }
.price-cell:hover { background: #eff6ff; }
.price         { font-size: 16px; font-weight: 700; color: var(--navy); display: block; margin-bottom: 4px; }
.margin        { font-size: 14px; color: var(--green); font-weight: 600; display: block; margin-bottom: 2px; }
.margin-percent { font-size: 12px; color: var(--grey-text); }
.empty-cell    { text-align: center; color: var(--grey-text); font-style: italic; }
.breakdown-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; padding: 20px; overflow-y: auto; }
.breakdown-modal.active { display: flex; align-items: center; justify-content: center; }
.breakdown-content { background: var(--white); border-radius: var(--radius); max-width: 900px; width: 100%; max-height: 90vh; overflow-y: auto; }
.breakdown-header { padding: 20px; background: var(--navy); color: var(--white); border-radius: var(--radius) var(--radius) 0 0; display: flex; justify-content: space-between; align-items: center; }
.breakdown-body  { padding: 20px; }
.breakdown-table { margin-bottom: 20px; }
.breakdown-table table { font-size: 14px; }
.breakdown-table thead th { background: var(--grey-bg); color: var(--navy); position: static; }
.breakdown-table .total-row { font-weight: 700; background: #f9fafb; border-top: 2px solid var(--navy); }
.items-list    { margin-top: 20px; }
.items-list h3 { color: var(--navy); margin-bottom: 10px; }
.item { padding: 8px 12px; background: #f9fafb; border-left: 3px solid var(--blue); margin-bottom: 8px; border-radius: 4px; font-size: 14px; }
.item strong { color: var(--navy); }
.close-btn { background: none; border: none; color: var(--white); font-size: 1.25rem; cursor: pointer; padding: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.close-btn:hover { background: rgba(255,255,255,0.15); }

/* Modal (generic) */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; overflow-y: auto; align-items: flex-start; justify-content: center; padding: 40px 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); max-width: 520px; width: 100%; position: relative; }
.modal-header { padding: 16px 20px; background: var(--navy); color: var(--white); display: flex; justify-content: space-between; align-items: center; border-radius: var(--radius) var(--radius) 0 0; }
.modal-header h3 { font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--white); font-size: 1.25rem; cursor: pointer; padding: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.modal-close:hover { background: rgba(255,255,255,0.15); }
.modal-body { padding: 24px; }

/* Misc shared */
.temp-password { font-family: monospace; font-size: 1.1rem; background: #1e293b; color: #86efac; padding: 14px 18px; border-radius: 6px; letter-spacing: 0.05em; margin-top: 10px; display: inline-block; }
.forced-notice { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 0.875rem; }

/* -----------------------------------------------------------------------------
   Public site
   ----------------------------------------------------------------------------- */
body.public { padding-top: var(--nav-height); color: #333; font-size: 14px; }

/* Nav */
body.public nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: var(--navy); z-index: 1000; display: flex; align-items: center; padding: 0 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
body.public .nav-inner { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 1; min-width: 0; }
.nav-logo img { height: 36px; width: auto; flex-shrink: 0; }
.nav-logo span { color: var(--white); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.nav-logo img:not([src]), .nav-logo img[src=""] { display: none; }
.nav-logo img:not([src]) + span, .nav-logo img[src=""] + span { display: block; }
body.public .nav-links { display: flex; align-items: center; gap: 5px; list-style: none; }
body.public .nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.875rem; padding: 8px 12px; border-radius: var(--radius); transition: all 0.2s; }
body.public .nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-cta { background: var(--orange) !important; color: var(--white) !important; font-weight: 600 !important; padding: 8px 18px !important; }
.nav-cta:hover { background: var(--orange-dark) !important; }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; margin-left: auto; flex-shrink: 0; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--white); transition: all 0.3s; border-radius: 2px; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0; background: var(--navy); padding: 10px 20px 20px; z-index: 999; overflow-y: auto; }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9375rem; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.1); transition: color 0.2s; }
.nav-mobile a:hover { color: var(--white); }
.nav-mobile a:last-child { border-bottom: none; margin-top: 10px; background: var(--orange); color: var(--white); text-align: center; border-radius: var(--radius); font-weight: 600; }

/* Sections */
.section-wrapper { padding: 50px 20px; max-width: 1200px; margin: 0 auto; scroll-margin-top: var(--nav-height); }
.container { max-width: 1200px; margin: 0 auto; }
.section-heading { font-size: 1.75rem; color: var(--navy); margin-bottom: 10px; }
.section-sub { color: var(--grey-text); font-size: 1rem; margin-bottom: 40px; }

/* Hero */
#home { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 50px 20px; text-align: center; }
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-area { display: inline-block; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); font-size: 0.8125rem; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px; letter-spacing: 0.5px; }
.hero-title { font-size: 2.5rem; font-weight: 700; color: var(--white); line-height: 1.2; margin-bottom: 15px; }
.hero-title span { color: var(--orange); }
.hero-desc { font-size: 1.0625rem; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 35px; }
.hero-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service-card { background: var(--white); border: 2px solid var(--grey-border); border-radius: var(--radius-lg); padding: 25px; transition: all 0.3s; text-decoration: none; color: inherit; display: block; }
.service-card:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.service-icon { width: 44px; height: 44px; background: #e8f4fd; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 15px; font-size: 1.25rem; }
.service-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.service-card p { font-size: 0.875rem; color: #555; line-height: 1.6; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.about-block { padding: 25px; background: var(--grey-bg); border-radius: var(--radius-lg); border-left: 4px solid var(--blue); }
.about-block h3 { font-size: 1.0625rem; color: var(--navy); margin-bottom: 10px; }
.about-block p { font-size: 0.9375rem; color: #555; line-height: 1.7; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.testimonial-card { background: var(--white); border: 1px solid var(--grey-border); border-radius: var(--radius-lg); padding: 25px; }
.testimonial-stars { color: #f39c12; margin-bottom: 12px; font-size: 0.875rem; }
.testimonial-body { font-size: 0.9375rem; color: #444; line-height: 1.7; margin-bottom: 15px; font-style: italic; }
.testimonial-name { font-weight: 600; color: var(--navy); font-size: 0.875rem; }
.testimonial-location { color: var(--grey-text); font-size: 0.8125rem; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--grey-border); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 18px 5px; cursor: pointer; font-size: 0.9375rem; font-weight: 600; color: var(--navy); gap: 15px; }
.faq-question:hover { color: var(--blue); }
.faq-chevron { flex-shrink: 0; width: 20px; height: 20px; color: var(--grey-text); transition: transform 0.3s; }
.faq-chevron.open { transform: rotate(180deg); }
.faq-answer { font-size: 0.9375rem; color: #555; line-height: 1.7; padding: 0 5px 18px; display: none; }
.faq-answer.open { display: block; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 20px; }
.contact-cta-heading { font-size: 1.25rem; color: var(--navy); margin-bottom: 20px; }
.contact-cta-text { font-size: 0.9375rem; color: #555; line-height: 1.7; margin-bottom: 20px; }
.contact-link { color: inherit; text-decoration: none; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.contact-item-icon { width: 36px; height: 36px; background: #e8f4fd; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.contact-item-text { font-size: 0.9375rem; color: #444; line-height: 1.5; }
.contact-item-label { font-size: 0.8125rem; color: var(--grey-text); display: block; }

/* Quote builder */
.quote-builder { padding: 50px 20px; max-width: 1200px; margin: 0 auto; scroll-margin-top: var(--nav-height); }
.quote-empty { color: var(--grey-text); }
.panel { background: white; border-radius: var(--radius-lg); padding: 25px; margin-bottom: 20px; box-shadow: var(--shadow); overflow-x: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.package-card { border: 2px solid var(--grey-border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all 0.3s; text-align: center; }
.package-card:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); }
.package-card.selected { border-color: var(--green); background: #f0fff4; }
.package-card h3 { font-size: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.filter-card { border: 2px solid var(--grey-border); border-radius: var(--radius); padding: 15px; cursor: pointer; transition: all 0.3s; text-align: center; }
.filter-card:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); }
.filter-card.selected { border-color: var(--green); background: #f0fff4; }
.filter-card h3 { font-size: 1rem; margin-bottom: 5px; }
.filter-card small { color: var(--grey-text); display: block; font-size: 0.875rem; }
.total-box { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: white; padding: 30px; border-radius: 12px; text-align: center; margin-bottom: 20px; }
.total-box h3, .total-box h4 { color: white; margin-bottom: 10px; font-size: 1.25rem; }
.total-box .price { font-size: 2.5rem !important; font-weight: bold !important; margin: 15px 0 !important; color: white !important; }
.benefits { padding: 20px; background: #fff8e1; border-radius: var(--radius); margin-bottom: 20px; line-height: 1.6; }
.benefits h3 { color: var(--orange); margin-bottom: 15px; font-size: 1.125rem; }
.quote-items { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.875rem; min-width: 600px; }
.quote-items th, .quote-items td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--grey-border); }
.quote-items th { background: #f8f9fa; font-weight: 600; font-size: 0.875rem; letter-spacing: 0.3px; }
.quote-items th.amount, .quote-items td.amount { text-align: right !important; }
.quote-items tfoot td { font-size: 0.9375rem; padding: 12px 15px; }
.work-item { padding: 15px 20px; margin: 10px 0; background: #f8f9fa; border-left: 4px solid var(--blue); border-radius: 0 6px 6px 0; }
.work-item strong { color: var(--navy); display: block; margin-bottom: 5px; font-size: 0.9375rem; }
.work-item p { color: #666; margin: 0; font-size: 0.875rem; line-height: 1.5; }
.text-center { text-align: center; }
.mt-4 { margin-top: 20px; }
.error { color: #e74c3c; background: #fee; padding: 10px; border-radius: 5px; margin: 10px 0; font-size: 0.875rem; }
.subsection-heading { font-size: 1.25rem; color: var(--navy); margin-bottom: 15px; text-align: center; }
.quote-subsection { text-align: center; padding: 20px 0; }

/* Footer */
body.public footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 40px 20px 20px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; margin-top: 10px; max-width: 300px; }
.footer-col h4 { color: var(--white); font-size: 0.875rem; margin-bottom: 12px; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.8125rem; line-height: 1.6; margin-bottom: 6px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.8125rem; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.8125rem; transition: color 0.2s; }
.footer-social a:hover { color: var(--white); }

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.form-grid { grid-template-columns: 1fr; }
	.filters { flex-direction: column; align-items: stretch; }
	.filter-group { flex-direction: column; align-items: stretch; }
	.size-buttons { flex-wrap: wrap; }
	.main, .main--wide, .main--full, .main--narrow { padding: 0 16px; margin: 16px auto; }
	body.public nav { padding: 0 15px; }
	body.public .nav-inner { gap: 10px; }
	body.public .nav-links { display: none; }
	.nav-burger { display: flex; }
	.hero-title { font-size: 1.75rem; }
	.contact-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 25px; }
	.panel { padding: 20px; }
	.list-toolbar { grid-template-columns: 1fr; }
	.filter-row { grid-template-columns: 1fr; }
	.ops-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	body.public nav { padding: 0 10px; }
	.nav-logo { gap: 8px; }
	.nav-logo img { height: 28px; }
	.hero-actions { flex-direction: column; align-items: center; }
	.panel { padding: 15px; }
}

/* Aliases — login-card/wrap used across multiple pages */
.login-wrap  { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--grey-bg); }
.login-card  { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 4px 16px rgba(0,0,0,0.1); padding: 40px; width: 100%; max-width: 420px; }
.login-card .logo { text-align: center; margin-bottom: 28px; }
.login-card .logo h1 { color: var(--navy); font-size: 1.5rem; }
.login-card .logo p  { color: var(--grey-text); font-size: 0.875rem; margin-top: 4px; }

/* JS targeting hooks */
.js-confirm-form { display: inline; }
.js-edit-user { cursor: pointer; }

/* Onboard form wrapper */
.onboard-form .form-group { margin-bottom: 18px; }
.onboard-form input, .onboard-form select { border: 1.5px solid var(--grey-border); border-radius: 7px; }

/* Done state */
.done-icon  { font-size: 3rem; margin-bottom: 12px; }
.done-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.done-body  { font-size: 0.9rem; color: var(--grey-text); line-height: 1.6; }

/* Capture popup — hidden by default via CSS, shown by Alpine adding .is-open */
.capture-popup { display: none !important; }
.capture-popup.is-open { display: flex !important; }
