
:root {
    --navy: #071b33;
    --navy-light: #0d284b;
    --blue: #0c4d88;
    --blue-bright: #0284c7;
    --accent: #10b981;
    --accent-green: #a3e635;
    --orange: #f97316;
    --orange-hover: #ea580c;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-active: #0c4d88;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 14px;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TOP ANNOUNCEMENT BAR */
.top-bar {
    background: var(--navy);
    color: #cbd5e1;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.badge-india {
    background: rgba(255, 153, 51, 0.2);
    color: #ffb74d;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.top-bar a:hover {
    color: #fff;
}

/* MAIN HEADER */
.main-header {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}
.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-box img {
    height: 46px;
    width: auto;
    border-radius: 6px;
}
.logo-text h1 {
    font-size: 22px;
    line-height: 1.1;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.logo-text span {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-bright);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
}
.nav-links a:hover {
    color: var(--blue);
}
.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-whatsapp-header {
    background: #25d366;
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.2s;
}
.btn-whatsapp-header:hover {
    background: #20ba5a;
    transform: translateY(-1px);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #0a3258 100%);
    color: #ffffff;
    padding: 36px 0 42px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero h2 {
    font-size: clamp(26px, 3.6vw, 40px);
    line-height: 1.18;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
}
.hero h2 span {
    color: var(--accent-green);
}
.hero p {
    font-size: 16px;
    color: #cbd5e1;
    max-width: 820px;
    line-height: 1.6;
}
.hero-badges {
    display: flex;
    gap: 20px;
    margin-top: 18px;
    flex-wrap: wrap;
    font-size: 13px;
}
.hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #e2e8f0;
    font-weight: 500;
}
.hero-badges i {
    color: var(--accent-green);
}

/* MAIN LAYOUT (QUOTE ENGINE) */
.quote-section {
    padding: 36px 0 70px;
}
.quote-grid {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 30px;
    align-items: flex-start;
}

/* LEFT COLUMN: SPECS BUILDER */
.spec-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 {
    font-size: 18px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-header .info-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* GERBER UPLOADER BOX */
.upload-zone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s all ease;
    position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--blue);
    background: #f0f7ff;
}
.upload-icon {
    font-size: 36px;
    color: var(--blue);
    margin-bottom: 10px;
}
.upload-zone h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--navy);
}
.upload-zone p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.upload-btn-fake {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-uploaded-info {
    display: none;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 12px 18px;
    border-radius: 8px;
    margin-top: 14px;
    align-items: center;
    justify-content: space-between;
}
.file-uploaded-info .file-name {
    font-weight: 600;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.btn-remove-file {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
}
.cad-support {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.cad-support span {
    font-weight: 600;
    color: var(--navy);
}
.cad-tags {
    display: flex;
    gap: 6px;
}
.cad-tag {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

/* SPECIFICATION ROWS & PILL SELECTORS */
.spec-row {
    margin-bottom: 22px;
}
.spec-row:last-child {
    margin-bottom: 0;
}
.spec-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.spec-label small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pill-btn {
    border: 1px solid var(--border);
    background: #ffffff;
    padding: 9px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: 0.15s all ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    user-select: none;
}
.pill-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.pill-btn.active {
    border-color: var(--border-active);
    background: #f0f7ff;
    color: var(--blue);
    box-shadow: 0 0 0 1px var(--border-active);
}
.pill-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.pill-btn.active .pill-badge {
    background: #dbeafe;
    color: var(--blue);
}

/* DIMENSIONS INPUTS */
.dim-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dim-field {
    position: relative;
    width: 140px;
}
.dim-field input {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    outline: none;
    transition: 0.2s;
}
.dim-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(12, 77, 136, 0.12);
}
.dim-field span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.dim-times {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}
.dim-area-calc {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 6px;
}

/* COLOR DOTS FOR SOLDER MASK */
.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.2);
}
.dot-green { background: #16a34a; }
.dot-black { background: #1e293b; }
.dot-blue  { background: #2563eb; }
.dot-red   { background: #dc2626; }
.dot-white { background: #ffffff; }
.dot-yellow{ background: #eab308; }

/* RIGHT COLUMN: STICKY PRICING SIDEBAR */
.pricing-sidebar {
    position: sticky;
    top: 96px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.pricing-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 18px;
}
.pricing-sidebar-header h3 {
    font-size: 19px;
    color: var(--navy);
}
.live-indicator {
    background: #ecfdf5;
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* PRICING BREAKDOWN ROWS */
.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 18px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
}
.price-row.subtotal {
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    font-weight: 600;
    color: var(--navy);
}
.price-row.total {
    border-top: 2px solid var(--navy);
    padding-top: 14px;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
}
.price-row.total .total-amount {
    color: var(--orange);
    font-size: 26px;
    font-family: 'Outfit', sans-serif;
}

/* TURNAROUND SPEED & SHIPPING SELECTORS */
.sidebar-options-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
}
.sidebar-options-block h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.radio-tile-group {
    display: flex;
    gap: 8px;
}
.radio-tile {
    flex: 1;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}
.radio-tile:hover {
    border-color: #cbd5e1;
}
.radio-tile.active {
    border-color: var(--blue);
    background: #f0f7ff;
}
.radio-tile strong {
    display: block;
    font-size: 13px;
    color: var(--navy);
    line-height: 1.2;
}
.radio-tile span {
    font-size: 11px;
    color: var(--text-muted);
}

/* ACTION BUTTONS */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.btn-primary {
    background: var(--orange);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s all ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}
.btn-primary:hover {
    background: var(--orange-hover);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}
.btn-whatsapp-quote {
    background: #25d366;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.btn-whatsapp-quote:hover {
    background: #20ba5a;
}
.guarantee-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* CAPABILITIES & DRC SECTION */
.section-heading {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 36px;
}
.section-heading h2 {
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 8px;
}
.section-heading p {
    color: var(--text-muted);
    font-size: 16px;
}
.specs-table-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 60px;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.specs-table th, .specs-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.specs-table th {
    background: #f8fafc;
    color: var(--navy);
    font-weight: 700;
}
.specs-table tr:last-child td {
    border-bottom: none;
}
.specs-table td strong {
    color: var(--navy);
}

/* WHY VINCITA SECTION */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 70px;
}
.feature-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: 0.25s;
}
.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.feature-box h3 {
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 8px;
}
.feature-box p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* FAQ SECTION */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 70px;
}
.faq-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}
.faq-item h4 {
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.faq-item h4 i {
    color: var(--blue);
    margin-top: 3px;
}
.faq-item p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 22px;
}

/* FOOTER */
.site-footer {
    background: #020b17;
    color: #94a3b8;
    padding: 60px 0 24px;
    font-size: 14px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 18px;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a:hover {
    color: #ffffff;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
}

/* CHECKOUT MODAL */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 27, 51, 0.75);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
    place-items: center;
    padding: 20px;
}
.modal-backdrop.active {
    display: grid;
}
.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.25s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    background: var(--navy);
    color: #ffffff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 18px;
}
.btn-close-modal {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}
.btn-close-modal:hover {
    opacity: 1;
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group.col-span-2 {
    grid-column: span 2;
}
.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}
.form-group input, .form-group textarea {
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(12, 77, 136, 0.1);
}
.modal-order-summary {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.modal-order-summary h4 {
    font-size: 14px;
    color: var(--navy);
    margin-bottom: 6px;
}
.modal-order-summary p {
    font-size: 13px;
    color: var(--text-muted);
}
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

/* SUCCESS STATE */
.order-success-card {
    display: none;
    text-align: center;
    padding: 30px 10px;
}
.success-icon {
    font-size: 54px;
    color: #10b981;
    margin-bottom: 14px;
}
.order-success-card h3 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 8px;
}
.order-success-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 980px) {
    .quote-grid {
        grid-template-columns: 1fr;
    }
    .pricing-sidebar {
        position: static;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .header-inner {
        height: auto;
        padding: 14px 0;
        flex-direction: column;
        gap: 12px;
    }
    .nav-links {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.col-span-2 {
        grid-column: span 1;
    }
}


/* =========================================================
   GERBER 2D PREVIEW & 3D VIEWER STYLES
   ========================================================= */

/* Inline Preview Card */
.gerber-preview-card {
    display: none;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    margin-top: 14px;
    box-shadow: var(--shadow-sm);
}
.gerber-preview-header {
    background: #f1f5f9;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    border-bottom: 1px solid #e2e8f0;
}
.gerber-filename-tag {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-close-preview {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 2px 6px;
}
.btn-close-preview:hover {
    color: #b91c1c;
}
.preview-board-row {
    padding: 18px 16px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #fafafa;
}
.preview-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.preview-panel-title {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.preview-canvas-wrapper {
    width: 100%;
    aspect-ratio: 1.55 / 1;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.1);
}
.preview-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.preview-card-footer {
    padding: 12px 18px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.board-meta-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--navy);
}
.badge-fr4-pill {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}
.btn-open-viewer {
    background: #ffffff;
    border: 1.5px solid var(--blue);
    color: var(--blue);
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-open-viewer:hover {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(12, 77, 136, 0.25);
}

/* MODAL PCB VIEWER */
.pcb-viewer-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 15, 30, 0.88);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 20px;
}
.pcb-viewer-modal.active {
    display: grid;
}
.pcb-viewer-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 1080px;
    height: 88vh;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    animation: modalSlide 0.22s ease;
}
.viewer-modal-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.viewer-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.viewer-title-box h3 {
    font-size: 19px;
    color: var(--navy);
}
.viewer-powered-by {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-bright);
}
.viewer-tab-nav {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}
.viewer-tab-btn {
    border: none;
    background: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: 0.18s;
}
.viewer-tab-btn:hover {
    color: var(--navy);
}
.viewer-tab-btn.active {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(12, 77, 136, 0.25);
}
.viewer-content-area {
    flex: 1;
    position: relative;
    background: #070d14;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
}

/* 2D Container */
.viewer-2d-canvas-box {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
    background: #e7e9ec; /* Authentic JLCPCB Light Workbench Background */
    cursor: grab;
    user-select: none;
}
.viewer-2d-canvas-box.is-panning {
    cursor: grabbing !important;
}
.viewer-2d-canvas-box.layers-mode {
    background: #000000 !important;
}
.viewer-2d-canvas-box.layers-mode #canvas2dModal {
    background: #000000 !important;
    box-shadow: none !important;
}
.viewer-2d-canvas-box #canvas2dModal {
    width: 1000px;
    height: 660px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    border-radius: 6px;
    display: block;
}
#canvasMeasureOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    pointer-events: none;
}

/* 3D Container */
.viewer-3d-canvas-box {
    flex: 1;
    height: 100%;
    display: none;
    position: relative;
    cursor: grab;
}
.viewer-3d-canvas-box:active {
    cursor: grabbing;
}
.viewer-3d-canvas-box canvas {
    width: 100% !important;
    height: 100% !important;
    outline: none;
}
.viewer-3d-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* JLCPCB-Style Docked Layers Sidebar */
.jlc-layers-sidebar {
    width: 245px;
    height: 100%;
    background: #141414;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 15;
    flex-shrink: 0;
    user-select: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

.jlc-layers-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #181818;
}

.jlc-layers-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jlc-layers-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-jlc-action {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.btn-jlc-action:hover {
    background: rgba(56, 189, 248, 0.15);
}

.jlc-layers-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jlc-layer-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
    gap: 8px;
    border: 1px solid transparent;
}

.jlc-layer-row:hover {
    background: #202020;
}

.jlc-layer-row.selected {
    background: #282828;
    border-color: rgba(255, 255, 255, 0.15);
}

.jlc-layer-num {
    font-family: monospace;
    font-size: 12px;
    color: #71717a;
    width: 14px;
    text-align: right;
    flex-shrink: 0;
}

.jlc-layer-color-box {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.jlc-layer-name {
    flex: 1;
    font-size: 12px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.jlc-layer-row.selected .jlc-layer-name {
    color: #ffffff;
    font-weight: 600;
}

.jlc-layer-row.has-no-data {
    opacity: 0.62;
}

.jlc-layer-row.has-no-data:hover {
    opacity: 0.90;
}

.jlc-layer-badge-empty {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: #71717a;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-jlc-eye.disabled-eye {
    opacity: 0.35;
}

.jlc-layer-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.jlc-layer-radio {
    color: #a1a1aa;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.jlc-layer-radio.active {
    display: flex;
    color: #38bdf8;
}

.jlc-layer-row:hover .jlc-layer-radio {
    display: flex;
}

.btn-jlc-eye {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-jlc-eye:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.btn-jlc-eye.hidden {
    color: #52525b;
    opacity: 0.45;
}

.jlc-layers-footer-tip {
    padding: 8px 12px;
    font-size: 10px;
    color: #71717a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #111111;
    line-height: 1.4;
}

.viewer-jlc-disclaimer {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #71717a;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    text-align: center;
}
.layer-indicator-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* Zoom controls */
.zoom-controls-floating {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    z-index: 10;
}
.zoom-btn {
    background: none;
    border: none;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
}
.zoom-btn:hover {
    background: rgba(255,255,255,0.1);
}
.zoom-display {
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    border-left: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
}

/* =============================================================
   PCB VIEWER TOOLBAR BUTTONS, CALIPER, DRILL GUIDE & DRC BADGE
   ============================================================= */
.btn-tool-viewer {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 6px 13px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.btn-tool-viewer i {
    color: #2563eb;
    font-size: 13px;
    transition: color 0.18s ease;
}
.btn-tool-viewer:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0284c7;
}
.btn-tool-viewer.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.btn-tool-viewer.active i {
    color: #ffffff;
}
.btn-tool-viewer .badge-count {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 2px;
    transition: all 0.18s ease;
}
.btn-tool-viewer.active .badge-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}
.btn-tool-viewer.btn-cad-export {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.btn-tool-viewer.btn-cad-export:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.drc-pill-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.caliper-info-bar {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #38bdf8;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* =============================================================
   COURIER LIVE TRACKING MODAL STYLES
   ============================================================= */
.btn-close-modal-round {
    background: none;
    border: none;
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: 0.15s;
}
.btn-close-modal-round:hover { color: #ffffff; }

.track-modal-card {
    background: #0b1523;
    border: 1px solid #1e3553;
    border-radius: 14px;
    max-width: 680px;
    width: 100%;
    padding: 26px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
}

.track-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.track-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}
.track-search-bar input {
    flex: 1;
    background: #111e30;
    border: 1px solid #1e3553;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    transition: 0.2s;
}
.track-search-bar input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Tracking Stepper */
.tracking-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 28px 10px 24px;
}
.tracking-stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #1e3553;
    z-index: 1;
}
.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 80px;
}
.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #111e30;
    border: 2px solid #1e3553;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin: 0 auto 8px;
    transition: 0.2s;
}
.step-item.active .step-node {
    background: #2563eb;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}
.step-item.completed .step-node {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}
.step-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.3;
}
.step-item.active .step-label {
    color: #38bdf8;
}

/* Destination Hub Card */
.destination-branch-card {
    background: #111e30;
    border: 1px solid #1e3553;
    border-radius: 10px;
    padding: 18px;
    margin-top: 18px;
}
.destination-branch-card h4 {
    font-size: 14px;
    color: #38bdf8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.branch-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.btn-branch-action {
    background: #15263d;
    border: 1px solid #1e3553;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-branch-action:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}
.btn-branch-action.phone:hover {
    border-color: #10b981;
    color: #10b981;
}

/* =============================================================
   DRILL TABLE MODAL STYLES
   ============================================================= */
.drill-modal-card {
    background: #0b1523;
    border: 1px solid #1e3553;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.drill-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #cbd5e1;
}
.drill-report-table th {
    background: #111e30;
    color: #94a3b8;
    text-align: left;
    padding: 9px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #1e3553;
}
.drill-report-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.drill-report-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* =============================================================
   PRINTABLE PROFORMA INVOICE STYLES
   ============================================================= */
.proforma-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    max-width: 780px;
    width: 100%;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
    font-size: 13px;
}
.proforma-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.proforma-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}
.proforma-customer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
    font-size: 12px;
    line-height: 1.6;
}
.proforma-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}
.proforma-table th {
    background: #f1f5f9;
    color: #334155;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    text-transform: uppercase;
}
.proforma-table td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
}
.proforma-tax-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 13px;
}
.proforma-bank-details {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}

@media print {
    body * { visibility: hidden; }
    #proformaInvoiceModal, #proformaInvoiceModal * { visibility: visible; }
    #proformaInvoiceModal {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: #ffffff;
        padding: 0;
        display: block !important;
    }
    .proforma-actions { display: none !important; }
    .proforma-card {
        box-shadow: none;
        max-width: 100%;
        padding: 20px;
    }
}

/* =============================================================
   UNIT TOGGLE PILL & INCH HINTS
   ============================================================= */
.unit-toggle-pill {
    display: inline-flex;
    background: #e2e8f0;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}
.unit-toggle-btn {
    border: none;
    background: transparent;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    color: #64748b;
    cursor: pointer;
    transition: 0.15s;
}
.unit-toggle-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.dim-inch-hint {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-top: 3px;
    display: block;
}

/* =============================================================
   CAD EXPORT MODAL & TILES
   ============================================================= */
.cad-export-card {
    background: #0b1523;
    border: 1px solid #1e3553;
    border-radius: 14px;
    max-width: 820px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
    color: #f8fafc;
}
.cad-eda-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 16px;
}
.cad-eda-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(37,99,235,0.4);
}
.cad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 720px) {
    .cad-grid { grid-template-columns: 1fr; }
}
.cad-tile {
    background: #111e30;
    border: 1px solid #1e3553;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: 0.2s ease;
}
.cad-tile:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.cad-tile-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.cad-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.cad-tile-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}
.cad-tile-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}
.cad-tile-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.cad-tag {
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}
.btn-cad-download {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: 0.18s;
}
.btn-cad-download:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.cad-instructions-box {
    background: #111e30;
    border: 1px solid #1e3553;
    border-radius: 10px;
    padding: 18px;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
}
.cad-instructions-box h4 {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}




/* =============================================================
   UNIVERSAL MODAL OVERLAYS & POPUP DIALOGS (FIXES POSITIONING)
   ============================================================= */
.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    background: rgba(7, 14, 23, 0.88) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display: block"] {
    display: flex !important;
}

.btn-close-modal-round {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.btn-close-modal-round:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.08);
}

/* VIEWER HEADER TOOLBAR (PREVENTS WRAPPING OF CLOSE X BUTTON) */
.viewer-actions-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.viewer-modal-header {
    flex-wrap: nowrap !important;
    gap: 12px;
}
.btn-tool-viewer {
    padding: 6px 11px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
}
.btn-close-preview-modal {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: 0.18s !important;
    flex-shrink: 0 !important;
    margin-left: 6px !important;
}
.btn-close-preview-modal:hover {
    background: #dc2626 !important;
    transform: scale(1.08) !important;
}

/* IN-VIEWER FLOATING DRILL TOOL DRAWER (RIGHT INSIDE GERBER CANVAS) */
.viewer-drill-drawer {
    position: absolute;
    top: 65px;
    right: 18px;
    width: 340px;
    max-height: calc(100% - 90px);
    background: rgba(11, 21, 35, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 120;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: drawerFadeIn 0.2s ease;
}
@keyframes drawerFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.drill-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drill-drawer-header h4 {
    font-size: 13px;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.drill-drawer-header span {
    font-size: 11px;
    color: #94a3b8;
    display: block;
    margin-top: 1px;
}
.btn-open-full-modal {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-open-full-modal:hover {
    background: #0284c7;
    color: #ffffff;
}
.btn-close-drawer {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.btn-close-drawer:hover {
    color: #ef4444;
}
.drill-drawer-body {
    padding: 10px;
    overflow-y: auto;
    max-height: 380px;
    font-size: 12px;
}
.drill-drawer-body::-webkit-scrollbar {
    width: 5px;
}
.drill-drawer-body::-webkit-scrollbar-thumb {
    background: #1e3553;
    border-radius: 4px;
}
.drill-tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: 0.15s;
}
.drill-tool-item:hover, .drill-tool-item.highlighted {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
}
.drill-tool-badge {
    background: #0284c7;
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
}
.drill-tool-dia {
    color: #f8fafc;
    font-weight: 600;
    font-family: monospace;
}
.drill-tool-count {
    color: #a3e635;
    font-weight: 700;
    font-size: 12px;
}

/* =============================================================
   JLCPCB-STYLE HOMEPAGE & MULTI-PAGE STYLES
   ============================================================= */
.nav-links a.active {
    color: var(--blue) !important;
    font-weight: 700;
    position: relative;
}
.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
}

/* JLCPCB HERO SECTION */
.jlc-hero-section {
    background: linear-gradient(135deg, #071b33 0%, #0b345f 60%, #0c4d88 100%);
    color: #ffffff;
    padding: 48px 0 60px;
    position: relative;
    overflow: hidden;
}
.jlc-hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(163, 230, 53, 0.1) 0%, transparent 40%);
    pointer-events: none;
}
.jlc-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.jlc-hero-title {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 14px;
}
.jlc-hero-title span {
    color: #a3e635;
}
.jlc-hero-lead {
    font-size: 17px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 24px;
}
.jlc-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}
.jlc-hero-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f1f5f9;
}
.jlc-hero-badge i {
    color: #a3e635;
}

/* HERO INSTANT QUOTE TEASER CARD (JLCPCB STYLE) */
.jlc-teaser-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.jlc-teaser-card h3 {
    font-size: 20px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.jlc-teaser-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
}
.jlc-teaser-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.jlc-teaser-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
}
.jlc-teaser-field input, .jlc-teaser-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}
.jlc-teaser-dropzone {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 18px;
    cursor: pointer;
    transition: 0.18s;
}
.jlc-teaser-dropzone:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}
.jlc-teaser-dropzone i {
    font-size: 24px;
    color: #2563eb;
    margin-bottom: 6px;
}
.jlc-teaser-dropzone strong {
    display: block;
    font-size: 13px;
    color: #1e3a8a;
}
.jlc-teaser-dropzone span {
    font-size: 11px;
    color: #64748b;
}
.jlc-teaser-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.jlc-teaser-price {
    font-size: 12px;
    color: #64748b;
}
.jlc-teaser-price strong {
    font-size: 24px;
    color: var(--orange);
    display: block;
    line-height: 1;
}

/* 4-STEP MANUFACTURING PROCESS (JLCPCB STYLE) */
.jlc-section {
    padding: 60px 0;
}
.jlc-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 42px;
}
.jlc-section-header h2 {
    font-size: 30px;
    color: var(--navy);
    margin-bottom: 8px;
}
.jlc-section-header p {
    font-size: 15px;
    color: #64748b;
}
.jlc-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.jlc-step-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    position: relative;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}
.jlc-step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--blue-bright);
}
.jlc-step-num {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 28px;
    font-weight: 800;
    color: #e2e8f0;
    font-family: var(--font-head);
}
.jlc-step-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.jlc-step-card h4 {
    font-size: 17px;
    color: var(--navy);
    margin-bottom: 6px;
}
.jlc-step-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* AIRWAYS COURIER HOMEPAGE TRACKING STRIP */
.jlc-courier-strip {
    background: linear-gradient(135deg, #0b1e36 0%, #112a4d 100%);
    border-radius: 16px;
    padding: 32px 36px;
    color: #ffffff;
    margin: 40px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: center;
    box-shadow: 0 12px 30px rgba(7, 27, 51, 0.25);
}
.jlc-courier-strip h3 {
    font-size: 24px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.jlc-courier-strip p {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
}
.jlc-courier-input-box {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.jlc-courier-input-box input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--navy);
    outline: none;
}
.jlc-courier-input-box button {
    background: var(--blue);
    color: #ffffff;
    border: none;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s;
}
.jlc-courier-input-box button:hover {
    background: var(--blue-bright);
}

/* CAPABILITIES MATRIX TABLE (JLCPCB STYLE) */
.jlc-cap-table-wrap {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.jlc-cap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.jlc-cap-table th {
    background: #0f1e33;
    color: #ffffff;
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.jlc-cap-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.jlc-cap-table tr:nth-child(even) td {
    background: #f8fafc;
}
.jlc-cap-table td strong {
    color: var(--navy);
}
.jlc-cap-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

/* SOCIAL MEDIA ICONS */
.top-social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.top-social-icons a {
    color: #cbd5e1;
    font-size: 12px;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.top-social-icons a:hover {
    color: #ffffff;
    background: var(--blue-bright);
    transform: translateY(-1px);
}
.footer-social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.footer-social-icons a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social-icons a:hover {
    background: var(--blue-bright);
    transform: translateY(-2px);
}

/* JLCPCB-STYLE INTERACTIVE HOW TO ORDER VIDEO CARD */
.jlc-video-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 24px 0 36px;
}
.video-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.video-card-top h3 {
    font-size: 18px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.video-steps-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.video-step-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.video-step-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}
.video-screen-stage {
    position: relative;
    background: linear-gradient(135deg, #071324 0%, #0d213a 100%);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: 34px 28px;
    overflow: hidden;
}
.video-stage-slide {
    display: none;
    width: 100%;
    max-width: 960px;
    animation: fadeInSlide 0.3s ease;
}
.video-stage-slide.active {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
}
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.video-slide-mockup {
    flex: 1.2;
    background: #0f1e33;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.3);
}
.video-slide-desc {
    flex: 0.9;
}
.video-slide-desc h4 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 10px;
}
.video-slide-desc p {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 18px;
}
.video-controls-bar {
    background: #071324;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-video-play {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.btn-video-play:hover {
    background: var(--blue-bright);
}
.video-progress-rail {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.video-progress-fill {
    height: 100%;
    width: 0%;
    background: #38bdf8;
    border-radius: 3px;
    transition: width 0.1s linear;
}
.video-time-display {
    font-family: monospace;
    font-size: 13px;
    color: #cbd5e1;
    white-space: nowrap;
}

/* MANUFACTURING SETUP & PROCESS SHOWCASE */
.mfg-setup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 24px;
}
.mfg-setup-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.mfg-setup-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0,0,0,0.12);
    border-color: #0284c7;
}
.mfg-setup-img-box {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0f172a;
}
.mfg-setup-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.mfg-setup-card:hover .mfg-setup-img-box img {
    transform: scale(1.06);
}
.mfg-setup-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    letter-spacing: 0.05em;
}
.mfg-setup-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mfg-setup-body h4 {
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.35;
}
.mfg-setup-body p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
}

/* WHAT OUR CUSTOMERS SAY */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}
.review-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.review-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eff6ff;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    border: 1.5px solid #bfdbfe;
}
.review-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}
.review-user-role {
    font-size: 12px;
    color: #64748b;
}
.review-stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 2px;
}
.review-body {
    font-size: 13px;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 18px;
    flex: 1;
    font-style: italic;
}
.review-footer-tags {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
}
.review-spec-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}
.review-verified {
    color: #16a34a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 992px) {
    .mfg-setup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .video-stage-slide.active {
        flex-direction: column;
    }
    .jlc-hero-grid, .jlc-courier-strip {
        grid-template-columns: 1fr;
    }
    .jlc-steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .mfg-setup-grid {
        grid-template-columns: 1fr;
    }
    .video-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 640px) {
    .jlc-steps-grid {
        grid-template-columns: 1fr;
    }
    .viewer-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .viewer-actions-bar {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
    }
}

/* SIDEBAR INDIA TRUST STRIP */
.sidebar-india-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #071b33 0%, #0d2a4f 100%);
    color: #ffffff;
    padding: 9px 18px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-india-strip span:first-child {
    color: #ffb74d;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-india-strip span:last-child {
    color: #a3e635;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* SIDEBAR PAYMENT & QUALITY TRUST BAR */
.sidebar-payment-trust {
    margin-top: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.pay-trust-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pay-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pay-badge {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    color: #334155;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* DEMO BOARD BUTTON IN DROPZONE */
.demo-board-callout {
    margin-top: 14px;
    font-size: 12.5px;
    color: #64748b;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.btn-demo-trigger {
    background: #0284c7;
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-demo-trigger:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

/* POLISHED PILL BUTTONS & CONTRAST */
.pill-btn {
    transition: all 0.18s ease;
}
.pill-btn:hover:not(.active) {
    border-color: #94a3b8;
    background: #ffffff;
}
.pill-btn.active {
    background: #eff6ff;
    border-color: #0284c7;
    color: #0369a1;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.15);
}

/* =============================================================
   17. DAILY CUT-OFF DISPATCH CLOCK (11:00 AM CUT-OFF)
   ============================================================= */
.cutoff-clock-card {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
}
.cutoff-clock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cutoff-clock-title {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cutoff-clock-badge {
    background: #dc2626;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: cutoffPulse 2s infinite ease-in-out;
}
@keyframes cutoffPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.96); }
}
.cutoff-countdown-val {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #78350f;
    line-height: 1.3;
}
.cutoff-countdown-val strong {
    color: #b45309;
    font-weight: 900;
}
.cutoff-clock-sub {
    font-size: 11px;
    color: #a16207;
    margin-top: 3px;
    line-height: 1.35;
}
.cutoff-topbar-badge {
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fef08a;
    font-size: 11.5px;
    padding: 2px 10px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* =============================================================
   18. PRE-FLIGHT SPECS STRIP & IPC DFM BANNER (MESSHPCB BENCHMARK)
   ============================================================= */
.gerber-analysis-box {
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.gerber-specs-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
@media (max-width: 768px) {
    .gerber-specs-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .gerber-specs-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}
.gerber-spec-cell {
    padding: 10px 12px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.gerber-spec-cell:last-child {
    border-right: none;
}
.gerber-spec-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.gerber-spec-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
}
.gerber-spec-val.val-bad {
    color: #dc2626 !important;
}
.gerber-spec-val.val-warn {
    color: #d97706 !important;
}

.gerber-layers-strip {
    padding: 8px 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}
.gerber-layer-chip {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: 700;
}
.gerber-layer-chip.chip-drill {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.ipc-review-banner {
    padding: 12px 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ipc-review-info {
    min-width: 220px;
}
.ipc-review-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ipc-review-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 1px;
}
.ipc-review-badges {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.dfm-badge-pill {
    padding: 2px 10px;
    border-radius: 14px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dfm-badge-pill.pill-err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.dfm-badge-pill.pill-wrn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.dfm-badge-pill.pill-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.dfm-badge-pill.pill-ok {
    background: #ecfdf3;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.btn-check-dfm {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-check-dfm:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(2, 132, 199, 0.45);
}

/* =============================================================
   19. DFM DESIGN REVIEW POPUP MODAL (NUMBERED PINS & ZOOM)
   ============================================================= */
.dfm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.dfm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.dfm-modal-container {
    background: #ffffff;
    border-radius: 16px;
    max-width: 980px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    animation: dfmModalPop 0.25s ease-out;
}
@keyframes dfmModalPop {
    0% { transform: scale(0.96) translateY(8px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.dfm-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    flex-wrap: wrap;
}
.dfm-score-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 4px solid #15803d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dfm-score-num {
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
}
.dfm-score-grade {
    font-size: 9.5px;
    font-weight: 800;
}
.dfm-modal-title {
    font-weight: 800;
    font-size: 17px;
    color: #0f172a;
}
.dfm-modal-sub {
    font-size: 12.5px;
    color: #64748b;
}

.dfm-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

.dfm-preview-stage-wrap {
    margin-bottom: 16px;
}
.dfm-stage-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.dfm-stage-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}
.dfm-stage-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}
.dfm-side-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 13px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dfm-side-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.dfm-zoom-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 28px;
    height: 27px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dfm-zoom-btn:hover {
    background: #f1f5f9;
}

.dfm-canvas-stage {
    background: #111827;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    touch-action: none;
    max-width: 580px;
    margin: 0 auto;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
    user-select: none;
}
.dfm-zoom-wrap {
    position: relative;
    transform-origin: 0 0;
    will-change: transform;
}
.dfm-canvas-stage canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Numbered Pins */
.dfm-ipc-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s ease;
}
.dfm-ipc-marker:hover {
    transform: translate(-50%, -50%) scale(1.25) !important;
    z-index: 20;
}
.dfm-ipc-marker.marker-err {
    background: rgba(220, 38, 38, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.35);
}
.dfm-ipc-marker.marker-wrn {
    background: rgba(245, 158, 11, 0.95);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}
.dfm-ipc-marker.marker-info {
    background: rgba(37, 99, 235, 0.95);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Radar spotlight ring animation */
.dfm-spotlight-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150%;
    height: 150%;
    border: 3px solid #ff2d20;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: dfmSpotlight 0.85s ease-out 3;
    pointer-events: none;
}
@keyframes dfmSpotlight {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

/* Issue list */
.dfm-issues-group-title {
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dfm-issue-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
}
.dfm-issue-item.clickable {
    cursor: pointer;
}
.dfm-issue-item:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.dfm-issue-item.item-err {
    border-color: #fecaca;
    border-left-color: #dc2626;
    background: #fff9f9;
}
.dfm-issue-item.item-wrn {
    border-color: #fde68a;
    border-left-color: #f59e0b;
    background: #fffdf5;
}
.dfm-issue-item.item-info {
    border-color: #bfdbfe;
    border-left-color: #2563eb;
    background: #f8fbff;
}
.dfm-issue-pin-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dfm-issue-pin-badge.bg-err { background: #dc2626; }
.dfm-issue-pin-badge.bg-wrn { background: #f59e0b; }
.dfm-issue-pin-badge.bg-info { background: #2563eb; }

.dfm-issue-header {
    font-weight: 700;
    font-size: 13.5px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.dfm-issue-tag {
    font-weight: 600;
    font-size: 11px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 1px 8px;
}
.dfm-issue-tag.tag-side {
    background: #ecfdf3;
    color: #15803d;
}
.dfm-issue-msg {
    font-size: 13px;
    color: #475569;
    margin-top: 3px;
    line-height: 1.5;
}
.dfm-show-preview-btn {
    font-size: 12px;
    color: #0284c7;
    font-weight: 700;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dfm-show-preview-btn:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════
   JLCPCB / EASYEDA STYLE VIEWER HEADER, MODE BAR & SHORTCUTS MODAL
   ══════════════════════════════════════════════════════════════════ */
.viewer-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.viewer-header-left h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    margin: 0;
    letter-spacing: -0.01em;
}

/* 4-Mode Switcher: Gerber | Wireframe | 2D | 3D */
.viewer-mode-bar {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.viewer-mode-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.viewer-mode-btn:hover {
    color: var(--navy);
    background: rgba(255, 255, 255, 0.6);
}
.viewer-mode-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
}

/* Layer Switcher: Top layer | Bottom layer */
.viewer-layer-bar {
    display: flex;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.viewer-layer-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.viewer-layer-btn:hover {
    color: var(--navy);
}
.viewer-layer-btn.active {
    background: #0f172a;
    color: #ffffff;
}

/* Modern Icon Toolbar Buttons */
.btn-icon-tool {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.18s ease;
}
.btn-icon-tool:hover {
    background: #f1f5f9;
    color: #0284c7;
    border-color: #94a3b8;
}
.btn-icon-tool.active {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #38bdf8;
}

/* Shortcut Settings Dialog Modal */
.viewer-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99995;
    display: none;
    place-items: center;
    padding: 16px;
}
.viewer-settings-overlay.active {
    display: grid;
}
.viewer-settings-dialog {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    animation: dfmModalPop 0.22s ease-out;
}
.viewer-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
.viewer-settings-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.viewer-settings-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 380px;
}
.viewer-settings-sidebar {
    width: 180px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 12px;
}
.settings-nav-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.settings-nav-item.active {
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
}
.viewer-settings-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #ffffff;
}
.shortcuts-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}
.shortcuts-table th {
    background: #f8fafc;
    padding: 9px 12px;
    color: #475569;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}
.shortcuts-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.shortcuts-table tr:last-child td {
    border-bottom: none;
}
.shortcuts-table tr:hover td {
    background: #f8fafc;
}
.shortcuts-table kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 7px;
    font-family: monospace;
    font-size: 11.5px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}
.viewer-settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}
.btn-settings-reset {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-settings-reset:hover {
    background: #f1f5f9;
}
.btn-settings-apply {
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-settings-apply:hover {
    background: #0369a1;
}
.btn-settings-confirm {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-settings-confirm:hover {
    background: #1e293b;
}
.btn-settings-cancel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.btn-settings-cancel:hover {
    background: #f1f5f9;
}



