/*
/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/slimselect-de9c5d96.css");
@import url("/assets/permissions_overview-0630d53b.css");
@import url("/assets/newsletter_flipbook-889fe1fd.css");
@import url("/assets/schedule_skeleton-0580ff07.css");

/* Tippy.js overrides for RubyUI HoverCard/Popover components */
/* Make tippy container transparent so RubyUI content styling shows through */
.tippy-box {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.tippy-content {
  padding: 0 !important;
}

.tippy-arrow {
  display: none !important;
}

/* Compact SlimSelect Styling - Match Tailwind search field appearance */
/* Equivalent to: bg-background p-1 block w-full shadow-sm sm:text-sm border-border rounded-md */

.ss-main {
    background-color: var(--background) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0.375rem !important; /* rounded-md */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important; /* shadow-sm */
    min-height: auto !important;
    padding: 0 !important;
}

.ss-main .ss-single-selected,
.ss-main .ss-multi-selected {
    padding: 0.25rem 0.5rem !important; /* p-1 with slightly more horizontal padding for arrow */
    font-size: 0.875rem !important; /* sm:text-sm */
    line-height: 1.25rem !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
}

.ss-main .ss-single-selected .ss-placeholder,
.ss-main .ss-multi-selected .ss-placeholder {
    font-size: 0.875rem !important;
    padding: 0 !important;
}

/* Multi-select values */
.ss-main .ss-values {
    gap: 0.25rem !important;
}

.ss-main .ss-value {
    padding: 0.125rem 0.375rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.25rem !important; /* rounded */
    background-color: var(--secondary) !important;
    color: var(--foreground) !important; /* Changed to foreground for better visibility */
}

.ss-main .ss-value .ss-value-text {
    font-size: 0.875rem !important;
    color: var(--foreground) !important; /* Changed to foreground for better visibility */
}

.ss-main .ss-value .ss-value-delete {
    height: 0.875rem !important;
    width: 0.875rem !important;
    margin-left: 0.25rem !important;
    border-left: solid 1px var(--muted-foreground) !important;
}

.ss-main .ss-value .ss-value-delete svg path {
    stroke: var(--foreground) !important;
}

/* Arrow */
.ss-main .ss-arrow {
    height: 0.75rem !important;
    width: 0.75rem !important;
    margin-right: 0.25rem !important;
}

/* Deselect button */
.ss-main .ss-deselect {
    height: 0.875rem !important;
    width: 0.875rem !important;
    margin-right: 0.25rem !important;
}

/* Dropdown content */
.ss-content {
    border: 1px solid var(--border) !important;
    border-radius: 0.375rem !important; /* rounded-md */
    background-color: var(--background) !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important; /* shadow */
    padding: 0.25rem !important;
}

/* Search input in dropdown */
.ss-content .ss-search input {
    padding: 0.25rem 0.5rem !important; /* p-1 */
    font-size: 0.875rem !important; /* sm:text-sm */
    background-color: var(--background) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0.25rem !important; /* rounded */
    color: var(--foreground) !important;
}

.ss-content .ss-search input::placeholder {
    color: var(--muted-foreground) !important;
}

.ss-content .ss-search input:focus {
    outline: 2px solid var(--ring) !important;
    outline-offset: 2px !important;
}

/* Options list */
.ss-content .ss-list {
    padding: 0 !important;
}

/* Individual options */
.ss-content .ss-option {
    padding: 0.25rem 0.5rem !important; /* p-1 with horizontal padding */
    font-size: 0.875rem !important; /* sm:text-sm */
    line-height: 1.25rem !important;
    border-radius: 0.25rem !important; /* rounded */
    color: var(--foreground) !important;
}

.ss-content .ss-option:hover {
    background-color: var(--secondary) !important;
    color: var(--secondary-foreground) !important;
}

.ss-content .ss-option.ss-highlighted {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
}

.ss-content .ss-option.ss-selected {
    background-color: var(--secondary) !important;
    color: var(--foreground) !important;
    font-weight: 500 !important;
}

.ss-content .ss-option.ss-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Optgroups */
.ss-content .ss-optgroup-label {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important; /* text-xs */
    font-weight: 600 !important;
    color: var(--muted-foreground) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.ss-content .ss-optgroup .ss-option {
    padding-left: 1rem !important; /* Indent options under optgroup */
}

/* Focus state for main select */
.ss-main:focus-within {
    outline: 2px solid var(--ring) !important;
    outline-offset: 2px !important;
    border-color: var(--ring) !important;
}

/* Disabled state */
.ss-main.ss-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: var(--muted) !important;
}

.sticky-header th {
    position: sticky;
    top: 0;
    background-color: var(--background);
    z-index: 10;
}

.sticky-first-column tr td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--background);
    z-index: 10;
}

.scrollable-container {
    max-height: 50vh;
    overflow: auto;
}

.signature-image {
    width: 113px;
    height: 31px;
}


.hierarchy-list {
    list-style-type: none;
    padding-left: 0;
}

.hierarchy-list li {
    border-left: 1px solid var(--border);
    margin-left: 20px; /* Increase indent for each level */
    padding-left: 20px;
    position: relative;
}

.hierarchy-list li:before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    bottom: -10px;
    width: 10px;
    border-left: 1px solid var(--border);
}

.hierarchy-list li:last-child:before {
    height: 10px;
}

.hierarchy-wrapper {
    width: 70%;
    max-height: 600px; /* Adjust as needed */
    overflow: auto; /* Enables scrolling */
    border: 1px solid var(--border);
}


.inline-action {
    display: none;
}

.inline-edit .inline-action {
    display: initial;
}

th:not(.sticky) {
    position: relative;
}

/* In @layer base so Tailwind min-w-* utilities (which live in @layer utilities)
   can override it — an unlayered rule would beat every layered utility and
   silently disable min-w-* on all table cells (broke the WIP frozen-column math). */
@layer base {
    th, td {
        min-width: 30px; /* or any other value you see fit */
    }
}

.total-row {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    background-color: var(--muted);
    border-top: 1px solid var(--border);
}

.total-label {
    margin-right: 1rem;
    font-weight: bold;
}

.total-value {
    font-weight: bold;
}

/* Flash styles have been moved to flash_messages.css */

/* ==========================================================================
   Schedule Grid Selection Styles
   CSS-driven visual state for multi-select functionality
   ========================================================================== */

/* Selected cell highlight - high specificity to override zebra/today/weekend backgrounds */
table td[aria-selected="true"] {
    background-color: hsl(221 83% 53% / 0.25) !important;
    box-shadow: inset 0 0 0 2px hsl(221 83% 53% / 0.5) !important;
    position: relative;
}

/* Selected cell with existing assignment (conflict warning) */
table td[aria-selected="true"][data-has-conflict="true"] {
    background-color: hsl(38 92% 50% / 0.3) !important;
    box-shadow: inset 0 0 0 2px hsl(38 92% 50% / 0.6) !important;
}

/* Dim unselected rows when any selection is active */
tbody:has(td[aria-selected="true"]) tr:not(:has(td[aria-selected="true"])) {
    opacity: 0.5;
}

/* Restore full opacity on hover for unselected rows */
tbody:has(td[aria-selected="true"]) tr:not(:has(td[aria-selected="true"])):hover {
    opacity: 0.8;
}

/* Prevent text selection during drag */
.schedule-selecting {
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================================================
   Schedule Grid Resize Handles
   Distinct grab tabs on assignment badge edges for drag-to-resize.
   Extend outside the badge so they're visually separate and don't
   interfere with clicking the badge text to open the sheet.
   ========================================================================== */

.assignment-resize-handle {
    position: absolute;
    top: -1px;
    bottom: -1px;
    width: 14px;
    cursor: ew-resize;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
    background-color: oklch(from var(--primary) l c h / 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grip dots pattern — three vertical dots */
.assignment-resize-handle::after {
    content: '···';
    font-size: 8px;
    letter-spacing: -1px;
    writing-mode: vertical-lr;
    color: oklch(from var(--primary-foreground) l c h / 0.9);
    line-height: 1;
}

[data-assignment-id]:hover .assignment-resize-handle {
    opacity: 1;
    pointer-events: auto;
}

.assignment-resize-handle--left {
    left: -7px;
    border-radius: 3px 0 0 3px;
}

.assignment-resize-handle--right {
    right: -7px;
    border-radius: 0 3px 3px 0;
}

.assignment-resizing {
    box-shadow: 0 0 0 2px oklch(from var(--primary) l c h / 0.6);
    z-index: 30 !important;
}

/* Keep handles visible during active drag (not just on hover) */
.assignment-resizing .assignment-resize-handle {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.schedule-resizing {
    user-select: none;
    -webkit-user-select: none;
    cursor: ew-resize !important;
}

.schedule-resizing * {
    cursor: ew-resize !important;
}

/* Subtle pulse while resize is saving to server */
.assignment-saving {
    opacity: 0.6;
    animation: assignment-pulse 1.2s ease-in-out infinite;
}

@keyframes assignment-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.35; }
}

/* ==========================================================================
   Row Highlight Flash
   Briefly highlights affected rows after a turbo stream update
   ========================================================================== */

@keyframes row-highlight-flash {
    0%   { background-color: hsl(221 83% 53% / 0.25); }
    100% { background-color: transparent; }
}

tr[data-highlight="true"] > td {
    animation: row-highlight-flash 1.5s ease-out forwards;
}

/* Print Styles for Timecard */
@media print {
    body.printing-timecard {
        /* Print page settings */
        margin: 0;
        padding: 0;
    }

    /* Hide everything except what we specifically want to show */
    body.printing-timecard * {
        visibility: hidden;
    }

    /* Show the printable area and all its children */
    body.printing-timecard [data-timecard-print-target="printableArea"],
    body.printing-timecard [data-timecard-print-target="printableArea"] * {
        visibility: visible;
    }

    /* Position printable area at top left */
    body.printing-timecard [data-timecard-print-target="printableArea"] {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Hide rows marked for exclusion */
    body.printing-timecard .print-hidden,
    body.printing-timecard .print-hidden * {
        visibility: hidden;
        display: none;
    }

    /* Table styling */
    body.printing-timecard table {
        width: 100%;
        border-collapse: collapse;
    }

    body.printing-timecard th,
    body.printing-timecard td {
        padding: 8px;
        border: 1px solid #000;
        text-align: left;
    }

    body.printing-timecard th {
        background-color: #f3f4f6;
        font-weight: bold;
    }

    /* Print-only header */
    body.printing-timecard .print\\:block {
        display: block;
    }

    /* Page settings */
    @page {
        margin: 0.5in;
        size: landscape;
    }

    /* Ensure colors print */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==========================================================================
   Mobile input font size — ≥16px (no iOS Safari auto-zoom)
   See CONTEXT.md §"Mobile input font size". Applies only below Tailwind's
   md breakpoint (768px) so desktop densities (md:text-sm) are preserved.
   `!important` beats Tailwind utilities (.text-sm/.text-xs carry no !important).
   ========================================================================== */
@media (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* SlimSelect search box is pinned to 0.875rem !important above (line ~117).
       The [class] attribute selector adds specificity so this holds even if
       rules are reordered (same-specificity reliance on source order is brittle). */
    .ss-content .ss-search input[class] {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   Lead / quote / customer-facsimile / overview styles live in @layer components
   so Tailwind utilities (which live in @layer utilities, a later layer) keep
   winning on these surfaces. An unlayered rule here would silently beat every
   utility regardless of specificity — see CONTEXT.md and the WIP min-w-* fix at
   @layer base above. The three rules that intentionally rely on beating a
   utility carry an explicit `!important` with an inline note.
   ========================================================================== */
@layer components {

/* ==========================================================================
   Lead show (H2) — scoped layout that does not depend on purged Tailwind
   utilities (lg:grid-cols-12 / lg:col-span-8 are missing from the build).
   See docs/leads-ui/h2-phlex-preview.html and the 2026-07-09 handoff.
   ========================================================================== */
.lead-show-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .lead-show-body {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    }
}

.lead-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    row-gap: 0.75rem;
}

.lead-pipeline-step {
    flex: 1;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.375rem 0.25rem;
    border-radius: 0.375rem;
    background: var(--muted);
    color: var(--muted-foreground);
}

.lead-pipeline-step.is-done {
    background: color-mix(in oklch, var(--primary) 85%, black);
    color: var(--primary-foreground);
}

.lead-pipeline-step.is-current {
    background: var(--warning);
    color: var(--warning-foreground);
    font-weight: 700;
}

/* Accent AFTER RubyUI Card border shorthand so border-top wins.
   !important is load-bearing: it beats RubyUI Card's `border` utility even
   inside @layer components. Hexes are deliberate — no theme token matches
   (--success is oklch hue 160 vs green-600's 149; keep #16a34a / #ea580c). */
.lead-workbench-visit {
    border-top: 5px solid #16a34a !important;
}

.lead-workbench-status {
    border-top: 5px solid #ea580c !important;
}

/* Lead form D2 workbench (ADR-0065) — same 2fr/1fr kinship as show H2 */
.lead-form-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .lead-form-body {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    }
}

.lead-form-rail {
    position: sticky;
    top: 5rem;
    align-self: start;
}

.lead-row-overdue {
    /* !important: must beat bg-card on mobile cards and hover:bg-muted/50 on table rows now that this rule is layered */
    background: color-mix(in oklch, var(--warning) 12%, white) !important;
}

/* ==========================================================================
   Quote show / form (A + money) — scoped layout; built Tailwind purge lacks
   lg:grid-cols-12 / lg:col-span-8. See docs/quotes-ui/*-phlex-preview.html.
   ========================================================================== */
.quote-show-body,
.quote-form-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .quote-show-body,
    .quote-form-body {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    }
}

.quote-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    row-gap: 0.75rem;
}

.quote-pipeline-step {
    flex: 1;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.375rem 0.25rem;
    border-radius: 0.375rem;
    background: var(--muted);
    color: var(--muted-foreground);
}

.quote-pipeline-step.is-done {
    background: color-mix(in oklch, var(--primary) 85%, black);
    color: var(--primary-foreground);
}

.quote-pipeline-step.is-current {
    background: var(--warning);
    color: var(--warning-foreground);
    font-weight: 700;
}

.quote-money-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: color-mix(in oklch, var(--muted) 45%, white);
    border: 1px solid var(--border);
}

/* Accent AFTER RubyUI Card border shorthand so border-top wins.
   !important is load-bearing: it beats RubyUI Card's `border` utility even
   inside @layer components. Hexes are deliberate — no theme token matches
   (--warning is amber vs orange-600's hue 42; keep #16a34a / #ea580c). */
.quote-workbench-visit {
    border-top: 5px solid #16a34a !important;
}

.quote-workbench-lifecycle {
    border-top: 5px solid #ea580c !important;
}

.quote-row-attention {
    /* !important: must beat bg-card on mobile cards and hover:bg-muted/50 on table rows now that this rule is layered */
    background: color-mix(in oklch, var(--warning) 12%, white) !important;
}

/* ==========================================================================
   Quote customer view — HTML facsimile of SignedEstimateGenerator (letter PDF).
   Scoped so PDF brand colors / table layout survive Tailwind purge.
   Desktop: fixed letter-width page. Mobile: same sections, stacked reflow.
   ========================================================================== */
.quote-customer-page {
    --qc-red: #cc0033;
    --qc-blue: #1e4a7a;
    --qc-blue-text: #2b5797;
    --qc-table-header: #2b5797;
    --qc-dark: #333333;
    --qc-light-gray: #f5f5f5;
    --qc-border: #cccccc;
    max-width: 56rem;
}

.quote-customer-pdf-link {
    display: inline-block;
    margin-bottom: 0.75rem;
    border-radius: 0.25rem;
    background: var(--success);
    color: var(--background);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.quote-customer-pdf-link:hover {
    background: color-mix(in oklch, var(--success) 80%, black);
}

.quote-customer-doc {
    background: #ffffff;
    color: var(--qc-dark);
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.12);
    padding: 1.25rem 1rem 1.5rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .quote-customer-doc {
        max-width: 8.5in;
        padding: 40px 50px 50px;
    }
}

.quote-customer-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .quote-customer-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.quote-customer-quotation-title {
    color: var(--qc-red);
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin: 0;
}

.quote-customer-quotation-meta {
    color: var(--qc-dark);
    font-size: 0.6875rem;
    margin: 0.125rem 0 0;
}

.quote-customer-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .quote-customer-header-right {
        align-items: flex-end;
    }
}

.quote-customer-logo {
    width: 10rem;
    height: auto;
    margin-bottom: 0.25rem;
}

.quote-customer-hq {
    text-align: left;
    font-size: 0.5rem;
    line-height: 1.35;
    color: var(--qc-dark);
}

@media (min-width: 768px) {
    .quote-customer-hq {
        text-align: right;
    }
}

.quote-customer-hq p {
    margin: 0;
}

.quote-customer-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .quote-customer-info-grid {
        grid-template-columns: 46% 54%;
        gap: 0.5rem 1rem;
    }
}

.quote-customer-info-row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
    margin-bottom: 0.55rem;
    font-size: 0.625rem;
    line-height: 1.3;
}

.quote-customer-info-label {
    color: var(--qc-blue);
    font-weight: 700;
}

.quote-customer-info-value {
    color: var(--qc-dark);
    word-break: break-word;
}

.quote-customer-section-red {
    color: var(--qc-red);
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.quote-customer-section-blue {
    color: var(--qc-blue);
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.quote-customer-clarifications {
    margin-bottom: 0.5rem;
}

.quote-customer-clarification-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--qc-blue-text);
    font-size: 0.5625rem;
    line-height: 1.35;
    counter-reset: qc-clarification;
}

.quote-customer-clarification-list li {
    counter-increment: qc-clarification;
    margin-bottom: 0.1rem;
}

.quote-customer-clarification-list li::before {
    content: counter(qc-clarification) "  ";
}

.quote-customer-table-wrap {
    margin-bottom: 0.35rem;
    overflow-x: auto;
}

.quote-customer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.5625rem;
}

.quote-customer-table th {
    background: var(--qc-table-header);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 0.3rem 0.5rem;
    border-top: 0.5px solid var(--qc-border);
    border-bottom: 0.5px solid var(--qc-border);
}

.quote-customer-table td {
    padding: 0.2rem 0.5rem;
    border-top: 0.5px solid var(--qc-border);
    border-bottom: 0.5px solid var(--qc-border);
    color: var(--qc-dark);
}

.quote-customer-row-alt td {
    background: var(--qc-light-gray);
}

.quote-customer-qty {
    text-align: center;
    width: 4rem;
}

.quote-customer-money {
    text-align: right;
    white-space: nowrap;
}

.quote-customer-amount {
    text-align: center;
    white-space: nowrap;
}

.quote-customer-labor-table th:last-child,
.quote-customer-labor-table td:last-child {
    width: 5.5rem;
}

.quote-customer-totals-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .quote-customer-totals-row {
        grid-template-columns: 1fr 11.25rem;
        align-items: start;
    }
}

.quote-customer-disclaimer {
    font-size: 0.5rem;
    line-height: 1.4;
    color: var(--qc-dark);
    margin: 0;
}

.quote-customer-totals {
    font-size: 0.625rem;
}

.quote-customer-totals-line {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0.35rem;
    color: var(--qc-dark);
}

.quote-customer-total-box {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.3rem 0.35rem;
    background: var(--qc-table-header);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.6875rem;
}

.quote-customer-tax-note {
    margin: 0.2rem 0 0;
    font-size: 0.4375rem;
    font-style: italic;
    text-align: right;
    color: var(--qc-dark);
}

.quote-customer-prepared-by {
    color: var(--qc-blue);
    font-size: 0.6875rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
}

.quote-customer-signatures {
    margin-top: 1rem;
    padding-top: 0.5rem;
}

.quote-customer-errors {
    margin: 0.75rem 0;
    border: 1px solid var(--destructive);
    background: color-mix(in oklch, var(--destructive) 10%, white);
    color: var(--destructive);
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.quote-customer-sign-form {
    margin-top: 1rem;
}

.quote-customer-sign-submit {
    width: 100%;
    background: var(--primary);
    color: var(--background);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.quote-customer-sign-submit:hover {
    background: color-mix(in oklch, var(--primary) 90%, black);
}

.quote-customer-bottom-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e6e6e6;
}

@media (min-width: 768px) {
    .quote-customer-bottom-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.quote-customer-footer-tagline {
    color: var(--qc-red);
    font-size: 0.5625rem;
    margin: 0 0 0.15rem;
}

.quote-customer-footer-contact {
    color: var(--qc-dark);
    font-size: 0.5rem;
    margin: 0;
}

.quote-customer-iso {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.quote-customer-iso-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.75rem;
    height: 0.75rem;
    border: 1px solid var(--qc-dark);
    font-size: 0.5rem;
    line-height: 1;
    color: var(--qc-dark);
}

.quote-customer-iso-label {
    font-size: 0.625rem;
    font-weight: 700;
    margin: 0;
    color: var(--qc-dark);
    line-height: 1.1;
}

.quote-customer-iso-year {
    font-size: 0.5rem;
    margin: 0;
    color: var(--qc-dark);
    line-height: 1.1;
}

/* Quote overview (staff) — action toolbar + full-viewport sign overlay */
.quote-overview-sig-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px dashed #d4d4d8;
    border-radius: 0.375rem;
    color: #71717a;
    font-size: 0.75rem;
    text-align: center;
}

.quote-overview-channel {
    cursor: pointer;
    margin: 0;
}

.quote-overview-channel-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    background: #fff;
    color: #71717a;
    border-right: 1px solid var(--border, #e4e4e7);
    height: 2rem;
}

.quote-overview-channel:last-child .quote-overview-channel-label {
    border-right: 0;
}

.quote-sign-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(2px);
}

.quote-sign-overlay.hidden {
    display: none;
}

.quote-sign-overlay-panel {
    margin: 0;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
}

@media (min-width: 768px) {
    .quote-sign-overlay-panel {
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
        border-radius: 0.5rem;
        align-self: stretch;
    }
}

.quote-sign-overlay-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
    flex-shrink: 0;
}

.quote-sign-overlay-body {
    padding: 1rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.quote-sign-overlay-foot {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border, #e4e4e7);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-shrink: 0;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

html.quote-sign-overlay-open,
body.quote-sign-overlay-open {
    overflow: hidden;
}

} /* end @layer components (lead/quote/facsimile/overview) */

