/* ═══════════════════════════════════════════════════════
   ScopeSync — Tabler Theme Overrides + App Styles
   Ice Blue Brand: #52B6F0
   ═══════════════════════════════════════════════════════ */

/* ── Tab Content Visibility ── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── CSS Variables ── */
:root {
    --bg-primary: #f8f9fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border: #e2e8f0;
    --text-primary: #000000;
    --text-secondary: #595959;
    --text-dim: #C8C8C8;
    --accent: #52B6F0;
    --accent-glow: rgba(82, 182, 240, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --soft-goods: #52B6F0;
    --hard-tile: #f59e0b;
    --resilient: #10b981;
    --floor-prep: #ef4444;
    --other: #64748b;
    --wood: #b45309;
    --wall-protection: #8b5cf6;
    --window-treatments: #06b6d4;
    --concrete-epoxy: #78716c;
    --radius: 12px;
    --radius-sm: 8px;
    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --accent-deep: #00658f;
    --border-ghost: rgba(190, 200, 208, 0.15);
    --shadow-ambient: 0 4px 24px rgba(0, 101, 143, 0.04);
    --shadow-hover: 0 8px 32px rgba(0, 101, 143, 0.08);
}

/* ── Tabler Primary Color Override ── */
:root,
[data-bs-theme="light"] {
    --tblr-primary: #52B6F0;
    --tblr-primary-rgb: 82, 182, 240;
    --bs-primary: #52B6F0;
    --bs-primary-rgb: 82, 182, 240;
    --tblr-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── ScopeSync Brand Colors ── */
:root {
    --ss-accent: #52B6F0;
    --ss-accent-glow: rgba(82, 182, 240, 0.1);
    --ss-success: #10b981;
    --ss-warning: #f59e0b;
    --ss-danger: #ef4444;
    --ss-soft-goods: #52B6F0;
    --ss-hard-tile: #f59e0b;
    --ss-resilient: #10b981;
    --ss-floor-prep: #ef4444;
    --ss-other: #64748b;
    --ss-wood: #b45309;
    --ss-wall-protection: #8b5cf6;
    --ss-window-treatments: #06b6d4;
}

/* ── Link Color ── */
a { color: var(--tblr-primary); }

/* ── Primary Button ── */
.btn-primary {
    --tblr-btn-bg: #52B6F0;
    --tblr-btn-border-color: #52B6F0;
    --tblr-btn-hover-bg: #3da5e0;
    --tblr-btn-hover-border-color: #3da5e0;
    --tblr-btn-active-bg: #2e96d1;
    --tblr-btn-active-border-color: #2e96d1;
}

/* ── Logo Font ── */
.navbar-brand-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ── Top Navigation Bar ── */
#topnav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
#topnav .container-xl { min-height: 72px; }
#topnav .navbar-brand { padding-top: 0; padding-bottom: 0; display: flex; align-items: center; }
#topnav .navbar-brand img {
    height: 60px !important;
    max-height: 60px !important;
    width: auto !important;
    display: block;
}
#topnav .navbar-collapse { align-items: center; }
#topnav .topnav-link {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    padding: 0 14px;
    height: 72px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1;
}
#topnav .topnav-link:hover { color: #1e293b; border-bottom-color: transparent; }
#topnav .topnav-link.active { color: #1e293b; border-bottom-color: #52B6F0; font-weight: 600; }
#topnav .dropdown-toggle::after { margin-left: 4px; }

/* ── Page Body ── */
.page-body { background: var(--bg-primary); padding-top: 24px; padding-bottom: 40px; }
.page-wrapper { padding-top: 0; }


/* ═══════════════════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════════════════ */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.cal-day-header {
    background: var(--bg-secondary);
    padding: 10px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.cal-day {
    min-height: 90px;
    padding: 6px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    position: relative;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.other-month { background: var(--bg-secondary); opacity: 0.4; }
.cal-day.today { background: rgba(82, 182, 240, 0.06); }
.cal-day-num { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--accent); }

.cal-event {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s;
}
.cal-event:hover { opacity: 0.8; }
.cal-event.bidding { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cal-event.submitted { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.cal-event.awarded { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* Calendar list view */
.cal-list-month {
    font-size: 13px; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 16px 0 8px; border-bottom: 1px solid var(--border);
}
.cal-list-item {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.15s;
}
.cal-list-item:hover { background: rgba(0,0,0,0.02); }
.cal-list-date { min-width: 48px; text-align: center; }
.cal-list-date-day { font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.cal-list-date-dow { font-size: 11px; color: var(--text-dim); text-transform: uppercase; }
.cal-list-info { flex: 1; }
.cal-list-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.cal-list-gc { font-size: 12px; color: var(--text-dim); }
.cal-list-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }


/* ═══════════════════════════════════════════════════════
   SCOPE TABLE & EDITABLE CELLS
   ═══════════════════════════════════════════════════════ */

.scope-table { width: 100%; border-collapse: collapse; }
.scope-table th {
    text-align: left; font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-secondary); padding: 12px 16px;
    background: var(--bg-card-hover); border-bottom: 1px solid var(--border); font-weight: 600;
}
.scope-table td {
    padding: 10px 16px; font-size: 13px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    vertical-align: middle; transition: all 0.2s;
}
.scope-table tbody tr:hover td { background: rgba(82, 182, 240, 0.03); }
.scope-table .code-cell { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; font-weight: 600; color: var(--accent); }
.scope-table .editable {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 4px; padding: 5px 8px; color: var(--text-primary);
    font-size: 13px; font-family: inherit; width: 80px; transition: all 0.2s;
}
.scope-table .editable:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82, 182, 240, 0.1); }
.scope-table .scope-details-toggle { white-space: nowrap; }
.scope-table .ext-price { font-weight: 600; color: var(--accent); }

/* Summary cards (scope review tab) */
.summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.summary-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; text-align: center; transition: all 0.2s;
}
.summary-card:hover { border-color: var(--border); background: var(--bg-card-hover); }
.summary-card .count { font-size: 28px; font-weight: 700; margin-bottom: 2px; }
.summary-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-secondary); font-weight: 600; }
.summary-card.soft-goods .count, .summary-card.carpet .count { color: var(--soft-goods); }
.summary-card.hard-tile .count { color: var(--hard-tile); }
.summary-card.resilient .count { color: var(--resilient); }
.summary-card.concrete-epoxy .count { color: var(--concrete-epoxy); }
.summary-card.floor-prep .count { color: var(--floor-prep); }
.summary-card.other .count { color: var(--other); }
.summary-card.wood .count { color: var(--wood); }
.summary-card.wall-protection .count { color: var(--wall-protection); }
.summary-card.window-treatments .count { color: var(--window-treatments); }
.summary-card.total { border: 2px solid var(--accent); }
.summary-card.total .count { color: var(--accent); font-size: 22px; }

/* Add item row */
.add-item-row { margin-top: 16px; text-align: center; }


/* ═══════════════════════════════════════════════════════
   UPLOAD AREA
   ═══════════════════════════════════════════════════════ */

.upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 48px 40px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: var(--bg-secondary);
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--accent); background: var(--accent-glow);
    box-shadow: 0 4px 20px rgba(82, 182, 240, 0.05);
}
.upload-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.upload-title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.upload-subtitle { font-size: 13px; color: var(--text-secondary); }

/* File cards */
.file-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 20px;
    margin-bottom: 8px; display: flex; align-items: center; gap: 16px; transition: all 0.2s;
}
.file-card:hover { background: var(--bg-card-hover); border-color: rgba(82, 182, 240, 0.3); }
.file-card-icon { font-size: 24px; opacity: 0.6; }
.file-card-info { flex: 1; }
.file-card-name { font-size: 14px; font-weight: 600; }
.file-card-meta { font-size: 12px; color: var(--text-secondary); }
.file-card-badge { font-size: 11px; padding: 4px 12px; border-radius: 4px; background: rgba(82, 182, 240, 0.15); color: var(--accent); font-weight: 600; }
.file-card-badge.failed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.file-card-badge.ocr { background: rgba(245, 158, 11, 0.15); color: var(--warning); }


/* ═══════════════════════════════════════════════════════
   ACTIVITY LOG
   ═══════════════════════════════════════════════════════ */

.activity-item {
    display: flex; gap: 14px; padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5); font-size: 14px; transition: all 0.2s;
}
.activity-item:hover { padding: 12px 8px; margin: 0 -8px; }
.activity-date { color: var(--text-dim); font-size: 12px; min-width: 100px; flex-shrink: 0; }
.activity-desc { color: var(--text-secondary); }


/* ═══════════════════════════════════════════════════════
   COST IMPACT BANNER
   ═══════════════════════════════════════════════════════ */

.cost-banner {
    background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-sm); padding: 14px 20px; margin-bottom: 24px; cursor: pointer;
}
.cost-banner-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--warning); }
.cost-banner-details { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(251, 191, 36, 0.15); }
.cost-banner.open .cost-banner-details { display: block; }
.cost-flag { font-size: 13px; color: var(--text-secondary); padding: 4px 0; display: flex; gap: 8px; }
.cost-flag-icon { color: var(--warning); flex-shrink: 0; }


/* ═══════════════════════════════════════════════════════
   VENDOR PRICING TAB
   ═══════════════════════════════════════════════════════ */

.vq-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.vq-section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.vq-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.vq-form-field label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.vq-form-field input, .vq-form-field select { width: 100%; padding: 8px 10px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; }
.vq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vq-table th { text-align: left; padding: 10px 12px; color: var(--text-dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.vq-table td { padding: 10px 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.4); color: var(--text-secondary); }
.vq-table tr:hover td { background: rgba(0,0,0,0.02); }
.vq-applied-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.vq-applied-badge.active { background: rgba(82, 182, 240, 0.15); color: var(--accent); }
.vq-applied-badge.inactive { background: rgba(148, 163, 184, 0.1); color: var(--text-dim); }
.vq-price-breakdown { font-size: 11px; color: var(--text-dim); }
.vq-upload-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; }
.vq-upload-area:hover, .vq-upload-area.drag-over { border-color: var(--accent); background: var(--accent-glow); }
.vq-upload-icon { font-size: 28px; margin-bottom: 8px; }
.vq-upload-title { font-size: 14px; font-weight: 500; }
.vq-upload-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.vq-coverage-fields { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.vq-coverage-fields.visible { display: grid; }


/* ═══════════════════════════════════════════════════════
   RATE CONFIDENCE & TOOLTIPS
   ═══════════════════════════════════════════════════════ */

.confidence-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.confidence-dot.high { background: var(--success); }
.confidence-dot.medium { background: var(--warning); }
.confidence-dot.low { background: var(--danger); }
.price-cell { position: relative; }
.price-cell .rate-tooltip {
    display: none; position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%); background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px;
    font-size: 12px; white-space: nowrap; z-index: 50;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4); margin-bottom: 6px;
    animation: tooltipFadeIn 0.2s ease-out;
}
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.price-cell:hover .rate-tooltip { display: block; }
.rate-tooltip-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-secondary); padding: 2px 0; }
.rate-tooltip-row.total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; font-weight: 600; color: var(--text-primary); }
.rate-tooltip-source { margin-top: 6px; font-size: 11px; color: var(--text-dim); font-style: italic; }
.scope-price-cell { min-width: 180px; }
.scope-price-breakdown {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary);
    white-space: normal;
}


/* ═══════════════════════════════════════════════════════
   PRICING MODE TOGGLE
   ═══════════════════════════════════════════════════════ */

.pricing-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pricing-toggle-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.toggle-switch { display: flex; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.toggle-option { padding: 6px 16px; font-size: 12px; cursor: pointer; color: var(--text-dim); transition: all 0.2s; border: none; background: none; font-weight: 500; }
.toggle-option.active { background: var(--accent); color: white; font-weight: 600; }
.toggle-option:hover:not(.active) { color: var(--text-secondary); background: var(--bg-card-hover); }


/* ═══════════════════════════════════════════════════════
   DELTA BADGES & MODAL
   ═══════════════════════════════════════════════════════ */

.delta-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-left: 6px; vertical-align: middle; transition: all 0.2s; }
.delta-badge.added { background: rgba(82, 182, 240, 0.2); color: var(--accent); }
.delta-badge.changed { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.delta-badge.removed { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.delta-summary-badge { display: inline-flex; gap: 6px; font-size: 11px; margin-left: 8px; }
.delta-summary-badge span { font-weight: 600; }
.delta-summary-badge .up { color: var(--accent); }
.delta-summary-badge .down { color: var(--danger); }
.delta-summary-badge .mod { color: var(--warning); }
.delta-summary-badge .net { font-weight: 600; margin-left: 4px; }
.delta-summary-badge .net.positive { color: var(--accent); }
.delta-summary-badge .net.negative { color: var(--danger); }
.delta-section { margin-bottom: 20px; }
.delta-section-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 8px 0; cursor: pointer; color: var(--text-secondary); }
.delta-section-header .count { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--bg-card); }
.delta-item-row { padding: 8px 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.3); font-size: 13px; }
.delta-item-row .code { font-family: 'SF Mono', monospace; font-weight: 600; color: var(--accent); margin-right: 8px; }
.delta-field-change { font-size: 12px; color: var(--text-dim); margin-left: 24px; padding: 4px 0; }
.delta-field-change .field-name { color: var(--text-secondary); font-weight: 500; }
.delta-field-change .old-val { text-decoration: line-through; color: var(--danger); margin: 0 4px; }
.delta-field-change .new-val { color: var(--success); }
.delta-exec-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.delta-stat { text-align: center; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all 0.2s; }
.delta-stat:hover { border-color: rgba(82, 182, 240, 0.3); background: var(--bg-card-hover); }
.delta-stat .num { font-size: 24px; font-weight: 700; }
.delta-stat .lbl { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; font-weight: 600; }
.delta-stat.added .num { color: var(--accent); }
.delta-stat.removed .num { color: var(--danger); }
.delta-stat.changed .num { color: var(--warning); }
.delta-stat.net .num { color: var(--accent); }


/* ═══════════════════════════════════════════════════════
   VENDOR EMAIL CARDS
   ═══════════════════════════════════════════════════════ */

.vendor-email-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; transition: all 0.2s; }
.vendor-email-card:hover { border-color: rgba(82, 182, 240, 0.3); background: var(--bg-card-hover); }
.vendor-email-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; transition: all 0.2s; }
.vendor-email-header:hover { background: var(--bg-card-hover); }
.vendor-email-header .mfg-name { font-weight: 700; font-size: 14px; }
.vendor-email-header .item-count { font-size: 12px; color: var(--text-dim); }
.vendor-email-body { display: none; padding: 0 16px 16px; }
.vendor-email-card.open .vendor-email-body { display: block; }
.vendor-email-subject { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.vendor-email-subject strong { color: var(--text-primary); }
.vendor-email-text {
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: 6px; padding: 12px; font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px; line-height: 1.5; white-space: pre-wrap;
    color: var(--text-secondary); max-height: 300px; overflow-y: auto;
}
.copy-btn {
    display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px;
    font-size: 12px; font-weight: 500; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-secondary); border-radius: 6px;
    cursor: pointer; transition: all 0.2s; margin-top: 8px;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-card-hover); }
.copy-btn.copied { border-color: var(--accent); color: var(--accent); background: rgba(82, 182, 240, 0.1); }

/* Vendor contact info */
.vendor-contact-info {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; font-size: 12px;
    border-top: 1px solid var(--border);
}
.vendor-contact-info i { font-size: 16px; flex-shrink: 0; }
.vendor-contact-matched { background: rgba(16, 185, 129, 0.05); }
.vendor-contact-matched i { color: var(--success); }
.vendor-contact-unmatched { background: rgba(245, 158, 11, 0.05); }
.vendor-contact-unmatched i { color: var(--warning); }
.vendor-contact-info span { color: var(--text-secondary); }

/* Unmatched vendor banner */
.vendor-unmatched-banner {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; margin-bottom: 16px;
    background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
}
.vendor-unmatched-banner i { color: var(--warning); font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.vendor-unmatched-banner strong { color: var(--warning); }


/* ═══════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════ */

.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { text-align: center; padding: 60px 20px; }
.loading-text { margin-top: 16px; color: var(--text-secondary); font-size: 14px; }


/* ═══════════════════════════════════════════════════════
   DUPLICATE WARNING CARDS
   ═══════════════════════════════════════════════════════ */

.dup-card { background: var(--bg-card); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.dup-card:hover { border-color: rgba(245, 158, 11, 0.6); background: var(--bg-card-hover); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1); }
.dup-card-name { font-weight: 700; color: var(--text-primary); font-size: 15px; }
.dup-card-gc { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.dup-card-meta { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.dup-card-meta span { color: var(--text-dim); font-size: 12px; }
.dup-card-meta span strong { color: var(--warning); }
.dup-confidence { display: inline-block; background: rgba(245, 158, 11, 0.15); color: var(--warning); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; margin-left: 8px; }


/* ═══════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════ */

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-sub { font-size: 14px; color: var(--text-secondary); }


/* ═══════════════════════════════════════════════════════
   PROJECT CARDS v2 (Mockup Design)
   ═══════════════════════════════════════════════════════ */

/* New card style matching Stitch mockup */
.project-card-v2 {
    background: #ffffff;
    border: 1px solid #dde3ed;
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.project-card-v2:hover {
    border-color: #52B6F0;
    box-shadow: 0 4px 16px rgba(82, 182, 240, 0.12);
}
.project-card-v2-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}
.project-card-v2-gc {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 10px;
}
.project-card-v2-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}
.project-card-v2-meta .meta-date { color: #64748b; }
.project-card-v2-meta .meta-date.due-soon { color: #f59e0b; font-weight: 600; }

/* Status pill badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.status-estimating { background: #52B6F0; color: #ffffff; }
.status-proposal   { background: #f59e0b; color: #ffffff; }
.status-won        { background: #10b981; color: #ffffff; }
.status-lost       { background: #94a3b8; color: #ffffff; }

/* Filter tabs above project list */
.project-filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-tab:hover { border-color: #52B6F0; color: #52B6F0; }
.filter-tab.active { background: #52B6F0; border-color: #52B6F0; color: #ffffff; font-weight: 600; }

/* Pagination */
.project-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 0 8px;
}
.page-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: #52B6F0; color: #52B6F0; }
.page-btn.active { background: #52B6F0; border-color: #52B6F0; color: #ffffff; font-weight: 600; }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* New Project button */
.new-project-btn { font-size: 14px; font-weight: 600; padding: 8px 18px; border-radius: 8px; }

/* Legacy project-card kept for calendar/dashboard badges */
.project-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px;
    margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
}
.project-card:hover { border-color: rgba(82, 182, 240, 0.3); background: var(--bg-card-hover); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.project-card-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.project-card-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.project-card-stats { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-dim); }


/* ═══════════════════════════════════════════════════════
   STAT CARDS (Vendor Pricing)
   ═══════════════════════════════════════════════════════ */

.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-card-value.accent { color: var(--accent); }
.stat-card-value.warning { color: var(--warning); }


/* ═══════════════════════════════════════════════════════
   DASHBOARD — Arctic Monolith
   ═══════════════════════════════════════════════════════ */

.dash-shell {
    --bg-primary: #f7f9fb;
    --bg-secondary: #f2f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f2f4f6;
    --border: #e6e8ea;
    --border-ghost: rgba(190, 200, 208, 0.15);
    --text-primary: #191c1e;
    --text-secondary: #3f484f;
    --text-dim: #6f7880;
    --accent: #52B6F0;
    --accent-deep: #00658f;
    --radius: 0.5rem;
    --radius-sm: 0.375rem;
    --shadow-ambient: 0 4px 24px rgba(0, 101, 143, 0.04);
    --shadow-hover: 0 8px 32px rgba(0, 101, 143, 0.08);
    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

/* Page header */
.dash-header {
    margin-bottom: 28px;
}
.dash-header h2 {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
}

/* KPI stat cards */
.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-kpi {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow-ambient);
    transition: box-shadow 0.2s, transform 0.2s;
}
.dash-kpi:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.dash-kpi-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.dash-kpi-value {
    font-family: var(--font-headline);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Needs Attention panel */
.dash-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-ambient);
    overflow: hidden;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-ghost);
}

.dash-panel-title {
    font-family: var(--font-headline);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dash-panel-body {
    padding: 20px 24px;
}

/* Attention grid — two columns */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* Section within attention */
.dash-section {
    background: var(--bg-primary);
    border-radius: var(--radius);
    overflow: hidden;
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
}

.dash-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-section-title i {
    color: var(--text-dim);
    font-size: 16px;
}

.dash-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 101, 143, 0.08);
    color: var(--accent-deep);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
}

/* List items */
.dash-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.dash-item:hover {
    background: rgba(82, 182, 240, 0.04);
    color: inherit;
    text-decoration: none;
}

.dash-item-info {
    min-width: 0;
    flex: 1;
}

.dash-item-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-item-meta {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Urgency / follow-up badges */
.dash-badge {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
    text-align: center;
    min-width: 78px;
    flex-shrink: 0;
}
.dash-badge-urgent { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.dash-badge-warning { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.dash-badge-info { background: rgba(0, 101, 143, 0.08); color: #00658f; }
.dash-badge-follow-up { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.dash-badge-stale { background: rgba(100, 116, 139, 0.1); color: #475569; }

/* Empty section message */
.dash-section-empty {
    padding: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-dim);
}

/* More link */
.dash-section-more {
    display: block;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-deep);
    text-decoration: none;
    transition: background 0.15s;
}
.dash-section-more:hover {
    background: rgba(82, 182, 240, 0.04);
    color: var(--accent-deep);
}

/* Calm states (empty, all caught up, error) */
.dash-calm {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
}

.dash-calm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(82, 182, 240, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 16px;
}

.dash-calm-heading {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dash-calm-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dim);
    max-width: 420px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.dash-calm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Brand gradient CTA button */
.dash-btn-gradient {
    background: linear-gradient(45deg, #00658f, #52B6F0) !important;
    border: none !important;
    font-family: var(--font-body);
    font-weight: 600;
}
.dash-btn-gradient:hover {
    opacity: 0.9;
}

/* Status chips (for all-caught-up state) */
.dash-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-ghost);
    background: var(--bg-card);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.dash-chip strong { font-weight: 700; }
.dash-chip.status-bidding { color: var(--accent-deep); border-color: rgba(82, 182, 240, 0.2); }
.dash-chip.status-submitted { color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }
.dash-chip.status-awarded { color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.dash-chip.status-lost { color: var(--other); border-color: rgba(100, 116, 139, 0.2); }


/* ═══════════════════════════════════════════════════════
   CATEGORY DOTS (Scope Table Headers)
   ═══════════════════════════════════════════════════════ */

.category-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.category-dot.soft-goods, .category-dot.carpet { background: var(--soft-goods); }
.category-dot.hard-tile { background: var(--hard-tile); }
.category-dot.resilient { background: var(--resilient); }
.category-dot.concrete-epoxy { background: var(--concrete-epoxy); }
.category-dot.floor-prep { background: var(--floor-prep); }
.category-dot.other { background: var(--other); }
.category-dot.wood { background: var(--wood); }
.category-dot.wall-protection { background: var(--wall-protection); }
.category-dot.window-treatments { background: var(--window-treatments); }


/* ═══════════════════════════════════════════════════════
   DRAG-OVER STATE (File Uploads)
   ═══════════════════════════════════════════════════════ */

.upload-area.drag-over, .vq-upload-area.drag-over {
    border-color: var(--accent) !important;
    background: var(--accent-glow) !important;
}


/* ═══════════════════════════════════════════════════════
   LOGIN / AUTH SCREEN
   ═══════════════════════════════════════════════════════ */

#auth-screen {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a2e;
}
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.auth-field input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 14px; font-family: inherit; transition: all 0.2s;
    box-sizing: border-box;
}
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82, 182, 240, 0.1); }
.auth-error {
    background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm); padding: 10px 14px;
    font-size: 13px; color: var(--danger); margin-bottom: 16px;
}
.auth-btn {
    width: 100%; padding: 12px;
    background: var(--accent); border: none;
    border-radius: var(--radius-sm); color: white;
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s;
}
.auth-btn:hover { background: #3da5e0; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }


/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .summary { grid-template-columns: repeat(2, 1fr); }
    .scope-table { font-size: 12px; }
    .scope-table .editable { width: 60px; }
    .delta-exec-summary { grid-template-columns: repeat(2, 1fr); }
    .vq-form { grid-template-columns: 1fr 1fr; }
    .cal-day { min-height: 60px; }
    .cal-event { font-size: 10px; }
    .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; gap: 16px; }
    .dash-kpi { padding: 20px; }
    .dash-kpi-value { font-size: 26px; }
}

@media (max-width: 480px) {
    .summary { grid-template-columns: 1fr; }
    .delta-exec-summary { grid-template-columns: 1fr 1fr; }
    .cal-day { min-height: 50px; padding: 3px; }
    .cal-day-num { font-size: 10px; }
    .dash-kpi-row { grid-template-columns: 1fr; }
    .dash-header h2 { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════
   ESTIMATING STEPPER (Phase 2 UI)
   ═══════════════════════════════════════════════════════ */

.estimating-stepper {
    display: flex;
    align-items: flex-start;
    padding: 20px 0 24px;
    margin-bottom: 4px;
    overflow-x: auto;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 6px;
    min-width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.stepper-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stepper-item.active .stepper-dot {
    border-color: #52B6F0;
    background: #52B6F0;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(82, 182, 240, 0.15);
}

.stepper-item.completed .stepper-dot {
    border-color: #52B6F0;
    background: #52B6F0;
    color: #fff;
}

.stepper-item:hover:not(.active):not(.completed) .stepper-dot {
    border-color: #52B6F0;
    color: #52B6F0;
    background: rgba(82, 182, 240, 0.06);
}

.stepper-item:hover.completed .stepper-dot {
    background: #3da5e0;
    border-color: #3da5e0;
}

.stepper-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

.stepper-desc {
    font-size: 10px;
    color: #c8c8c8;
    line-height: 1.2;
}

.stepper-item.active .stepper-label { color: #52B6F0; }
.stepper-item.completed .stepper-label { color: #1e293b; }
.stepper-item.active .stepper-desc { color: #52B6F0; opacity: 0.7; }
.stepper-item.completed .stepper-desc { color: #64748b; }

.stepper-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin-top: 19px; /* vertically aligns with center of 38px dot */
    min-width: 24px;
    flex-shrink: 1;
}

.stepper-connector.completed { background: #52B6F0; }


/* ═══════════════════════════════════════════════════════
   PRICING WORKSPACE TABLE (Phase 2 UI — mockup match)
   ═══════════════════════════════════════════════════════ */

.pricing-workspace-table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-workspace-table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    padding: 11px 14px;
    background: #f8f9fb;
    border-bottom: 2px solid #e2e8f0;
    border-top: none;
    white-space: nowrap;
    vertical-align: bottom;
}

.pricing-workspace-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    vertical-align: middle;
    font-size: 13px;
}

.pricing-workspace-table tbody tr:hover td {
    background: rgba(82, 182, 240, 0.03);
}

/* Category separator row */
.pricing-workspace-table .pw-category-row td {
    background: #f1f5f9;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 7px 14px;
    border-bottom: none;
}

/* Product name cell */
.pw-code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #52B6F0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pw-desc {
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.3;
}

/* Rate values (read-only from rate engine) */
.pw-rate {
    font-size: 13px;
    color: #64748b;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

/* Bid total column */
.pw-total {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Grand total footer */
.pricing-workspace-table tfoot td {
    padding: 14px;
    border-top: 2px solid #e2e8f0;
    background: #f8f9fb;
}

.grand-total-row td {
    padding: 16px 14px !important;
    background: #fff !important;
    border-top: 2px solid #e2e8f0 !important;
}

.grand-total-amount {
    font-size: 26px;
    font-weight: 700;
    color: #52B6F0;
    line-height: 1.1;
}


/* ── Bid Adjustments Tab ── */
.bid-adjustments-table { font-size: 0.82rem; }
.bid-adjustments-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: #626976; padding: 6px 8px; border-bottom: 2px solid #e6e7e9; white-space: nowrap; }
.bid-adjustments-table td { padding: 4px 8px; vertical-align: middle; }
.bid-category-row td { background: #f4f6fa; padding: 6px 8px !important; font-size: 0.78rem; letter-spacing: 0.02em; }
.bid-inline-input { text-align: center; padding: 2px 4px; font-size: 0.8rem; height: 28px; }
.bid-inline-input.bid-default { background: #f4f6fa; border-color: #dce0e5; color: #626976; }
.bid-inline-input.bid-override { background: #fff; border-color: #206bc4; color: #1e293b; font-weight: 600; }
.bid-inline-input:focus { border-color: #206bc4; box-shadow: 0 0 0 2px rgba(32, 107, 196, 0.15); }
.bid-notes-row td { border-top: none !important; padding-top: 0 !important; }

/* QTY input — right-align text to match header, float input right in cell */
.bid-inline-input.bid-qty-input { text-align: right; width: 72px; margin-left: auto; display: block; }

/* Unit select — wider to prevent dropdown arrow colliding with SY/SF/LF text */
.bid-inline-input.bid-unit-select { width: 68px; padding: 0.15rem 1.2rem 0.15rem 0.25rem; font-size: 0.75rem; margin: 0 auto; }

/* ── Quote Workspace Drawer ── */
.quote-workspace-drawer { width: 420px !important; }
@media (max-width: 575.98px) { .quote-workspace-drawer { width: 100% !important; } }


/* ═══════════════════════════════════════════════════════
   MARGINS TAB (Step 4)
   ═══════════════════════════════════════════════════════ */

/* Global margin range slider — ice blue track */
.mw-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #52B6F0 0%, #52B6F0 var(--slider-pct, 50%), #e2e8f0 var(--slider-pct, 50%), #e2e8f0 100%);
    outline: none;
    cursor: pointer;
}
.mw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #52B6F0;
    border: 3px solid #fff;
    box-shadow: 0 1px 6px rgba(82, 182, 240, 0.4);
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.mw-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 6px rgba(82, 182, 240, 0.15);
}
.mw-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #52B6F0;
    border: 3px solid #fff;
    box-shadow: 0 1px 6px rgba(82, 182, 240, 0.4);
    cursor: pointer;
}

/* Big percentage display next to slider */
.mw-global-display {
    text-align: center;
    min-width: 100px;
    flex-shrink: 0;
}
.mw-global-num {
    font-size: 40px;
    font-weight: 800;
    color: #52B6F0;
    line-height: 1;
    letter-spacing: -1px;
}
.mw-global-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Per-product table */
.mw-table {
    width: 100%;
}
.mw-table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    padding: 10px 14px;
    background: #f8f9fb;
    border-bottom: 2px solid #e2e8f0;
}
.mw-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    vertical-align: middle;
}
.mw-table tbody tr:hover td {
    background: rgba(82, 182, 240, 0.03);
}
.mw-code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #52B6F0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mw-desc {
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
    margin-top: 1px;
}
.mw-margin-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mw-margin-cell input.mw-default {
    background: #f8f9fb;
    border-color: #dde3ed;
    color: #94a3b8;
    width: 120px;
}
.mw-margin-cell input.mw-override {
    background: #fff;
    border-color: #52B6F0;
    color: #1e293b;
    font-weight: 600;
    width: 120px;
}
.mw-margin-cell input:focus {
    border-color: #52B6F0;
    box-shadow: 0 0 0 3px rgba(82, 182, 240, 0.12);
}
.mw-edit-icon {
    font-size: 13px;
    color: #52B6F0;
    flex-shrink: 0;
}

/* Summary panel */
.mw-summary-card {
    position: sticky;
    top: 80px;
}
.mw-total-block {
    text-align: center;
    padding: 16px 0 20px;
    border-bottom: 1px solid #e2e8f0;
}
.mw-total-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 6px;
}
.mw-total-amount {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
}
.mw-breakdown {
    margin-top: 16px;
}
.mw-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    font-size: 13px;
}
.mw-breakdown-row:last-child {
    border-bottom: none;
}
.mw-breakdown-label {
    color: #64748b;
}
.mw-breakdown-value {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.mw-margin-row .mw-breakdown-value {
    color: #10b981;
}
