/* BS Customer Portal — frontend.
   Corporate visual language: white cards, hairline borders, generous spacing,
   sky accent (#0284c7), uppercase kickers, neutral SVG line icons. */

:root {
    --bscp-accent: #0284c7;
    --bscp-accent-dark: #075985;
    --bscp-ink: #111827;
    --bscp-body: #374151;
    --bscp-muted: #6b7280;
    --bscp-line: #e5e7eb;
    --bscp-bg-soft: #f8fafc;
    --bscp-radius: 10px;
    --bscp-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* ================= My Account frame (whole account area) ================= */

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #fff;
    border: 1px solid var(--bscp-line);
    border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow);
    padding: 10px 0 14px;
}
.woocommerce-account .woocommerce-MyAccount-navigation::before {
    content: "My Account";
    display: block;
    padding: 12px 20px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bscp-muted);
    border-bottom: 1px solid var(--bscp-line);
    margin-bottom: 6px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
    padding: 0;
    border: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--bscp-body);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--bscp-bg-soft);
    color: var(--bscp-accent-dark);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #f0f9ff;
    color: var(--bscp-accent-dark);
    border-left-color: var(--bscp-accent);
    font-weight: 600;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 8px;
    border-top: 1px solid var(--bscp-line);
    padding-top: 8px;
}

.woocommerce-account .woocommerce-MyAccount-content {
    color: var(--bscp-body);
    font-size: 14.5px;
    line-height: 1.6;
}
.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
    color: var(--bscp-ink);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
    color: var(--bscp-muted);
}

/* Unify WooCommerce tables in the account area (orders, downloads, ...) */
.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
    border: 1px solid var(--bscp-line);
    border-radius: var(--bscp-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: var(--bscp-shadow);
    background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-content table.shop_table th {
    background: var(--bscp-bg-soft);
    color: var(--bscp-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bscp-line);
}
.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    border-top: 0;
}
.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr:last-child td {
    border-bottom: 0;
}

/* Unify buttons inside the account content */
.woocommerce-account .woocommerce-MyAccount-content .button,
.bscp-button, a.bscp-button, button.bscp-button {
    background: var(--bscp-accent) !important;
    color: #fff !important;
    border: 1px solid var(--bscp-accent) !important;
    border-radius: 8px !important;
    padding: 9px 16px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: none !important;
    display: inline-block;
    transition: background .12s ease;
}
.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.bscp-button:hover, a.bscp-button:hover, button.bscp-button:hover {
    background: var(--bscp-accent-dark) !important;
    border-color: var(--bscp-accent-dark) !important;
}
.bscp-button-outline, a.bscp-button-outline {
    background: #fff !important;
    color: var(--bscp-accent-dark) !important;
    border: 1px solid #bae6fd !important;
    border-radius: 8px !important;
    padding: 9px 16px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    display: inline-block;
    transition: background .12s ease;
}
.bscp-button-outline:hover, a.bscp-button-outline:hover { background: #f0f9ff !important; }
.bscp-btn-sm { padding: 7px 12px !important; font-size: 12.5px !important; }

/* Inputs inside account content */
.woocommerce-account .woocommerce-MyAccount-content input[type="text"],
.woocommerce-account .woocommerce-MyAccount-content input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content input[type="date"],
.woocommerce-account .woocommerce-MyAccount-content input[type="search"],
.woocommerce-account .woocommerce-MyAccount-content select,
.woocommerce-account .woocommerce-MyAccount-content textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    background: #fff;
    color: var(--bscp-ink);
}
.woocommerce-account .woocommerce-MyAccount-content input:focus,
.woocommerce-account .woocommerce-MyAccount-content select:focus,
.woocommerce-account .woocommerce-MyAccount-content textarea:focus {
    border-color: var(--bscp-accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    outline: none;
}

/* ================= Polish: numbers, focus, motion ================= */

.bscp-table td, .bscp-detail-table td, .bscp-orders-table td, .bscp-invoices-table td, .bscp-quotes-table td {
    font-variant-numeric: tabular-nums;
}
.woocommerce-account .woocommerce-MyAccount-content a:focus-visible,
.woocommerce-account .woocommerce-MyAccount-content button:focus-visible,
.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
    outline: 2px solid var(--bscp-accent);
    outline-offset: 2px;
    border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
    .woocommerce-account .woocommerce-MyAccount-content *,
    .woocommerce-account .woocommerce-MyAccount-navigation * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ================= Public report-issue form ================= */

/* The public form is a standalone page, not a panel inside the account area, so it
   centres on the page instead of hugging the left edge the way .bscp-form does
   inside My Account. Without the auto margins the card sat left of centre under a
   centred heading. */
.bscp-report-issue .bscp-form { max-width: 760px; margin-left: auto; margin-right: auto; }
.bscp-wf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .bscp-wf-grid { grid-template-columns: 1fr; } }
.bscp-wf-form input[type="text"], .bscp-wf-form input[type="email"], .bscp-wf-form input[type="tel"],
.bscp-wf-form input[type="date"], .bscp-wf-form select, .bscp-wf-form textarea { max-width: 100%; width: 100%; }
.bscp-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* Machine location: grouped so the four parts read as one address block. */
.bscp-wf-location { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px 4px; margin: 0 0 18px; }
.bscp-wf-location > legend { font-weight: 600; font-size: 14px; padding: 0 6px; color: #0f3d5c; }
.bscp-wf-location > .bscp-hint { display: block; margin: 0 0 12px; }

/* ================= Notices ================= */

.bscp-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.bscp-notice-success { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.bscp-notice-error { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }

/* ================= Dashboard summary ================= */

.bscp-dash { margin: 4px 0 28px; }
.bscp-dash-head { margin-bottom: 14px; }
.bscp-dash-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bscp-accent);
}
.bscp-dash-title { margin: 2px 0 0; font-size: 20px; font-weight: 600; color: var(--bscp-ink); }
.bscp-dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.bscp-dash-card {
    position: relative;
    display: flex; flex-direction: column; gap: 2px;
    background: #fff;
    border: 1px solid var(--bscp-line);
    border-radius: var(--bscp-radius);
    padding: 18px 18px 16px;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: var(--bscp-shadow);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.bscp-dash-card:hover { box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08); border-color: #bae6fd; }
.bscp-dash-icon {
    height: 38px; width: 38px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f9ff; color: var(--bscp-accent);
    border-radius: 9px;
    margin-bottom: 10px;
}
.bscp-dash-icon svg { height: 20px; width: 20px; }
.bscp-dash-num { font-size: 28px; font-weight: 700; color: var(--bscp-ink); line-height: 1.1; }
.bscp-dash-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bscp-muted); }
.bscp-dash-sub { font-size: 12px; color: #b45309; margin-top: 4px; }
/* Dashboard action inbox (#4) */
.bscp-dash-inbox {
    background: #fff; border: 1px solid var(--bscp-line); border-left: 3px solid var(--bscp-accent);
    border-radius: var(--bscp-radius); box-shadow: var(--bscp-shadow);
    padding: 14px 18px; margin-bottom: 16px;
}
.bscp-dash-inbox-title { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--bscp-muted); margin-bottom: 8px; }
.bscp-dash-inbox ul { list-style: none; margin: 0; padding: 0; }
.bscp-dash-inbox li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.bscp-dash-inbox li:last-child { border-bottom: 0; }
.bscp-dash-inbox a { color: var(--bscp-body); text-decoration: none; font-weight: 500; }
.bscp-dash-inbox a:hover { color: var(--bscp-accent-dark); }
.bscp-action-icon {
    height: 26px; width: 26px; flex: 0 0 26px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f0f9ff; color: var(--bscp-accent);
}
.bscp-action-icon svg { height: 14px; width: 14px; }
.bscp-action-urgent .bscp-action-icon { background: #fffbeb; color: #b45309; }
.bscp-action-urgent a { font-weight: 600; }
.bscp-dash-allgood { display: flex; align-items: center; gap: 10px; color: #166534; margin: 0 0 16px; }
.bscp-dash-allgood .bscp-action-icon { background: #f0fdf4; color: #16a34a; }

.bscp-dash-alerts {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--bscp-radius);
    padding: 14px 18px; margin-top: 14px; color: #78350f;
}
.bscp-dash-alerts strong { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.bscp-dash-alerts ul { margin: 8px 0 0 18px; }
.bscp-dash-alerts a { color: #92400e; }
.bscp-dash-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.bscp-basket-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
    border-radius: 999px; background: var(--bscp-accent); color: #fff;
    font-size: 11px; font-weight: 700;
}

/* Machine spotlight on the dashboard */
.bscp-spotlight {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow); padding: 16px 18px; margin-top: 14px;
}
.bscp-spotlight-photo {
    height: 84px; width: 84px; flex: 0 0 84px; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--bscp-line); background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.bscp-spotlight-photo img { height: 100%; width: 100%; object-fit: contain; }
.bscp-spotlight-main { flex: 1; min-width: 220px; }
.bscp-spotlight-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .bscp-spotlight-actions { flex-direction: row; flex-wrap: wrap; } }

/* Current promotions (WC sale products; scroll-snap row, no JS) */
.bscp-promos { margin-top: 16px; }
.bscp-promos-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.bscp-promos-head strong { font-size: 14px; color: var(--bscp-ink); }
.bscp-promo-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: 180px;
    gap: 12px; overflow-x: auto; padding-bottom: 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.bscp-promo-card {
    scroll-snap-align: start;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow); padding: 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.bscp-promo-img { display: block; height: 110px; border-radius: 8px; overflow: hidden; background: var(--bscp-bg-soft); }
.bscp-promo-img img { height: 100%; width: 100%; object-fit: contain; }
.bscp-promo-name {
    font-weight: 600; font-size: 13px; color: var(--bscp-ink) !important; text-decoration: none !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 34px;
}
.bscp-promo-price { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bscp-promo-price del { color: var(--bscp-muted); margin-right: 6px; }
.bscp-promo-price ins { text-decoration: none; font-weight: 700; color: #b91c1c; }
.bscp-promo-actions { display: flex; gap: 6px; margin-top: auto; }
.bscp-promo-actions .bscp-btn-sm { flex: 1; text-align: center; }

/* Documents library filters */
.bscp-doc-filters {
    display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow); padding: 14px 16px; margin-bottom: 18px;
}
.bscp-doc-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--bscp-muted); }
.bscp-doc-filters select { min-width: 150px; }

/* My Account nav icons */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    content: ""; display: inline-block; vertical-align: -3px;
    height: 16px; width: 16px; margin-right: 9px;
    background-color: currentColor;
    -webkit-mask: var(--bscp-nav-icon) no-repeat center / contain;
    mask: var(--bscp-nav-icon) no-repeat center / contain;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="12" r="3.5"/></svg>'); }
.woocommerce-MyAccount-navigation-link--dashboard a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M3 10.5L12 3l9 7.5"/><path d="M5 9.5V21h14V9.5"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--orders-offers a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M6 6h15l-1.5 9H7.5L6 6z"/><path d="M6 6L5 3H2"/><circle cx="9" cy="20" r="1.5"/><circle cx="18" cy="20" r="1.5"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--my-machines a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><rect x="3" y="7" width="18" height="12" rx="2"/><path d="M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><path d="M3 13h18"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--service-requests a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M14.7 6.3a4.5 4.5 0 0 0-6 5.6L3 17.6V21h3.4l5.7-5.7a4.5 4.5 0 0 0 5.6-6l-3 3-2.8-.7-.7-2.8 3.5-2.5z"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--documents a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M6 3h9l5 5v13H6z"/><path d="M14 3v6h6"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--company-users a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--downloads a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M12 4v12M6 12l6 6 6-6"/><path d="M4 21h16"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--edit-address a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M21 10c0 7-9 12-9 12S3 17 3 10a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--edit-account a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 21v-1a7 7 0 0 1 16 0v1"/></svg>') !important; }
.woocommerce-MyAccount-navigation-link--customer-logout a { --bscp-nav-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><path d="M16 17l5-5-5-5"/><path d="M21 12H9"/></svg>') !important; }

/* ================= Toolbar + search ================= */

.bscp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.bscp-search-wrap { display: inline-flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }
.bscp-search { min-width: 280px; max-width: 100%; }
.bscp-muted { color: var(--bscp-muted); }
.bscp-hint { display: block; font-size: 0.85em; color: var(--bscp-muted); margin-top: 4px; }
.bscp-empty { background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius); padding: 28px; box-shadow: var(--bscp-shadow); }
.bscp-empty-rich { text-align: center; padding: 44px 28px; }
.bscp-empty-rich h4 { margin: 0 0 6px; font-size: 17px; color: var(--bscp-ink); }
.bscp-empty-rich p { max-width: 460px; margin-left: auto; margin-right: auto; }
.bscp-empty-icon {
    display: inline-flex; align-items: center; justify-content: center;
    height: 56px; width: 56px; border-radius: 14px;
    background: #f0f9ff; color: var(--bscp-accent); margin-bottom: 14px;
}
.bscp-empty-icon svg { height: 28px; width: 28px; }

/* ================= Machine rows ================= */

.bscp-machine-rows { display: flex; flex-direction: column; gap: 12px; }
.bscp-machine-row {
    display: flex; align-items: center; gap: 16px;
    background: #fff; border: 1px solid var(--bscp-line);
    border-radius: var(--bscp-radius); padding: 16px 18px;
    box-shadow: var(--bscp-shadow);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.bscp-machine-row:hover { box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08); }
.bscp-machine-icon {
    height: 52px; width: 52px; flex: 0 0 52px;
    background: #f0f9ff; color: var(--bscp-accent);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.bscp-machine-icon svg { height: 24px; width: 24px; }
.bscp-machine-photo { background: #fff; border: 1px solid var(--bscp-line); overflow: hidden; }
.bscp-machine-photo img { height: 100%; width: 100%; object-fit: contain; }

/* Machine detail hero */
.bscp-machine-hero { display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; }
.bscp-machine-hero-photo {
    height: 96px; width: 96px; flex: 0 0 96px;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: 12px;
    overflow: hidden; box-shadow: var(--bscp-shadow);
    display: flex; align-items: center; justify-content: center;
}
.bscp-machine-hero-photo img { height: 100%; width: 100%; object-fit: contain; }
.bscp-machine-hero-main h3 { margin: 0 0 4px; }
.bscp-machine-hero-main p { margin: 0; }

/* ================= Machine Workspace: quick actions ================= */

.bscp-machine-hero-status { margin: 8px 0 6px; }

.bscp-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 14px 0 20px;
}
.bscp-qa {
    display: flex; align-items: center; gap: 10px;
    min-height: 52px; padding: 10px 14px;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow);
    color: var(--bscp-ink) !important; font-weight: 600; font-size: 13.5px;
    text-decoration: none !important;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.bscp-qa:hover { border-color: #bae6fd; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.bscp-qa-icon {
    height: 32px; width: 32px; flex: 0 0 32px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f9ff; color: var(--bscp-accent); border-radius: 8px;
}
.bscp-qa-icon svg { height: 18px; width: 18px; }
.bscp-qa-attention { border-color: #fde68a; background: #fffbeb; }
.bscp-qa-attention .bscp-qa-icon { background: #fef3c7; color: #b45309; }

.bscp-machine-details { margin: 0 0 20px; }
.bscp-machine-details summary {
    cursor: pointer; font-weight: 600; font-size: 13px; color: var(--bscp-muted);
    padding: 8px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
.bscp-machine-details summary::-webkit-details-marker { display: none; }
.bscp-machine-details summary::after { content: "▾"; font-size: 11px; }
.bscp-machine-details[open] summary::after { content: "▴"; }
.bscp-machine-details .bscp-detail-table { margin-top: 8px; margin-bottom: 8px; }

/* Anchored sections shouldn't hide under anything when jumped to */
#bscp-docs, #bscp-kb, #bscp-service { scroll-margin-top: 90px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ================= Mobile / warehouse ergonomics ================= */

.bscp-sticky-action { margin-top: 16px; }
@media (max-width: 640px) {
    /* one-hand reach: primary action pinned to the bottom */
    .bscp-workspace { padding-bottom: 74px; }
    .bscp-workspace .bscp-sticky-action {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.96);
        border-top: 1px solid var(--bscp-line);
        backdrop-filter: blur(6px);
    }
    .bscp-workspace .bscp-sticky-action .bscp-button { display: block; text-align: center; width: 100%; }

    /* glove-friendly targets */
    .woocommerce-account .woocommerce-MyAccount-content .button,
    .bscp-button, .bscp-button-outline, .bscp-qa {
        min-height: 48px !important;
        font-size: 15px !important;
    }
    .bscp-btn-sm { min-height: 44px !important; }
    .bscp-quick-actions { grid-template-columns: 1fr 1fr; }
    .bscp-machine-hero { align-items: flex-start; }
    .bscp-machine-hero-photo { height: 72px; width: 72px; flex-basis: 72px; }
    .woocommerce-account .woocommerce-MyAccount-content { font-size: 15.5px; }
    .woocommerce-account .woocommerce-MyAccount-navigation ul li a { padding: 13px 20px; }
}

/* Warranty progress */
.bscp-warranty-progress { margin-top: 8px; max-width: 320px; }
.bscp-warranty-track { height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.bscp-warranty-fill { height: 100%; border-radius: 999px; background: #16a34a; transition: width .3s ease; }
.bscp-warranty-ending .bscp-warranty-fill { background: #d97706; }
.bscp-warranty-expired .bscp-warranty-fill { background: #9ca3af; }
.bscp-warranty-label { display: block; margin-top: 5px; font-size: 12.5px; color: var(--bscp-muted); }
.bscp-warranty-ending .bscp-warranty-label { color: #92400e; font-weight: 600; }
.bscp-machine-main { flex: 1; min-width: 0; }
.bscp-machine-title { font-weight: 600; font-size: 15.5px; color: var(--bscp-ink); text-decoration: none; }
.bscp-machine-title:hover { color: var(--bscp-accent-dark); }
.bscp-machine-meta { color: var(--bscp-muted); font-size: 13px; margin-top: 3px; }
.bscp-machine-status { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bscp-machine-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 640px) {
    .bscp-machine-row { flex-direction: column; align-items: flex-start; }
    .bscp-machine-actions { flex-direction: row; }
}
.bscp-rejection { font-size: 0.9em; color: #b91c1c; }

/* ================= Status badges ================= */

.bscp-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
    border: 1px solid;
}
.bscp-badge svg { height: 12px; width: 12px; flex: 0 0 12px; }
.bscp-badge-pending { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.bscp-badge-approved { background: #f0fdf4; color: #166534; border-color: #86efac; }
.bscp-badge-expired { background: #f9fafb; color: #4b5563; border-color: #d1d5db; }
.bscp-badge-rejected, .bscp-badge-revoked { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.bscp-badge-ticket-new { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.bscp-badge-ticket-in_progress { background: #f0f9ff; color: #075985; border-color: #7dd3fc; }
.bscp-badge-ticket-waiting_customer { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.bscp-badge-ticket-resolved, .bscp-badge-ticket-closed { background: #f0fdf4; color: #166534; border-color: #86efac; }

/* ================= Forms ================= */

.bscp-form { background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius); padding: 22px 24px; box-shadow: var(--bscp-shadow); max-width: 640px; }
.bscp-form .bscp-field { margin-bottom: 18px; }
.bscp-form label { display: block; font-weight: 600; font-size: 13px; color: var(--bscp-ink); margin-bottom: 5px; }
.bscp-form input[type="text"], .bscp-form input[type="date"], .bscp-form select, .bscp-form textarea { width: 100%; max-width: 480px; }
.bscp-form .required { color: #dc2626; }
.bscp-actions { margin-top: 22px; }
.bscp-cancel { margin-left: 12px; color: var(--bscp-muted); }

/* ================= Detail table ================= */

.bscp-detail-table {
    width: 100%; max-width: 600px; border-collapse: separate; border-spacing: 0;
    margin-bottom: 24px; background: #fff; border: 1px solid var(--bscp-line);
    border-radius: var(--bscp-radius); overflow: hidden; box-shadow: var(--bscp-shadow);
}
.bscp-detail-table th, .bscp-detail-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid #f3f4f6; }
.bscp-detail-table tr:last-child th, .bscp-detail-table tr:last-child td { border-bottom: 0; }
.bscp-detail-table th {
    width: 40%; color: var(--bscp-muted); background: var(--bscp-bg-soft);
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ================= Documents (#8: typed cards) ================= */

.bscp-doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 8px; }
.bscp-doc-card {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    box-shadow: var(--bscp-shadow); padding: 12px 14px;
    text-decoration: none !important; color: inherit !important;
    transition: border-color .12s ease, box-shadow .12s ease;
    min-height: 52px;
}
.bscp-doc-card:hover { border-color: #bae6fd; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
.bscp-doc-card-icon {
    height: 34px; width: 34px; flex: 0 0 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f9ff; color: var(--bscp-accent);
}
.bscp-doc-card-icon svg { height: 18px; width: 18px; }
.bscp-doc-card-main { flex: 1; min-width: 0; }
.bscp-doc-card-title { display: block; font-weight: 600; font-size: 13.5px; color: var(--bscp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bscp-doc-card-meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; font-size: 11.5px; color: var(--bscp-muted); }
.bscp-doc-card-dl { color: var(--bscp-muted); }
.bscp-doc-card-dl svg { height: 16px; width: 16px; }
.bscp-doc-card:hover .bscp-doc-card-dl { color: var(--bscp-accent); }

/* ================= Documents ================= */

.bscp-doc-group { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bscp-muted); }
.bscp-doc-list { list-style: none; margin: 0 0 8px; padding: 0; }
.bscp-doc-list li { padding: 7px 0; border-bottom: 1px solid #f3f4f6; }
.bscp-doc-list a { color: var(--bscp-accent-dark); font-weight: 500; text-decoration: none; }
.bscp-doc-list a:hover { text-decoration: underline; }
.bscp-doc-list a::before { content: "↓ "; color: var(--bscp-accent); }
.bscp-doc-lang { font-size: 0.72em; background: #f3f4f6; border-radius: 4px; padding: 2px 6px; margin-left: 8px; color: #4b5563; letter-spacing: 0.05em; }

/* ================= Portal tables (tickets) ================= */

.bscp-table {
    width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
    border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius); overflow: hidden;
    box-shadow: var(--bscp-shadow);
}
.bscp-table th, .bscp-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #f3f4f6; }
.bscp-table tr:last-child td { border-bottom: 0; }
.bscp-table thead th {
    color: var(--bscp-muted); background: var(--bscp-bg-soft);
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    border-bottom: 1px solid var(--bscp-line);
}

/* ================= Orders & offers ================= */

.bscp-orders-offers h3 { margin-top: 0; }
.bscp-section-gap { margin-top: 32px !important; }
.bscp-col-actions { white-space: nowrap; }
.bscp-col-actions .bscp-button-outline { margin-right: 6px; }
.bscp-strong-link { font-weight: 600; color: var(--bscp-ink); text-decoration: none; }
.bscp-uit { display: block; margin-top: 4px; font-size: 12px; color: var(--bscp-muted); }
.bscp-uit code { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; padding: 1px 6px; font-size: 11.5px; letter-spacing: .02em; }
a.bscp-strong-link:hover { color: var(--bscp-accent-dark); }
.bscp-orders-table td, .bscp-quotes-table td { vertical-align: middle; }
@media (max-width: 860px) {
    .bscp-orders-table thead, .bscp-quotes-table thead { display: none; }
    .bscp-orders-table tr, .bscp-quotes-table tr { display: block; border-bottom: 1px solid var(--bscp-line); padding: 10px 4px; }
    .bscp-orders-table td, .bscp-quotes-table td { display: block; border: 0; padding: 4px 10px; }
}

/* ================= Knowledge Base (Troubleshooting) ================= */

.bscp-kb { margin: 4px 0 20px; }
.bscp-kb-preview-note { font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.bscp-kb-item { border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius); margin-bottom: 10px; background: #fff; box-shadow: var(--bscp-shadow); overflow: hidden; }
.bscp-kb-summary { cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.bscp-kb-summary::-webkit-details-marker { display: none; }
.bscp-kb-summary::after { content: "+"; color: var(--bscp-muted); font-size: 18px; }
.bscp-kb-item[open] .bscp-kb-summary::after { content: "\2212"; }
.bscp-kb-title { font-weight: 600; color: var(--bscp-ink); }
.bscp-kb-chips { display: inline-flex; gap: 6px; align-items: center; }
.bscp-kb-cat { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--bscp-accent-dark); background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.bscp-kb-lang { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #4b5563; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; padding: 2px 6px; }
.bscp-kb-body { padding: 0 16px 16px; color: var(--bscp-body); }
.bscp-kb-steps { margin: 8px 0; padding-left: 20px; }
.bscp-kb-steps li { margin: 4px 0; }
.bscp-kb-video { position: relative; padding-top: 56.25%; margin: 12px 0; border-radius: 8px; overflow: hidden; background: #000; }
.bscp-kb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bscp-kb-img { max-width: 260px; border-radius: 8px; border: 1px solid var(--bscp-line); }
.bscp-kb-parts { margin-top: 10px; font-size: 14px; }
.bscp-kb-parts ul { margin: 6px 0 0; padding-left: 18px; }

/* ================= Annual service panel ================= */

.bscp-service-panel {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    justify-content: space-between;
    background: #fff; border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius);
    padding: 16px 18px; margin: 4px 0 20px; box-shadow: var(--bscp-shadow);
}
.bscp-service-panel.bscp-service-due { background: #fffbeb; border-color: #fde68a; }
.bscp-service-main { flex: 1; min-width: 240px; }
.bscp-service-main strong { color: var(--bscp-ink); font-size: 14px; }
.bscp-service-msg { margin: 4px 0 0; color: var(--bscp-body); font-size: 14px; }

/* ================= Ticket outcome (part identified) ================= */

.bscp-outcome {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--bscp-radius);
    padding: 16px 18px; margin: 4px 0 18px;
}
.bscp-outcome-head { color: var(--bscp-accent-dark); margin-bottom: 4px; }
.bscp-outcome-body { margin: 0 0 12px; color: var(--bscp-body); }

.bscp-ticket-list { list-style: none; padding: 0; }
.bscp-ticket-list li { padding: 7px 0; border-bottom: 1px solid #f3f4f6; }

/* ================= Ticket timeline (#9) ================= */

.bscp-timeline { display: flex; list-style: none; margin: 4px 0 20px; padding: 0; }
.bscp-timeline li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.bscp-timeline li::before {
    content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #e5e7eb;
}
.bscp-timeline li:first-child::before { display: none; }
.bscp-step-dot {
    height: 28px; width: 28px; border-radius: 999px; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 2px solid #d1d5db; color: var(--bscp-muted);
    font-size: 12px; font-weight: 700;
}
.bscp-step-label { font-size: 12px; color: var(--bscp-muted); text-align: center; }
.bscp-step-done .bscp-step-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.bscp-step-done::before { background: #16a34a !important; }
.bscp-step-current .bscp-step-dot { border-color: var(--bscp-accent); color: var(--bscp-accent-dark); }
.bscp-step-current::before { background: #16a34a !important; }
.bscp-step-current .bscp-step-label { color: var(--bscp-ink); font-weight: 600; }
.bscp-step-attention .bscp-step-dot { border-color: #d97706; color: #b45309; background: #fffbeb; }
.bscp-step-attention .bscp-step-label { color: #92400e; font-weight: 600; }

/* Attachment thumbs / chips */
.bscp-message-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bscp-file-thumb { display: block; height: 72px; width: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--bscp-line); }
.bscp-file-thumb img { height: 100%; width: 100%; object-fit: cover; }
.bscp-file-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--bscp-line); border-radius: 999px;
    background: var(--bscp-bg-soft); font-size: 12.5px; color: var(--bscp-body) !important;
    text-decoration: none !important;
}
.bscp-file-chip:hover { border-color: #bae6fd; }

/* ================= Skeleton loading (#10) ================= */

.bscp-skeleton {
    background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 45%, #eef1f5 65%);
    background-size: 200% 100%;
    animation: bscp-shimmer 1.3s infinite linear;
    border-radius: 8px;
}
.bscp-skeleton-row { pointer-events: none; }
.bscp-skeleton-line { height: 12px; margin: 7px 0; }
@keyframes bscp-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .bscp-skeleton { animation: none; } }

/* ================= Ticket thread ================= */

.bscp-thread { margin: 18px 0; }
.bscp-message { border: 1px solid var(--bscp-line); border-radius: var(--bscp-radius); padding: 14px 18px; margin-bottom: 12px; background: #fff; box-shadow: var(--bscp-shadow); }
.bscp-message-staff { border-left: 3px solid var(--bscp-accent); }
.bscp-message-customer { border-left: 3px solid #d1d5db; }
.bscp-message-meta { font-size: 12.5px; color: var(--bscp-muted); margin-bottom: 6px; display: flex; gap: 10px; }
.bscp-message-body ul, .bscp-message-body ol { margin: 8px 0 8px 20px; }
.bscp-message-body a { color: var(--bscp-accent-dark); }
.bscp-message-body p:last-child { margin-bottom: 0; }
.bscp-message-files { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.9em; }
.bscp-message-files a::before { content: "↓ "; color: var(--bscp-accent); }

/* ---------------------------------------------------------------------------
   Product autocomplete on the report-issue form.

   Replaces a native <datalist>, which the browser drew itself: unstylable, OS
   grey inside a designed form, and it truncated long product names with no way
   to widen it. Everything below exists because that markup gave us none of it.
   --------------------------------------------------------------------------- */

.bscp-form .bscp-field {
    position: relative; /* anchor for the absolutely positioned list */
}

.bscp-ac-list {
    position: absolute;
    z-index: 30;
    top: 0; /* set precisely in JS, relative to the input */
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d7dde5;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(16, 32, 56, .14);
}

.bscp-ac-list[hidden] {
    display: none; /* [hidden] alone loses to the theme's list rules */
}

.bscp-ac-list {
    display: block;
}

.bscp-ac-list [role="option"] {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    padding: 9px 10px;
    border-radius: 7px;
    cursor: pointer;
    line-height: 1.35;
}

.bscp-ac-list [role="option"].is-active {
    background: #eaf4ff;
}

.bscp-ac-sku {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-size: .82em;
    font-weight: 600;
    color: #0a6ed1;
    background: #eef5fd;
    border-radius: 5px;
    padding: 2px 7px;
}

.bscp-ac-name {
    /* wraps instead of truncating - the datalist cut names off mid-word */
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.bscp-ac-owned {
    /* the order the machine came from; no new translatable string, a number reads
       the same in all 18 languages */
    flex: 0 0 auto;
    font-size: .78em;
    font-weight: 600;
    color: #1a7f45;
    background: #e8f6ee;
    border-radius: 5px;
    padding: 2px 7px;
}
