/* ============================================================
   DnnShakerDoorEnquiry Module Styles
   Sydenhams Branding - Responsive & Accessible
   ============================================================

   PUBLIC-FACING FORM STYLES have been moved to the shared
   component library: /Skin/Css/syd-components.css

   This file now contains ONLY:
   - Shaker-specific UI: door layout, SVG preview, info button, modal,
     dimension validation, remove-door link
   - Thank-you panel content refinements
   - Admin grid / detail view styles
   - Accessibility media queries
   ============================================================ */


/* ============================================================
   Door Specification Panel — Info Button
   ============================================================ */

.shaker-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid var(--syd-primary, #0071b9);
    background: #fff;
    color: var(--syd-primary, #0071b9);
    border-radius: 50%;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s, color 0.15s;
}

.shaker-info-btn:hover,
.shaker-info-btn:focus {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    outline: none;
}

.shaker-info-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 113, 185, 0.25);
}


/* ============================================================
   Door Specification Panel — Info Modal
   ============================================================ */

.shaker-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shaker-modal[hidden] {
    display: none;
}

.shaker-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.shaker-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    z-index: 1;
}

.shaker-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: var(--syd-primary, #0071b9);
    color: #fff;
    border-radius: 6px 6px 0 0;
}

.shaker-modal-title {
    margin: 0;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.shaker-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.shaker-modal-close:hover,
.shaker-modal-close:focus {
    color: #fdd;
    outline: none;
}

.shaker-modal-body {
    padding: 18px;
    text-align: center;
}

.shaker-modal-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
}

.shaker-modal-text {
    margin: 0;
    font-size: 14px;
    color: var(--syd-text-body, #424242);
    text-align: left;
    line-height: 1.5;
}


/* ============================================================
   Door Specification Panel — Dimension Validation
   ============================================================ */

.shaker-dim-error {
    display: none;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.3;
}

.shaker-input-error {
    border-color: #d32f2f !important;
    background-color: #fef6f6;
}

.shaker-input-error:focus {
    outline-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}


/* ============================================================
   Door Specification Panel — Layout & SVG Preview
   ============================================================ */

.shaker-door-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.shaker-door-fields {
    flex: 0 1 45%;
    min-width: 280px;
}

.shaker-door-preview {
    flex: 1 1 380px;
    position: sticky;
    top: 20px;
}

.shaker-door-preview-label {
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--syd-primary, #0071b9);
    margin-bottom: 8px;
    text-align: center;
}

.shaker-door-svg-container {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shaker-door-svg {
    width: 100%;
    height: auto;
    max-height: 380px;
}


/* ============================================================
   Remove Door Link
   ============================================================ */

.shaker-remove-door {
    font-size: 13px;
    color: #d32f2f;
    text-decoration: none;
    font-weight: 400;
    margin-left: auto;
}

.shaker-remove-door:hover {
    text-decoration: underline;
}


/* ============================================================
   Thank You Panel — Content Layout
   (outer wrapper uses .syd-thankyou from shared library)
   ============================================================ */

.syd-thankyou .syd-thankyou-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    background: #2e7d32;
    color: #fff;
    font-size: 36px;
    margin: 0 auto 20px;
    display: block;
    text-align: center;
}

.syd-thankyou .syd-thankyou-content {
    text-align: left;
    max-width: 550px;
    margin: 0 auto;
    background: var(--syd-bg-light, #f4f4f4);
    border-radius: 6px;
    padding: 25px;
}

.syd-thankyou .syd-thankyou-content h3 {
    color: var(--syd-primary, #0071b9);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px;
}

.syd-thankyou .syd-thankyou-content p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px;
}


/* ============================================================
   Admin Grid Styles
   ============================================================ */

.shaker-admin-module {
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 15px;
    line-height: 1.5;
    color: var(--syd-text-body, #424242);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.shaker-admin-title {
    color: var(--syd-text-dark, #363e4c);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 20px 0;
}

.shaker-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--syd-bg-light, #f4f4f4);
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.shaker-admin-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 250px;
}

.shaker-admin-search-input {
    max-width: 350px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.shaker-admin-search-input:focus {
    border-color: var(--syd-primary, #0071b9);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 185, 0.15);
}

.shaker-admin-filter-select {
    max-width: 200px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ccc;
    border-radius: 4px;
    appearance: auto;
    cursor: pointer;
}

.shaker-admin-grid-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.shaker-admin-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
}

.shaker-admin-grid-header th {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.shaker-admin-grid-row td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.shaker-admin-grid-alt td {
    background-color: var(--syd-bg-light, #f4f4f4);
}

.shaker-admin-grid-row:hover td {
    background-color: #e8f0f8;
}

.shaker-admin-status-select {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 120px;
}

.shaker-admin-action-link {
    font-size: 13px;
    color: var(--syd-primary, #0071b9);
    text-decoration: none;
    margin-right: 10px;
}

.shaker-admin-action-link:hover {
    text-decoration: underline;
}

.shaker-admin-delete-link {
    color: #d32f2f;
}

/* Paging */
.shaker-admin-paging {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

.shaker-admin-page-info {
    font-size: 13px;
    color: #666;
}

/* Detail View */
.shaker-admin-detail {
    padding: 10px 0;
}

.shaker-admin-detail-title {
    color: var(--syd-text-dark, #363e4c);
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 20px;
    font-weight: 700;
    margin: 20px 0 15px;
}

.shaker-admin-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.shaker-admin-detail-table th,
.shaker-admin-detail-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}

.shaker-admin-detail-table th {
    background: var(--syd-primary, #0071b9);
    color: #fff;
    font-weight: 600;
}

.shaker-admin-detail-label {
    font-weight: 600;
    color: #555;
    width: 200px;
    background: var(--syd-bg-light, #f4f4f4);
}

.shaker-admin-detail-table tr:nth-child(even) td {
    background: #fafafa;
}

.shaker-admin-message {
    display: block;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 15px 0;
    color: #2e7d32;
    font-size: 14px;
}


/* ============================================================
   Responsive — Module-Specific
   ============================================================ */

@media (max-width: 768px) {
    /* Stack door layout vertically on mobile */
    .shaker-door-layout {
        flex-direction: column;
    }

    .shaker-door-preview {
        flex: 1 1 100%;
        position: static;
        order: -1; /* Show preview above fields on mobile */
        max-width: 100%;
    }

    .shaker-door-fields {
        min-width: 100%;
    }

    .shaker-shape-toggle {
        flex-wrap: wrap;
    }

    .shaker-shape-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .shaker-admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shaker-admin-search {
        flex-direction: column;
    }

    .shaker-admin-search-input {
        max-width: 100%;
    }

    .shaker-admin-filter-select {
        max-width: 100%;
    }

    .shaker-admin-paging {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .syd-thankyou .syd-thankyou-content {
        padding: 15px;
    }
}


/* ============================================================
   Accessibility
   ============================================================ */

@media (forced-colors: active) {
    .syd-btn {
        border: 2px solid ButtonText;
    }

    .syd-input:focus {
        outline: 2px solid Highlight;
    }
}

@media (prefers-reduced-motion: reduce) {
    .syd-input,
    .syd-btn,
    .shaker-info-btn {
        transition: none;
    }
}


/* ============================================================
   Door Shape / Rake Fields
   ============================================================ */

.shaker-door-shape-row {
    margin-bottom: 12px;
}

/* Door Shape Toggle Buttons */
.shaker-shape-toggle {
    display: flex;
    gap: 10px;
}

.shaker-shape-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.shaker-shape-btn:hover {
    border-color: var(--syd-primary, #0071b9);
    color: var(--syd-primary, #0071b9);
    background: #f0f7ff;
}

.shaker-shape-btn-active {
    border-color: var(--syd-primary, #0071b9);
    background: #e8f2fc;
    color: var(--syd-primary, #0071b9);
    box-shadow: 0 0 0 1px var(--syd-primary, #0071b9);
}

.shaker-shape-btn svg {
    flex-shrink: 0;
}

.shaker-rake-fields {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.shaker-rake-fields .syd-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.shaker-rake-fields .syd-col-third {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .shaker-rake-fields .syd-form-row {
        flex-direction: column;
        gap: 8px;
    }
}


/* ============================================================
   Settings / Admin Link Styles
   ============================================================ */

.shaker-admin-link {
    float: right;
    margin-top: -30px;
    font-size: 13px;
    text-decoration: none;
}

/* Settings page */
.shaker-settings {
    max-width: 900px;
}

.shaker-settings-intro {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.shaker-settings-saved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.shaker-settings .syd-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.shaker-settings .syd-col-third {
    flex: 1;
    min-width: 0;
}

.shaker-settings .syd-help-text {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.shaker-settings-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Lead time banner on customer form */
.shaker-lead-time-banner {
    background: #e8f4fd;
    border: 1px solid #b3d7f0;
    border-left: 4px solid #0071b9;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 12px 0 8px 0;
    font-size: 15px;
    color: #003366;
    line-height: 1.5;
}
.shaker-lead-time-icon {
    margin-right: 6px;
}

/* Honeypot anti-bot field — hidden from humans */
.shaker-hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Postcode validation message */
.shaker-postcode-message {
    font-size: 13px;
    margin-top: 4px;
}
.shaker-postcode-message.shaker-postcode-ok { color: #27ae60; }
.shaker-postcode-message.shaker-postcode-warn { color: #e67e22; }

@media (max-width: 768px) {
    .shaker-settings .syd-form-row {
        flex-direction: column;
        gap: 8px;
    }
    .shaker-admin-link {
        float: none;
        margin-top: 0;
        display: block;
        text-align: right;
    }
}


/* ============================================================
   Customer-Facing Quote Page (QuoteView.ascx)
   ============================================================ */

.shaker-quote-page {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    color: #333;
}

/* ── Not Found / Expired ──────────────────────────────────── */
.shaker-quote-not-found {
    text-align: center;
    padding: 48px 24px;
    color: #666;
}
.shaker-quote-not-found h2 {
    color: #0071b9;
    margin-bottom: 12px;
}

.shaker-quote-expired-notice {
    margin-bottom: 20px;
}
.shaker-quote-expired-banner {
    background: #fdf2e9;
    border: 1px solid #e67e22;
    border-left: 4px solid #e67e22;
    border-radius: 4px;
    padding: 14px 18px;
    color: #7d4e00;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Header ───────────────────────────────────────────────── */
.shaker-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid #0071b9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.shaker-quote-header-left { flex: 1; }
.shaker-quote-header-right { flex-shrink: 0; padding-top: 2px; }
.shaker-quote-title {
    font-size: 24px;
    font-weight: 700;
    color: #0071b9;
    margin: 0 0 4px;
}
.shaker-quote-ref {
    font-size: 15px;
    color: #555;
}

/* ── Status Badge ─────────────────────────────────────────── */
.shaker-quote-status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.shaker-quote-status-draft      { background: #eee;     color: #666; }
.shaker-quote-status-quoted     { background: #e8f4fd;  color: #0071b9; }
.shaker-quote-status-emailed    { background: #eaf7ea;  color: #27ae60; }
.shaker-quote-status-preordered { background: #fff3e0;  color: #e67e22; }
.shaker-quote-status-confirmed  { background: #e8f5e9;  color: #2e7d32; }
.shaker-quote-status-cancelled  { background: #fce4ec;  color: #c62828; }
.shaker-quote-status-expired    { background: #f5f5f5;  color: #999; }
.shaker-quote-status-ordered    { background: #e0f2f1;  color: #00695c; }

/* ── Meta ─────────────────────────────────────────────────── */
.shaker-quote-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-bottom: 24px;
    font-size: 14px;
}
.shaker-quote-meta-item {
    color: #555;
}
.shaker-quote-meta-label {
    font-weight: 600;
    color: #333;
}

/* ── Sections ─────────────────────────────────────────────── */
.shaker-quote-section {
    margin-bottom: 24px;
}
.shaker-quote-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #0071b9;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dde6ed;
}

/* ── Door Spec Cards ──────────────────────────────────────── */
.shaker-quote-door-card {
    border: 1px solid #dde6ed;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fff;
}
.shaker-quote-door-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f0f6fb;
    border-bottom: 2px solid #b3d7f2;
    font-size: 14px;
    color: #003366;
}
.shaker-quote-door-qty {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}
.shaker-quote-door-body {
    display: flex;
    gap: 20px;
    padding: 14px;
    align-items: flex-start;
}
.shaker-quote-door-preview {
    flex: 0 0 140px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafcfe;
    border: 1px solid #e8eef4;
    border-radius: 4px;
}
.shaker-quote-door-preview svg {
    max-width: 100%;
    max-height: 180px;
}
.shaker-quote-door-specs {
    flex: 1;
    min-width: 0;
}
.shaker-quote-door-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.shaker-quote-door-specs-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.shaker-quote-door-specs-table tr:last-child td {
    border-bottom: none;
}
.shaker-quote-spec-label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    width: 140px;
}

/* ── Delivery Address ─────────────────────────────────────── */
.shaker-quote-delivery-address {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0071b9;
}

/* ── Pricing Table ────────────────────────────────────────── */
.shaker-quote-pricing-table {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    border-collapse: collapse;
    font-size: 15px;
}
.shaker-quote-pricing-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}
.shaker-quote-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.shaker-quote-pricing-subtotal td {
    border-top: 2px solid #dde6ed;
    font-weight: 600;
}
.shaker-quote-pricing-total td {
    border-top: 2px solid #0071b9;
    font-size: 18px;
    color: #0071b9;
    padding-top: 12px;
}

/* ── Delivery TBC Notice ─────────────────────────────────── */
.shaker-quote-tbc {
    color: #b45309;
    font-weight: 600;
    font-style: italic;
}
.shaker-quote-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* ── Action Buttons ───────────────────────────────────────── */
.shaker-quote-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0 16px;
    padding-top: 20px;
    border-top: 1px solid #dde6ed;
}
.shaker-btn-lg {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 700;
}

/* ── Confirmation Messages ────────────────────────────────── */
.shaker-quote-confirmation {
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin: 20px 0;
}
.shaker-quote-confirmation-email {
    background: #eaf7ea;
    border: 1px solid #a3d9a5;
    color: #1b5e20;
}
.shaker-quote-confirmation-preorder {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}
.shaker-quote-email-highlight {
    font-weight: 700;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .shaker-quote-header {
        flex-direction: column;
        gap: 10px;
    }
    .shaker-quote-meta {
        flex-direction: column;
        gap: 4px;
    }
    .shaker-quote-door-body {
        flex-direction: column;
    }
    .shaker-quote-door-preview {
        flex: 0 0 auto;
        width: 100%;
        min-height: 120px;
    }
    .shaker-quote-door-specs-table {
        font-size: 13px;
    }
    .shaker-quote-spec-label {
        width: auto;
    }
    .shaker-quote-pricing-table {
        max-width: 100%;
    }
    .shaker-quote-actions {
        flex-direction: column;
    }
    .shaker-btn-lg {
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   Analytics Dashboard (v01.12.00)
   ============================================================ */

.sdr-analytics {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--syd-font, 'Barlow Condensed', Arial, sans-serif);
    color: #1f2937;
}

/* ── Header + Date Controls ─────────────────────────────────── */
.sdr-analytics-header {
    margin-bottom: 24px;
}

.sdr-date-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.sdr-date-presets {
    display: flex;
    gap: 4px;
}

.sdr-preset-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sdr-preset-btn:hover {
    border-color: #0071b9;
    color: #0071b9;
    background: #f0f7ff;
    text-decoration: none;
}
.sdr-preset-active {
    border-color: #0071b9;
    background: #0071b9;
    color: #fff;
}
.sdr-preset-active:hover {
    background: #005a94;
    color: #fff;
}

.sdr-date-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.sdr-date-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}
.sdr-date-input {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    width: 140px;
}

.sdr-btn {
    display: inline-block;
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sdr-btn-primary {
    background: #0071b9;
    color: #fff;
}
.sdr-btn-primary:hover {
    background: #005a94;
}

/* ── KPI Cards ──────────────────────────────────────────────── */
.sdr-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.sdr-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}
.sdr-kpi-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.sdr-kpi-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 6px;
}
.sdr-kpi-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sdr-kpi-highlight {
    border-left: 4px solid #0071b9;
}
.sdr-kpi-success {
    border-left: 4px solid #059669;
}
.sdr-kpi-success .sdr-kpi-value {
    color: #059669;
}

/* ── Panels ─────────────────────────────────────────────────── */
.sdr-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.sdr-panel-wide {
    width: 100%;
}
.sdr-panel-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #111827;
}
.sdr-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.sdr-panel-header .sdr-panel-title {
    margin-bottom: 0;
}

.sdr-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Status Bars ────────────────────────────────────────────── */
.sdr-status-bars {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sdr-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sdr-status-label {
    width: 90px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: right;
    flex-shrink: 0;
}
.sdr-bar-track {
    flex: 1;
    height: 20px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.sdr-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.sdr-status-count {
    width: 36px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    text-align: right;
    flex-shrink: 0;
}

/* Status bar colours */
.sdr-bar-draft      { background: #9ca3af; }
.sdr-bar-quoted     { background: #3b82f6; }
.sdr-bar-emailed    { background: #8b5cf6; }
.sdr-bar-preordered { background: #f59e0b; }
.sdr-bar-confirmed  { background: #059669; }
.sdr-bar-cancelled  { background: #ef4444; }
.sdr-bar-expired    { background: #d1d5db; }
.sdr-bar-ordered    { background: #009688; }

/* ── Conversion Funnel ──────────────────────────────────────── */
.sdr-funnel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sdr-funnel-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.sdr-funnel-bar {
    height: 32px;
    background: linear-gradient(135deg, #0071b9, #3b82f6);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    transition: width 0.4s ease;
}
.sdr-funnel-count {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.sdr-funnel-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.sdr-funnel-rate {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Trend Chart ────────────────────────────────────────────── */
.sdr-chart-container {
    overflow-x: auto;
}
.sdr-trend-svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}
.sdr-trend-toggle {
    display: flex;
    gap: 4px;
}

/* ── Tables ─────────────────────────────────────────────────── */
.sdr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sdr-table thead th {
    background: #f9fafb;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.sdr-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.sdr-table tbody tr:hover {
    background: #f9fafb;
}
.sdr-cell-mono {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
}
.sdr-cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.sdr-row-urgent {
    background: #fef2f2;
}
.sdr-row-urgent:hover {
    background: #fee2e2 !important;
}
.sdr-text-danger {
    color: #dc2626;
    font-weight: 700;
}

/* ── Status Pills ───────────────────────────────────────────── */
.sdr-status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.sdr-status-draft      { background: #f3f4f6; color: #6b7280; }
.sdr-status-quoted     { background: #dbeafe; color: #1d4ed8; }
.sdr-status-emailed    { background: #ede9fe; color: #6d28d9; }
.sdr-status-preordered { background: #fef3c7; color: #b45309; }
.sdr-status-confirmed  { background: #d1fae5; color: #047857; }
.sdr-status-cancelled  { background: #fee2e2; color: #dc2626; }
.sdr-status-expired    { background: #f3f4f6; color: #9ca3af; }
.sdr-status-ordered    { background: #e0f2f1; color: #00695c; }

/* ── Badge ──────────────────────────────────────────────────── */
.sdr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Empty State ────────────────────────────────────────────── */
.sdr-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ── Quote Detail Panel ────────────────────────────────────── */
.sdr-detail-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}
.sdr-detail-heading {
    font-size: 20px;
    font-weight: 600;
    color: #003366;
    margin: 16px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sdr-detail-ref {
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
}
.sdr-detail-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}
.sdr-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.sdr-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sdr-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sdr-detail-table td,
.sdr-detail-table th {
    padding: 5px 10px;
    text-align: left;
    vertical-align: top;
}
.sdr-detail-table th {
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
}
.sdr-detail-label {
    font-weight: 500;
    color: #6b7280;
    width: 180px;
    white-space: nowrap;
}
.sdr-detail-total td {
    border-top: 2px solid #003366;
    padding-top: 8px;
    font-size: 15px;
}
.sdr-view-link {
    color: #0071b9;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}
.sdr-view-link:hover {
    text-decoration: underline;
    color: #003366;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sdr-two-col {
        grid-template-columns: 1fr;
    }
    .sdr-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sdr-date-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .sdr-date-custom {
        margin-left: 0;
        flex-wrap: wrap;
    }
    .sdr-date-presets {
        flex-wrap: wrap;
    }
    .sdr-table {
        font-size: 12px;
    }
    .sdr-table thead th,
    .sdr-table tbody td {
        padding: 8px 6px;
    }
}
