/**
 * Embroidery Pricing All - Unified Embroidery Pricing Page
 * Tabbed interface for AL/CEMB and DECG pricing
 */

:root {
    --primary-color: #4cb354;
    --primary-dark: #409a47;
    --primary-light: #e8f5e9;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #9ca3af;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-text: #dc2626;
    --warning-bg: #fef3c7;
    --warning-border: #fbbf24;
    --warning-text: #92400e;
    --info-bg: #e8f5e9;
    --info-border: #86d98e;
    --info-text: #2d7a35;
    --ltm-bg: #fef9c3;
    --ltm-border: #fde047;
    --best-bg: #dcfce7;
    --best-border: #86efac;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Unified Green Accent Theme */
    --contract-bg: #e8f5e9;
    --contract-bg-light: #d5ecd7;
    --contract-border: #86d98e;
    --contract-text: #4cb354;
    --contract-text-dark: #2d7a35;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Error Banner */
.api-error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--error-bg);
    border-bottom: 2px solid var(--error-border);
    color: var(--error-text);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 1000;
}

.api-error-banner.hidden {
    display: none;
}

.api-error-banner i {
    font-size: 1.25rem;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.page-header {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-muted);
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header h1 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-header .version-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-dark);
}

.tab-btn i {
    font-size: 1.25rem;
}

.tab-btn .tab-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.tab-btn.active .tab-subtitle {
    color: var(--primary-dark);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Use Case Banner */
.use-case-banner {
    background: #f5f7fa;
    border: 1px solid #d1d5db;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #374151;
}

.use-case-banner i {
    font-size: 1.25rem;
    margin-top: 2px;
}

/* LTM Banner */
.ltm-banner {
    background: var(--ltm-bg);
    border: 1px solid var(--ltm-border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--warning-text);
    font-size: 0.9rem;
}

.ltm-banner i {
    font-size: 1.1rem;
}

/* Matrix Grid */
.matrices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Matrix Card */
.matrix-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.matrix-card.full-width {
    grid-column: 1 / -1;
}

.matrix-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.matrix-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.matrix-header h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.matrix-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-color);
    padding: 4px 10px;
    border-radius: 20px;
}

.fb-ltm-notice {
    flex-basis: 100%;
    background: var(--ltm-bg);
    border: 1px solid var(--ltm-border);
    color: var(--warning-text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

/* Loading and Error States */
.loading-cell {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-style: italic;
}

.loading-cell::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-cell {
    text-align: center;
    padding: 24px;
    color: var(--error-text);
    background: var(--error-bg);
}

/* Pricing Matrix Table */
.pricing-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pricing-matrix th,
.pricing-matrix td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.pricing-matrix th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-matrix th:first-child,
.pricing-matrix td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--bg-color);
    color: var(--text-primary);
}

.pricing-matrix th.ltm-tier {
    background: var(--ltm-bg);
    color: var(--warning-text);
}

.pricing-matrix th.best-tier {
    background: var(--best-bg);
    color: #16a34a;
}

.pricing-matrix td.ltm-col {
    background: #fffbeb;
}

.pricing-matrix td.best-col {
    background: #f0fdf4;
    font-weight: 600;
    color: #16a34a;
}

/* Rate Footer Row */
.pricing-matrix tr.rate-footer {
    background: var(--bg-color);
    border-top: 2px solid var(--border-color);
}

.pricing-matrix tr.rate-footer td {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.pricing-matrix.compact {
    max-width: 400px;
}

/* Calculator Card */
.calculator-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

/* Compact calculator variant - for top-of-tab placement */
.calculator-card.compact {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

.calculator-card.compact h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.calculator-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.calculator-card h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 179, 84, 0.15);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 26px;
}

/* Calculator Results */
.calc-results {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
}

.result-row.breakdown {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

.result-row.total {
    border-top: 2px solid var(--border-color);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Final unit price row - emphasized for quick reading */
.result-row.final {
    border-top: 2px solid var(--primary-color);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.result-row .final-price {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.result-row.error {
    color: var(--error-text);
    font-size: 0.9rem;
}

.result-row .price {
    font-weight: 600;
    color: var(--primary-dark);
}

.result-row .fee {
    color: var(--warning-text);
}

.result-row .total-price {
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.result-row.hidden {
    display: none;
}

/* General hidden class for form groups and checkbox groups */
.form-group.hidden,
.checkbox-group.hidden {
    display: none;
}

/* Hourly Revenue Check */
.hourly-check {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.hourly-check.good {
    background: #dcfce7;
    color: #16a34a;
}

.hourly-check.warn {
    background: #fef9c3;
    color: #ca8a04;
}

.hourly-check.bad {
    background: #fef2f2;
    color: #dc2626;
}

/* Simplified Pricing Table */
.pricing-matrix.simple {
    max-width: 350px;
}

.pricing-matrix.simple td.price-cell {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.matrix-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

.ltm-note {
    color: var(--warning-text);
    font-size: 0.75rem;
}

.ltm-badge-small {
    background: var(--ltm-bg);
    color: var(--warning-text);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* ShopWorks Part Number Badge */
.part-number-badge {
    display: inline-block;
    background: var(--contract-bg-light);
    color: var(--contract-text-dark);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--contract-border);
    margin-left: 8px;
    font-family: 'Consolas', monospace;
}

/* ShopWorks Reference Card */
.shopworks-ref-card {
    background: #f5f7fa;
    border: 1px solid #d1d5db;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shopworks-ref-card .ref-title {
    font-weight: 600;
    color: #1f2937;
}

.shopworks-ref-card .ref-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.shopworks-ref-card .ref-code {
    font-family: 'Consolas', monospace;
    font-weight: 600;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}


/* Fees Card */
.fees-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.fees-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.fees-card h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.fees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.fee-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.fee-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fee-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.fee-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Script Card */
.script-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.script-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.script-card h3 i {
    color: #4cb354;
    margin-right: 8px;
}

.script-example {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 16px;
    border-left: 4px solid #4cb354;
}

.script-example p {
    margin-bottom: 12px;
}

.script-example p:last-child {
    margin-bottom: 0;
}

.script-example strong {
    color: var(--text-primary);
}

/* Surcharge Card */
.surcharge-card {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    margin-bottom: 24px;
}

.surcharge-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--warning-text);
    margin-bottom: 8px;
}

.surcharge-card h3 i {
    margin-right: 8px;
}

.surcharge-card p {
    color: var(--warning-text);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 12px;
    }

    .matrices-grid {
        grid-template-columns: 1fr;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        flex-direction: row;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .pricing-matrix {
        font-size: 0.8rem;
    }

    .pricing-matrix th,
    .pricing-matrix td {
        padding: 6px 8px;
    }
}

/* Pricing Rationale Callout */
.pricing-rationale {
    background: #e8f5e9;
    border: 1px solid #86d98e;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.pricing-rationale strong {
    color: #2d7a35;
    display: block;
    margin-bottom: 8px;
}

.pricing-rationale i {
    margin-right: 6px;
}

.pricing-rationale ul {
    margin: 0 0 0 20px;
    color: var(--text-primary);
}

.pricing-rationale li {
    margin-bottom: 4px;
}

.pricing-rationale em {
    color: #2d7a35;
}


/* Decision Guide */
.decision-guide {
    background: linear-gradient(135deg, #e8f5e9 0%, #f5f7fa 100%);
    border: 2px solid #4cb354;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.decision-guide h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d7a35;
    margin-bottom: 16px;
}

.decision-guide h4 i {
    margin-right: 8px;
}

.decision-flowchart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decision-step {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border-left: 4px solid #4cb354;
}

.decision-question {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.decision-answers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
}

.decision-yes {
    color: #16a34a;
}

.decision-yes i {
    margin-right: 4px;
}

.decision-no {
    color: #dc2626;
}

.decision-no i {
    margin-right: 4px;
}

/* Eligibility Warning */
.eligibility-warning {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.eligibility-warning i {
    color: #dc2626;
    font-size: 1.5rem;
    margin-top: 2px;
}

.eligibility-warning strong {
    color: #dc2626;
}

.eligibility-warning ul {
    margin: 8px 0 12px 20px;
    color: var(--text-primary);
}

.eligibility-warning li {
    margin-bottom: 4px;
}

.eligibility-warning .warning-impact {
    background: #fecaca;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 0;
}

/* Reference card divider */
.shopworks-ref-card .ref-divider {
    color: var(--text-muted);
    margin: 0 4px;
}

/* Cap upgrades in reference card */
.shopworks-ref-card .ref-upgrades {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shopworks-ref-card .ref-upgrades .loading-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.shopworks-ref-card .ref-upgrades .upgrade-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.shopworks-ref-card .ref-upgrades .upgrade-price {
    font-weight: 600;
    color: #16a34a;
}

/* ============================================
   INFO DISCLOSURE (Collapsible Panels)
   Modern <details>/<summary> with animations
   ============================================ */

.info-disclosure {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.info-disclosure summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--info-text);
    user-select: none;
    list-style: none; /* Remove default marker */
}

.info-disclosure summary::-webkit-details-marker {
    display: none; /* Remove Safari marker */
}

/* Custom expand/collapse icon */
.info-disclosure summary::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.info-disclosure[open] summary::before {
    transform: rotate(90deg);
}

/* Hint text on the right */
.info-disclosure .disclosure-hint {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Animate content with ::details-content (Chrome 131+) */
.info-disclosure::details-content {
    transition: height 0.3s ease, opacity 0.3s ease;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.info-disclosure[open]::details-content {
    height: auto;
    opacity: 1;
}

/* Fallback for browsers without ::details-content */
@supports not selector(::details-content) {
    .info-disclosure .disclosure-content {
        padding: 0 16px 16px 16px;
    }
}

/* Content area */
.info-disclosure .disclosure-content {
    padding: 0 16px 16px 16px;
}

/* Sections within disclosure content */
.info-disclosure .disclosure-section {
    margin-bottom: 12px;
}

.info-disclosure .disclosure-section:last-child {
    margin-bottom: 0;
}

.info-disclosure .disclosure-section ul {
    margin: 8px 0 0 20px;
    color: var(--text-primary);
}

.info-disclosure .disclosure-section li {
    margin-bottom: 4px;
}

.info-disclosure .disclosure-section.warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 12px;
}

.info-disclosure .disclosure-section.warning strong {
    color: #dc2626;
}

/* Hover effect */
.info-disclosure summary:hover {
    background: rgba(0, 0, 0, 0.03);
}

.info-disclosure summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Decision flowchart inside disclosure */
.info-disclosure .decision-flowchart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-disclosure .decision-step {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border-left: 4px solid #4cb354;
}

.info-disclosure .decision-question {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.info-disclosure .decision-answers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
}

.info-disclosure .decision-yes {
    color: #16a34a;
}

.info-disclosure .decision-yes i {
    margin-right: 4px;
}

.info-disclosure .decision-no {
    color: #dc2626;
}

.info-disclosure .decision-no i {
    margin-right: 4px;
}

/* ============================================
   LASER PATCH SECTION
   Shows laser patch pricing (cap 8K + $5)
   ============================================ */

.laser-patch-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed var(--border-color);
}

.laser-patch-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.laser-patch-section h4 i {
    color: #d97706;
}

.laser-patch-section .calc-results {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
}

.laser-patch-section .result-row.final {
    border-top-color: #d97706;
}

.laser-patch-section .final-price {
    color: #b45309;
}

/* ============================================
   SHARE LINK BUTTON
   ============================================ */

.share-link-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--contract-text);
    color: white;
    border: 1px solid var(--contract-text);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.share-link-btn:hover {
    background: var(--contract-text-dark);
    border-color: var(--contract-text-dark);
}

.share-link-btn i {
    font-size: 0.9rem;
}

.share-link-btn.copied {
    background: #16a34a;
    border-color: #16a34a;
}

/* ============================================
   PRINT CONTRACT BUTTON
   ============================================ */

.print-contract-btn {
    margin-left: 8px;
    padding: 8px 16px;
    background: white;
    color: var(--contract-text-dark);
    border: 1px solid var(--contract-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.print-contract-btn:hover {
    background: var(--contract-bg-light);
    border-color: var(--contract-text);
}

.print-contract-btn i {
    font-size: 0.9rem;
}

/* ============================================
   PRINT-ONLY CONTAINER (Hidden on screen)
   ============================================ */

.print-only {
    display: none;
}

/* ============================================
   VIEW ALL SURCHARGE ACCOUNTS BUTTON
   ============================================ */

.es-view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.es-view-all-btn:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #4cb354;
    box-shadow: 0 4px 12px rgba(76, 179, 84, 0.25);
    transform: translateY(-1px);
}
.es-view-all-btn i {
    font-size: 16px;
    color: #4cb354;
}
.es-view-all-count {
    background: #4cb354;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 4px;
}

/* ============================================
   SURCHARGE CUSTOMER MODAL
   ============================================ */

.sc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.sc-modal-overlay.open {
    display: flex;
}

.sc-modal {
    background: #fff;
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ── Modal Header ── */
.sc-modal-header {
    background: #0f172a;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.sc-modal-title h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0;
}
.sc-modal-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
}
.sc-modal-stats {
    display: flex;
    gap: 20px;
    margin-left: auto;
}
.sc-stat {
    text-align: right;
}
.sc-stat-num {
    font-family: 'DM Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    color: #fff;
}
.sc-stat-mid { color: #fbbf24; }
.sc-stat-large { color: #f87171; }
.sc-stat-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}
.sc-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}
.sc-modal-close:hover {
    color: #fff;
}

/* ── Modal Controls ── */
.sc-modal-controls {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.sc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}
.sc-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 13px;
    pointer-events: none;
}
.sc-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: #f9fafb;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s;
}
.sc-search-input:focus {
    border-color: #4cb354;
}
.sc-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    white-space: nowrap;
}
.sc-filter-group {
    display: flex;
    gap: 4px;
}
.sc-filter-btn {
    padding: 6px 11px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: #f9fafb;
    color: #6b7280;
    transition: all 0.15s;
    white-space: nowrap;
}
.sc-filter-btn:hover {
    border-color: #1f2937;
    color: #1f2937;
}
.sc-filter-btn.active {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}
.sc-filter-btn[data-filter="Mid"].active {
    background: #d97706;
    border-color: #d97706;
}
.sc-filter-btn[data-filter="Large"].active {
    background: #dc2626;
    border-color: #dc2626;
}
.sc-filter-btn[data-filter="Both"].active {
    background: #7c3aed;
    border-color: #7c3aed;
}
.sc-filter-btn[data-rep="Nika Lao"].active {
    background: #6366f1;
    border-color: #6366f1;
}
.sc-filter-btn[data-rep="Taneisha Clark"].active {
    background: #10b981;
    border-color: #10b981;
}
.sc-filter-btn[data-rep="unassigned"].active {
    background: #6b7280;
    border-color: #6b7280;
}
.sc-results-count {
    margin-left: auto;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Modal Body / Table ── */
.sc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sc-table thead th {
    background: #f3f4f6;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.sc-sortable {
    cursor: pointer;
    user-select: none;
}
.sc-sortable:hover {
    color: #1f2937;
}
.sc-sortable.sorted .sc-sort-arrow {
    opacity: 1;
}
.sc-sort-arrow {
    margin-left: 3px;
    opacity: 0.35;
}
.sc-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.1s;
}
.sc-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.sc-table tbody tr:hover {
    background: #f0fdf4;
}
.sc-table td {
    padding: 10px 14px;
    vertical-align: top;
    line-height: 1.4;
}

/* Column styles */
.sc-col-id {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}
.sc-col-company {
    font-weight: 600;
    font-size: 13px;
    min-width: 160px;
}
.sc-col-contact {
    min-width: 140px;
}
.sc-contact-name {
    font-weight: 500;
}
.sc-contact-email {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}
.sc-contact-email a {
    color: #6b7280;
    text-decoration: none;
}
.sc-contact-email a:hover {
    color: #1f2937;
    text-decoration: underline;
}
.sc-contact-phone {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 1px;
}

/* Tier badges */
.sc-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    white-space: nowrap;
}
.sc-tier-mid {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fcd34d;
}
.sc-tier-large {
    background: #fff5f5;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
.sc-tier-both {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

/* Rep chips */
.sc-rep-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.sc-rep-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sc-rep-nika { background: #eef2ff; color: #6366f1; }
.sc-rep-nika .sc-rep-dot { background: #6366f1; }
.sc-rep-taneisha { background: #ecfdf5; color: #10b981; }
.sc-rep-taneisha .sc-rep-dot { background: #10b981; }
.sc-rep-house { color: #6b7280; }
.sc-rep-house .sc-rep-dot { background: #6b7280; }

/* Design details */
.sc-col-designs {
    min-width: 260px;
}
.sc-design-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid #f3f4f6;
}
.sc-design-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sc-design-item:first-child {
    padding-top: 0;
}
.sc-design-name {
    flex: 1;
    font-size: 12px;
    line-height: 1.3;
}
.sc-design-num {
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 3px;
}
.sc-design-meta {
    text-align: right;
    white-space: nowrap;
}
.sc-design-stitches {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #9ca3af;
    display: block;
}
.sc-design-charge {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    display: block;
}
.sc-charge-mid { color: #d97706; }
.sc-charge-large { color: #dc2626; }

/* Empty state */
.sc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.sc-empty-state h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #1f2937;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    @page {
        size: landscape;
        margin: 0.25in;  /* Tighter margins to fit on 1 page */
    }

    /* Hide everything except print container */
    body > *:not(#print-contract-pricing) {
        display: none !important;
    }

    #print-contract-pricing {
        display: block !important;
    }

    /* Print Header */
    .print-header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid #333;
    }

    .print-logo {
        width: 100px;
        height: auto;
    }

    .print-title-block {
        flex: 1;
    }

    .print-title-block h1 {
        font-family: 'Poppins', sans-serif;
        font-size: 18px;
        font-weight: 700;
        color: #333;
        margin: 0 0 2px 0;
    }

    .print-title-block h2 {
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #4cb354;
        margin: 0 0 6px 0;
    }

    .print-title-block p {
        font-size: 11px;
        color: #666;
        margin: 0;
        line-height: 1.4;
    }

    /* Ruthie's contact block (right side of header) */
    .print-contact-block {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        font-size: 10px;
        color: #333;
        line-height: 1.5;
    }

    .print-contact-block strong {
        font-size: 12px;
        color: #333;
    }

    .print-contact-block span {
        color: #666;
    }

    /* Print Tables Row (side by side) */
    .print-tables-row {
        display: flex;
        gap: 12px;
        margin-bottom: 8px;
    }

    .print-table-wrapper {
        flex: 1;
    }

    .print-table-wrapper h3 {
        font-size: 12px;
        font-weight: 600;
        color: #333;
        margin: 0 0 6px 0;
        padding-bottom: 4px;
        border-bottom: 1px solid #ccc;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Part number badge in print table titles */
    .print-part-num {
        font-family: 'Consolas', monospace;
        font-size: 9px;
        font-weight: 500;
        color: #666;
        background: #f0f0f0;
        padding: 2px 6px;
        border-radius: 3px;
        border: 1px solid #ccc;
    }

    /* Print Pricing Tables */
    .print-pricing-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9px;
    }

    .print-pricing-table th,
    .print-pricing-table td {
        padding: 2px 4px;
        text-align: center;
        border: 1px solid #ccc;
    }

    .print-pricing-table th {
        background: #f0f0f0;
        font-weight: 600;
        color: #333;
    }

    .print-pricing-table th:first-child,
    .print-pricing-table td:first-child {
        text-align: left;
        font-weight: 500;
        background: #f8f8f8;
    }

    .print-pricing-table tbody tr:nth-child(even) {
        background: #fafafa;
    }

    /* Rate footer row */
    .print-pricing-table tr.rate-row {
        background: #e8f5e9 !important;
        font-weight: 600;
    }

    .print-pricing-table tr.rate-row td {
        border-top: 2px solid #4cb354;
    }

    /* LTM columns (1-7 and 8-23) - yellow highlight with print-color-adjust */
    .print-pricing-table th.ltm-col,
    .print-pricing-table td.ltm-col {
        background-color: #fef08a !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        border-left: 3px solid #ca8a04 !important;  /* Amber border as visual fallback */
    }

    /* Ensure LTM highlight shows on rate-row too */
    .print-pricing-table tr.rate-row td.ltm-col {
        background-color: #fef08a !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* LTM fee notation styling */
    .print-ltm-note {
        font-size: 9px;
        color: #92400e;
        background: #fef9c3;
        padding: 4px 8px;
        border-radius: 4px;
        margin: 6px 0;
        border-left: 3px solid #fde047;
    }

    .print-ltm-note strong {
        color: #78350f;
    }

    /* Laser Patch Section */
    .print-laser-section {
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px dashed #ccc;
    }

    .print-laser-section h3 {
        font-size: 12px;
        font-weight: 600;
        color: #333;
        margin: 0 0 4px 0;
    }

    .print-laser-section .laser-patch-table {
        max-width: 250px;
    }

    .print-notes {
        font-size: 9px;
        color: #666;
        margin-top: 10px;
        line-height: 1.5;
    }

    /* Print Footer */
    .print-footer {
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px solid #ccc;
        text-align: center;
    }

    .print-footer p {
        font-size: 9px;
        color: #999;
        margin: 0;
    }
}

/* Screen-only styles (hide print elements) */
@media screen {
    .print-only {
        display: none !important;
    }
}

/* ============================================
   ADDITIONAL STITCH CHARGES TAB (es-* prefix)
   ============================================ */

.es-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 24px;
}

.es-header { text-align: center; margin-bottom: 24px; }
.es-header h2 { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.es-header p { font-size: 14px; color: var(--text-secondary); }

/* Part Numbers */
.es-parts { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.es-part {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f1f5f9; border: 1px solid #cbd5e1;
    border-radius: 8px; padding: 8px 16px;
}
.es-part-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; }
.es-part-num { font-size: 15px; font-weight: 700; color: #2d7a35; font-family: 'Arial Narrow', Arial, sans-serif; }
.es-part-desc { font-size: 13px; color: #64748b; }

/* Base Callout */
.es-included {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff; padding: 16px 24px; border-radius: 12px;
    margin-bottom: 24px; font-size: 16px; font-weight: 700;
}
.es-included span { font-weight: 400; font-size: 14px; opacity: 0.85; }

/* Tier Cards */
.es-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 600px) { .es-tiers { grid-template-columns: 1fr; } }

.es-tier {
    background: #ffffff; border: 2px solid #f1f5f9;
    border-radius: 12px; padding: 22px 16px; text-align: center;
}
.es-tier--standard { border-color: var(--primary-color); background: linear-gradient(180deg, var(--primary-light) 0%, #ffffff 40%); }
.es-tier--mid { border-color: #d97706; background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%); }
.es-tier--large { border-color: #dc2626; background: linear-gradient(180deg, #fef2f2 0%, #ffffff 40%); }

.es-tier-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.es-tier--standard .es-tier-label { color: var(--primary-dark); }
.es-tier--mid .es-tier-label { color: #d97706; }
.es-tier--large .es-tier-label { color: #dc2626; }

.es-tier-range { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 12px; }
.es-tier-price { font-size: 36px; font-weight: 700; line-height: 1; margin-bottom: 2px; }
.es-tier--standard .es-tier-price { color: var(--primary-color); }
.es-tier--mid .es-tier-price { color: #d97706; }
.es-tier--large .es-tier-price { color: #dc2626; }
.es-tier-unit { font-size: 12px; color: #64748b; }

/* Full Back Button */
.es-fullback {
    background: #0f172a; border-radius: 12px; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; cursor: pointer;
    transition: background 0.15s;
}
.es-fullback:hover { background: #1e293b; }
.es-fullback-left { display: flex; align-items: center; gap: 12px; }
.es-fullback-text { font-size: 14px; color: rgba(255,255,255,0.7); }
.es-fullback-text strong { color: #ffffff; }
.es-fullback-tag {
    flex-shrink: 0; background: #4cb354; color: #ffffff;
    font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 6px 14px; border-radius: 6px;
    font-family: 'Arial Narrow', Arial, sans-serif;
}
.es-fullback-arrow {
    color: rgba(255,255,255,0.5); font-size: 20px; transition: transform 0.2s;
}
.es-fullback:hover .es-fullback-arrow { transform: translateY(2px); color: #ffffff; }

/* DECG-FB Panel (collapsible) */
.es-fb-panel {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease, margin 0.3s ease;
    margin-top: -24px; margin-bottom: 0;
}
.es-fb-panel.open {
    max-height: 600px;
    margin-top: -12px; margin-bottom: 24px;
}

.es-fb-inner {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 24px;
}

.es-fb-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}

.es-fb-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.es-fb-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.es-fb-meta span {
    font-size: 12px; color: #64748b; background: #f1f5f9;
    padding: 4px 10px; border-radius: 6px;
}
.es-fb-meta strong { color: #334155; }

.es-fb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.es-fb-table thead { background: #0f172a; color: #ffffff; }
.es-fb-table th {
    padding: 10px 12px; font-weight: 600; font-size: 11px;
    letter-spacing: 0.04em; text-transform: uppercase; text-align: center;
}
.es-fb-table th:first-child { text-align: left; }
.es-fb-table td {
    padding: 9px 12px; border-bottom: 1px solid #f1f5f9;
    text-align: center; font-variant-numeric: tabular-nums;
}
.es-fb-table td:first-child { text-align: left; font-weight: 700; color: var(--text-primary); }
.es-fb-table tbody tr:nth-child(even) { background: #f8fafc; }
.es-fb-table tbody tr:last-child td { border-bottom: none; }
.es-fb-table .es-fb-rate-row { background: var(--primary-light) !important; }
.es-fb-table .es-fb-rate-row td {
    font-weight: 700; color: var(--primary-dark); border-top: 2px solid var(--primary-color);
}

.es-fb-ltm {
    margin-top: 12px; font-size: 13px; color: #64748b;
    background: #fffbeb; border: 1px solid #fde68a;
    padding: 10px 16px; border-radius: 8px;
}
.es-fb-ltm strong { color: #d97706; }

/* ============================================
   KEY ACCOUNT SURCHARGE LIST (accordions)
   ============================================ */

/* Section Header */
.es-section-hdr {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.es-section-hdr-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.es-count-badge {
    background: #0f172a; color: #fff; font-size: 12px; font-weight: 600;
    padding: 3px 11px; border-radius: 20px;
}

/* Account Cards */
.es-account-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.es-account-card {
    background: #ffffff; border: 1px solid #e2e8f0;
    border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow-sm); transition: box-shadow 0.2s;
}
.es-account-card:hover { box-shadow: var(--shadow-md); }

.es-account-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; background: #0f172a;
    cursor: pointer; user-select: none; gap: 12px;
}
.es-account-hdr-left { display: flex; align-items: center; gap: 11px; }

.es-acct-num {
    width: 26px; height: 26px; background: rgba(255,255,255,0.15);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.es-acct-name { font-size: 15px; font-weight: 700; color: #fff; }
.es-acct-rep { font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 1px; }

.es-acct-hdr-right { display: flex; align-items: center; gap: 7px; }

.es-tier-pill {
    font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.es-tier-pill--mid { background: #fffbeb; color: #d97706; }
.es-tier-pill--large { background: #fef2f2; color: #dc2626; }

.es-chevron {
    color: rgba(255,255,255,0.4); font-size: 13px;
    transition: transform 0.22s ease; display: inline-block;
}
.es-account-card.open .es-chevron { transform: rotate(180deg); }

/* Design Table (collapsible) */
.es-design-wrap { display: none; overflow-x: auto; }
.es-account-card.open .es-design-wrap { display: block; }

.es-design-table { width: 100%; border-collapse: collapse; }
.es-design-table thead tr { background: #f7f9fc; border-bottom: 2px solid #e2e8f0; }
.es-design-table thead th {
    padding: 9px 14px; font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: #64748b; white-space: nowrap;
}
.es-design-table .th-r { text-align: right; }
.es-design-table .th-c { text-align: center; }

.es-design-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background 0.1s; }
.es-design-table tbody tr:last-child { border-bottom: none; }
.es-design-table tbody tr:hover { background: #f8fafd; }
.es-design-table td { padding: 10px 14px; vertical-align: middle; }
.es-design-table .td-r { text-align: right; }
.es-design-table .td-c { text-align: center; }

.es-d-name { font-weight: 600; color: var(--text-primary); font-size: 13.5px; }
.es-d-note { font-size: 11px; color: #f59e0b; margin-top: 2px; }

.es-d-no { font-family: 'Consolas', monospace; font-size: 13px; font-weight: 500; color: #4cb354; }
.es-d-no.blank { color: #c8d0de; font-style: italic; }
.es-d-ruthie { font-size: 10.5px; color: #f59e0b; margin-top: 2px; font-weight: 500; }

.es-d-stitches { font-variant-numeric: tabular-nums; font-size: 13.5px; }
.es-d-over { font-variant-numeric: tabular-nums; font-size: 13px; color: #64748b; }

.es-part-chip {
    display: inline-block; font-family: 'Consolas', monospace;
    font-size: 12px; font-weight: 500; padding: 3px 9px;
    border-radius: 6px; background: #e8f5e9; color: #2d7a35;
    border: 1px solid #86d98e; white-space: nowrap;
}

.es-charge-val { font-weight: 700; font-size: 14px; }
.es-charge-val--mid { color: #d97706; }
.es-charge-val--large { color: #dc2626; }
