/* ==================================================================
   SDPL Maintenance Control - shared "Pro app" look
   Same design language as Quality Control (SDPLQCApp/qc-pro.css),
   Production Control and the Enterprise Hub: dark canvas with a
   theme-coloured wash and grid, round brand mark, mono eyebrow,
   Inter type, pill buttons, flat red power button, panel cards.
   Scoped by body.mt-pro + .mt-dashboard / .mt-module.
   ================================================================== */

:root {
    --rd-canvas: #0b1020;
    --rd-wash:
        radial-gradient(1100px circle at 8% -8%, rgba(var(--theme-rgb), 0.22) 0%, rgba(var(--theme-rgb), 0) 62%),
        radial-gradient(800px circle at 98% 4%, rgba(var(--theme-rgb), 0.12) 0%, rgba(var(--theme-rgb), 0) 58%),
        radial-gradient(900px circle at 50% 108%, rgba(var(--theme-rgb), 0.08) 0%, rgba(var(--theme-rgb), 0) 60%),
        repeating-radial-gradient(circle at 78% 18%, transparent 0 46px, rgba(var(--theme-rgb), 0.12) 46px 47px),
        repeating-radial-gradient(circle at 12% 95%, transparent 0 60px, rgba(var(--theme-rgb), 0.08) 60px 61px),
        radial-gradient(circle at 20% 25%, rgba(var(--theme-rgb), 0.13) 0%, rgba(var(--theme-rgb), 0.045) 100%);
    --rd-wash-size: auto, auto, auto, auto, auto, auto;
    --rd-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.032) 0%, rgba(255, 255, 255, 0.012) 100%);
    --rd-line: rgba(255, 255, 255, 0.08);
    --rd-muted: #8b9ab1;
    --rd-faint: #6b7890;
    --rd-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- base ---------- */
html body.mt-pro {
    background-color: var(--rd-canvas) !important;
    background-image: var(--rd-wash) !important;
    background-size: var(--rd-wash-size) !important;
    background-attachment: fixed !important;
    background-repeat: repeat !important;
    color: #e2e8f0;
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body.mt-pro,
body.mt-pro input,
body.mt-pro select,
body.mt-pro textarea,
body.mt-pro button {
    font-family: "Inter", sans-serif;
}

body.mt-pro .material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* the old animated backgrounds are not part of the Pro look */
body.mt-pro #particles-js,
body.mt-pro #particleCanvas,
body.mt-pro .particles-js-canvas-el,
body.mt-pro .grid-overlay,
body.mt-pro .glow-blob,
body.mt-pro .glow1,
body.mt-pro .glow2,
body.mt-pro::after {
    display: none !important;
}

body.mt-pro ::-webkit-scrollbar { width: 8px; height: 8px; }
body.mt-pro ::-webkit-scrollbar-thumb { background: rgba(var(--theme-rgb), 0.3); border-radius: 10px; }
body.mt-pro ::-webkit-scrollbar-thumb:hover { background: rgba(var(--theme-rgb), 0.6); }
body.mt-pro ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); border-radius: 10px; }

/* ==================================================================
   Header (1:1 with the Production Control header)
   ================================================================== */
.rd-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 0 20px 0;
    margin-bottom: 28px;
    z-index: 20;
}

.rd-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(var(--theme-rgb), 0.55) 0%,
            rgba(255, 255, 255, 0.10) 30%,
            rgba(255, 255, 255, 0.04) 70%,
            rgba(255, 255, 255, 0) 100%);
}

.rd-head-left { display: flex; align-items: center; gap: 15px; min-width: 0; flex: 1 1 420px; }
.rd-head-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.rd-brandmark {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, rgba(var(--theme-rgb), 0.26), rgba(var(--theme-rgb), 0.04));
    border: 1px solid rgba(var(--theme-rgb), 0.34);
    box-shadow: 0 10px 26px -12px rgba(var(--theme-rgb), 0.85), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.rd-brandmark::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(var(--theme-rgb), 0.16);
    pointer-events: none;
}

.rd-brandmark img { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; }

.rd-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding-left: 3px;
    font-family: var(--rd-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(var(--theme-rgb), 0.92);
    white-space: nowrap;
}

.rd-eyebrow > span:not(.rd-eyebrow-dot),
.rd-eyebrow > a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: inherit;
}

.rd-eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--theme-color);
    box-shadow: 0 0 8px 1px rgba(var(--theme-rgb), 0.8);
}

.rd-eyebrow-sep { color: rgba(255, 255, 255, 0.25); margin: 0 1px; }

/* the module word in the eyebrow leads back to the Maintenance menu */
.rd-eyebrow-link { color: inherit; text-decoration: none; cursor: pointer; }
.rd-eyebrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.rd-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #ffffff 0%, #c7d3e3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.rd-title span {
    font-family: inherit;
    -webkit-text-fill-color: var(--theme-color);
    color: var(--theme-color);
}

.rd-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--rd-muted); max-width: 620px; }

.rd-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 4px;
}

.rd-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 99px;
    font-family: var(--rd-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #94a3b8;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.rd-chip:empty { display: none; }

.rd-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 0 6px 0 10px;
    min-width: 0;
}

.rd-user .user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.user-role-badge {
    display: inline-block;
    font-family: var(--rd-mono);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(var(--theme-rgb), 0.95);
    background: rgba(var(--theme-rgb), 0.12);
    border: 1px solid rgba(var(--theme-rgb), 0.25);
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
}

.rd-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: 99px;
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.9);
    transition: all 0.25s ease;
}

.rd-hub-btn .material-icons { font-size: 16px; vertical-align: middle; }
.rd-hub-btn:active { transform: scale(0.97); }

.rd-hub-btn.rd-back:hover,
.rd-hub-btn.rd-accent:hover {
    color: #fff;
    border-color: rgba(var(--theme-rgb), 0.55);
    background: linear-gradient(180deg, rgba(var(--theme-rgb), 0.22) 0%, rgba(var(--theme-rgb), 0.06) 100%);
    box-shadow: 0 10px 24px -12px rgba(var(--theme-rgb), 0.8);
}

/* page action in the header (e.g. "Add New Form") - theme filled */
.rd-hub-btn.rd-accent {
    color: #fff;
    border-color: rgba(var(--theme-rgb), 0.45);
    background: linear-gradient(180deg, rgba(var(--theme-rgb), 0.30) 0%, rgba(var(--theme-rgb), 0.10) 100%);
}

/* Logout = round red power button, flat (same as Production Control) */
.rd-power {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.42);
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.rd-power svg { width: 19px; height: 19px; display: block; }
.rd-power:hover { color: #fff; background: #ef4444; border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18); }
.rd-power:active { transform: scale(0.94); }
.rd-power:focus-visible { outline: 2px solid #f87171; outline-offset: 2px; }

/* ==================================================================
   Page frame + loaders
   ================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body.mt-pro { scrollbar-width: thin; scrollbar-color: rgba(var(--theme-rgb), 0.35) transparent; }

.mt-wrap {
    width: 100%;
    padding: 20px 40px 40px 40px;
    position: relative;
    z-index: 1;
}

/* the old "Welcome" text is written by the page script - kept, not shown */
.mt-hidden { display: none !important; }

/* first-load overlay (checking permissions / verifying access) */
body.mt-pro .loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    background: rgba(2, 4, 8, 0.35);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* placeholder cards that sit blurred behind the loader until the real cards arrive */
body.mt-pro .portal-card.mt-skel { pointer-events: none; cursor: default; }
body.mt-pro .portal-card.mt-skel .card-icon-box,
body.mt-pro .portal-card.mt-skel h3,
body.mt-pro .portal-card.mt-skel p,
body.mt-pro .portal-card.mt-skel .card-action { background: rgba(148, 163, 184, 0.16); border-radius: 8px; color: transparent !important; }
body.mt-pro .portal-card.mt-skel .card-icon-box * { visibility: hidden; }
body.mt-pro .portal-card.mt-skel h3 { width: 60%; min-height: 20px; margin-bottom: 10px; }
body.mt-pro .portal-card.mt-skel p { width: 90%; min-height: 34px; }
body.mt-pro .portal-card.mt-skel .card-action { width: 40%; min-height: 16px; }
body.mt-pro .portal-card.mt-skel::after, body.mt-pro .portal-card.mt-skel .card-action::after { display: none; }

body.mt-pro .loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

body.mt-pro .spinner { position: relative; width: 52px; height: 52px; }

body.mt-pro .spinner::before,
body.mt-pro .spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 4px solid transparent;
}

body.mt-pro .spinner::before { inset: 0; border-color: #e2e8f0; border-right-color: transparent; animation: mt-cw 1s linear infinite; }
body.mt-pro .spinner::after { inset: 25%; border-color: var(--theme-color); border-left-color: transparent; animation: mt-ccw 0.8s linear infinite; }

@keyframes mt-cw { to { transform: rotate(360deg); } }
@keyframes mt-ccw { to { transform: rotate(-360deg); } }

body.mt-pro .loading-text { color: var(--theme-color); font-size: 20px; font-weight: 700; }
/* module pages: same quiet line as the QC "Loading module..." overlay */
body.mt-pro .loading-text.is-quiet { font-size: 13px; font-weight: 400; color: #94a3b8; letter-spacing: 0.3px; }
body.mt-pro .loading-subtext { font-size: 13px; color: #94a3b8; letter-spacing: 0.3px; }

@keyframes rdFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================================
   Dashboard (module cards) - 1:1 with the QC / Pro dashboard cards
   ================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 188px;
    padding: 22px 22px 18px 22px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid rgba(var(--theme-rgb), 0.18);
    background:
        radial-gradient(110% 70% at 50% 0%, rgba(var(--theme-rgb), 0.10) 0%, rgba(var(--theme-rgb), 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
    box-shadow: 0 30px 70px -44px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.28, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: rdFadeUp 0.55s cubic-bezier(0.22, 1, 0.28, 1) both;
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--theme-rgb), 0.55);
    background:
        radial-gradient(110% 80% at 50% 0%, rgba(var(--theme-rgb), 0.20) 0%, rgba(var(--theme-rgb), 0) 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
    box-shadow: 0 22px 48px -26px rgba(var(--theme-rgb), 0.85), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.portal-card:active { transform: translateY(-1px) scale(0.99); }
.portal-card:focus-visible { outline: 2px solid rgba(var(--theme-rgb), 0.8); outline-offset: 3px; }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }

.card-icon-box {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--theme-color);
    background: linear-gradient(150deg, rgba(var(--theme-rgb), 0.24), rgba(var(--theme-rgb), 0.05));
    border: 1px solid rgba(var(--theme-rgb), 0.32);
    box-shadow: 0 12px 28px -14px rgba(var(--theme-rgb), 0.75), 0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.card-icon-box .material-icons { font-size: 22px; }

.mt-dashboard .status-badge {
    font-family: var(--rd-mono);
    font-size: 9.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #34d399;
}

.card-body h3 { font-size: 16px; font-weight: 700; color: #ffffff; margin-bottom: 7px; letter-spacing: -0.02em; }
.card-body p { font-size: 12.5px; line-height: 1.6; color: var(--rd-muted); }

.card-action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-color);
}

.card-action::after {
    content: '\2192';
    font-size: 16px;
    margin-left: 6px;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.28, 1);
}

.portal-card:hover .card-action::after { transform: translateX(5px); }

/* shown by CSS when the page script did not unhide any card */
.no-modules {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--rd-muted);
    font-size: 13px;
    border: 1px dashed rgba(255, 255, 255, 0.10);
    border-radius: 20px;
}

/* ==================================================================
   Breakdown log pages
   ================================================================== */
/* toolbar: mono label + location pills + live count */
.mt-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 16px;
    border: 1px solid var(--rd-line);
    background: var(--rd-panel);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.mt-toolbar-label {
    font-family: var(--rd-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rd-faint);
    padding: 0 4px;
}

.mt-module .filter-container { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; }

.mt-module .filter-btn {
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rd-muted);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.mt-module .filter-btn:hover { color: #fff; border-color: rgba(var(--theme-rgb), 0.35); background: rgba(255, 255, 255, 0.06); }

.mt-module .filter-btn.active {
    color: #fff;
    border-color: rgba(var(--theme-rgb), 0.5);
    background: linear-gradient(180deg, rgba(var(--theme-rgb), 0.28) 0%, rgba(var(--theme-rgb), 0.08) 100%);
    box-shadow: 0 10px 24px -14px rgba(var(--theme-rgb), 0.9);
}

.mt-source {
    margin-left: auto;
    font-family: var(--rd-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rd-faint);
    white-space: nowrap;
}

.mt-source.is-warn { color: #fbbf24; }

.mt-refresh {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    color: var(--rd-muted);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.mt-refresh .material-icons { font-size: 18px; }
.mt-refresh:hover { color: #fff; border-color: rgba(var(--theme-rgb), 0.45); background: rgba(var(--theme-rgb), 0.12); }
.mt-refresh.is-spin .material-icons { animation: mt-cw 0.9s linear infinite; }

.mt-count {
    margin-left: 0;
    font-family: var(--rd-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.28);
    padding: 6px 12px;
    border-radius: 99px;
    white-space: nowrap;
}

.mt-count.is-zero { color: #34d399; background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.28); }

/* empty / loading state */
.mt-module .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46vh;
    padding: 50px 20px;
    text-align: center;
    color: var(--rd-muted);
    font-size: 13px;
    border: 1px dashed rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    background: var(--rd-panel);
}

.mt-module .empty-state .material-icons {
    font-size: 30px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 50%;
    color: var(--theme-color);
    background: linear-gradient(150deg, rgba(var(--theme-rgb), 0.22), rgba(var(--theme-rgb), 0.04));
    border: 1px solid rgba(var(--theme-rgb), 0.30);
}

.mt-module .empty-state h3 { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.mt-module .empty-state p { max-width: 460px; line-height: 1.6; }

/* ==================================================================
   Phones (same breakpoints as QC / Production Control)
   ================================================================== */
@media (max-width: 900px) {
    .rd-chip { display: none; }
}

@media (max-width: 768px) {
    .mt-wrap { padding: 15px 16px 28px 16px; }
    .rd-header { gap: 16px; padding-bottom: 16px; margin-bottom: 20px; }
    .rd-head-left { gap: 12px; }
    .rd-brandmark { width: 44px; height: 44px; }
    .rd-brandmark img { width: 36px; height: 36px; }
    .rd-title { font-size: 22px; }
    .rd-desc { font-size: 12px; }
    .rd-eyebrow { font-size: 9px; letter-spacing: 0.10em; }
    .rd-head-right { width: 100%; margin-top: 0; gap: 8px; flex-wrap: wrap; }
    .rd-user { flex: 1; align-items: flex-start; padding-left: 4px; }
    .rd-hub-btn { padding: 10px 14px; }
    .cards-grid { grid-template-columns: 1fr; gap: 14px; }
    .portal-card { min-height: auto; padding: 20px 20px 16px 20px; }
    .card-body h3 { font-size: 17px; }
    .mt-toolbar { padding: 10px 12px; gap: 10px; }
    .mt-module .filter-container { order: 3; flex: 1 1 100%; gap: 6px; }
    .mt-module .filter-btn { padding: 7px 13px; font-size: 12px; }
}

@media (max-width: 560px) {
    .rd-eyebrow-org, .rd-eyebrow-sep { display: none; }
    .rd-hub-btn .btn-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-card { animation: none; }
}


/* ==================================================================
   Breakdown LOG (read-only list: Packing + Production)
   ================================================================== */
.bl-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: -6px 0 14px; }
.bl-field { display: inline-flex; align-items: center; gap: 8px; }
.bl-field > span, .bl-range { font-family: var(--rd-mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rd-faint); }
.bl-range { letter-spacing: .08em; }
.bl-bar select, .bl-bar input[type="date"], .bl-search input {
    height: 36px; padding: 0 12px; border-radius: 10px; color: #e2e8f0; font-size: 12.5px; font-weight: 500;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); outline: none; color-scheme: dark;
}
.bl-bar select:focus, .bl-bar input:focus { border-color: rgba(var(--theme-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--theme-rgb), .14); }
.bl-field.is-enhanced select { display: none; }
.bl-dd { position: relative; }
.bl-dd-btn {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 150px; height: 36px; padding: 0 8px 0 14px;
    border-radius: 10px; color: #e2e8f0; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); transition: border-color .2s, background .2s, box-shadow .2s;
}
.bl-dd-btn:hover { border-color: rgba(var(--theme-rgb), .4); background: rgba(255,255,255,.06); }
.bl-dd.is-open .bl-dd-btn, .bl-dd-btn:focus-visible { outline: none; border-color: rgba(var(--theme-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--theme-rgb), .16); }
.bl-dd-ic { font-size: 20px; color: var(--rd-muted); transition: transform .2s, color .2s; }
.bl-dd.is-open .bl-dd-ic { transform: rotate(180deg); color: var(--theme-color); }
.bl-dd-menu {
    position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-height: 280px; overflow: auto; padding: 6px;
    border-radius: 14px; border: 1px solid rgba(var(--theme-rgb), .28);
    background: linear-gradient(180deg, rgba(var(--theme-rgb), .10), rgba(var(--theme-rgb), 0) 60%), #0d1424;
    box-shadow: 0 24px 50px -18px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.06) inset;
    animation: bl-pop .14s ease-out both;
}
.bl-dd-menu[hidden] { display: none; }
@keyframes bl-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.bl-dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: #cbd5e1; cursor: pointer; white-space: nowrap; }
.bl-dd-opt .material-icons { font-size: 17px; opacity: 0; color: var(--theme-color); }
.bl-dd-opt.hi { background: rgba(255,255,255,.06); color: #fff; }
.bl-dd-opt.on { color: #fff; font-weight: 600; background: rgba(var(--theme-rgb), .16); }
.bl-dd-opt.on .material-icons { opacity: 1; }
.bl-dd-opt.on.hi { background: rgba(var(--theme-rgb), .24); }
@media (prefers-reduced-motion: reduce) { .bl-dd-menu { animation: none; } }
.bl-custom { display: inline-flex; align-items: center; gap: 6px; }
.bl-custom i { color: var(--rd-faint); font-style: normal; }
.bl-search { position: relative; margin-left: auto; flex: 1 1 260px; max-width: 420px; }
.bl-search .material-icons { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--rd-faint); pointer-events: none; }
.bl-search input { width: 100%; padding-left: 36px; }

/* status tiles (also the status filter) */
.bl-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.bl-tile {
    --c: 148, 163, 184;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
    padding: 10px 14px; border-radius: 14px; text-align: left; cursor: pointer; color: #e2e8f0;
    background: var(--rd-panel); border: 1px solid var(--rd-line); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
    transition: border-color .2s, background .2s, transform .15s;
}
.bl-tile:hover { border-color: rgba(var(--c), .5); }
.bl-tile.on { border-color: rgba(var(--c), .7); background: linear-gradient(180deg, rgba(var(--c), .20), rgba(var(--c), .05)); box-shadow: 0 12px 26px -16px rgba(var(--c), .9); }
.bl-tile-n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.bl-tile-l { font-family: var(--rd-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--rd-muted); }
.bl-tile.st-waiting, .st-waiting { --c: 245, 158, 11; }
.bl-tile.st-working, .st-working { --c: 56, 189, 248; }
.bl-tile.st-pending, .st-pending { --c: 167, 139, 250; }
.bl-tile.st-closed,  .st-closed  { --c: 52, 211, 153; }
.bl-tile.st-waiting .bl-tile-n { color: #fbbf24; } .bl-tile.st-working .bl-tile-n { color: #7dd3fc; }
.bl-tile.st-pending .bl-tile-n { color: #c4b5fd; } .bl-tile.st-closed .bl-tile-n { color: #6ee7b7; }
.bl-tile.bl-info { cursor: default; } .bl-tile.bl-info:hover { border-color: var(--rd-line); }
.bl-tile.bl-info .bl-tile-n { font-size: 18px; color: #e2e8f0; padding-top: 3px; }

/* the list */
.bl-list { border-radius: 16px; border: 1px solid var(--rd-line); background: var(--rd-panel); overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.bl-list:has(.empty-state) { border: 0; background: none; box-shadow: none; overflow: visible; }
.bl-head, .bl-row {
    display: grid; align-items: center; column-gap: 12px; padding: 0 16px;
    grid-template-columns: 92px minmax(130px, 1.05fr) 106px minmax(150px, 1.5fr) minmax(120px, 1.15fr) 118px 74px 80px 52px 22px;
}
.bl-head { height: 38px; font-family: var(--rd-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--rd-faint); border-bottom: 1px solid var(--rd-line); background: rgba(255,255,255,.02); }
.bl-row { position: relative; min-height: 52px; padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.05); transition: background .15s; outline: none; }
.bl-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: rgb(var(--c)); opacity: .9; }
.bl-row:hover, .bl-row:focus-visible { background: rgba(255,255,255,.035); }
.bl-row.is-open { background: rgba(var(--theme-rgb), .06); }
.bl-c { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.3; color: #e2e8f0; }
.bl-c small { font-size: 10.5px; color: var(--rd-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-c b { font-weight: 650; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-team { font-size: 12px; } .bl-team > :first-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bl-dim { color: var(--rd-faint); }
.bl-yes { color: #fbbf24; font-weight: 600; }
.bl-live { color: #fbbf24; font-variant-numeric: tabular-nums; }
.bl-chev { align-items: flex-end; color: var(--rd-faint); } .bl-chev .material-icons { font-size: 20px; transition: transform .2s; }
.bl-row.is-open .bl-chev .material-icons { transform: rotate(180deg); color: #fff; }
.bl-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: 99px; font-family: var(--rd-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--c)); background: rgba(var(--c), .12); border: 1px solid rgba(var(--c), .32); }
.bl-chip i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--c)); }
.bl-chip.st-waiting i, .bl-chip.st-working i { animation: mt-pulse 1.6s ease-in-out infinite; }
@keyframes mt-pulse { 50% { opacity: .35; } }

/* expanded details */
.bl-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 14px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.05); background: rgba(var(--theme-rgb), .035); }
.bl-box { min-width: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.bl-box h5 { margin: 0 0 8px; font-family: var(--rd-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rd-faint); }
.bl-box > div { font-size: 12.5px; line-height: 1.55; color: #e2e8f0; white-space: pre-wrap; word-break: break-word; }
.bl-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bl-names li { padding: 3px 10px; border-radius: 99px; font-size: 12px; background: rgba(var(--theme-rgb), .14); border: 1px solid rgba(var(--theme-rgb), .30); }
.bl-tl { list-style: none; margin: 0; padding: 0; white-space: normal; }
.bl-tl li { position: relative; display: flex; gap: 10px; padding-bottom: 10px; }
.bl-tl li:last-child { padding-bottom: 0; }
.bl-tl li::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: -2px; width: 1px; background: rgba(255,255,255,.12); }
.bl-tl li:last-child::before { display: none; }
.bl-dot { flex: 0 0 9px; height: 9px; margin-top: 4px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: transparent; }
.bl-tl li.on .bl-dot { border-color: var(--theme-color); background: var(--theme-color); }
.bl-tl b { display: inline-block; min-width: 92px; font-weight: 600; color: #fff; }
.bl-tl span { color: #e2e8f0; font-variant-numeric: tabular-nums; }
.bl-tl em { display: block; font-style: normal; font-size: 11px; color: var(--rd-muted); }

.bl-more, .bl-retry { display: block; margin: 12px auto; padding: 9px 20px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: #e2e8f0; cursor: pointer; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.bl-more:hover, .bl-retry:hover { border-color: rgba(var(--theme-rgb), .5); background: rgba(var(--theme-rgb), .12); }
.bl-note { padding: 10px 16px; font-size: 11.5px; color: #fbbf24; text-align: center; }

@media (max-width: 1180px) {
    .bl-head, .bl-row { grid-template-columns: 88px minmax(110px, 1fr) 100px minmax(120px, 1.3fr) minmax(100px, 1fr) 108px 66px 70px 22px; }
    .bl-head > :nth-child(9), .bl-parts { display: none; }
}
@media (max-width: 900px) {
    .bl-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .bl-tile.bl-info { display: none; }
    .bl-head { display: none; }
    .bl-list { background: none; border: 0; box-shadow: none; overflow: visible; }
    .bl-body { display: grid; gap: 10px; }
    .bl-row {
        grid-template-columns: 1fr 1fr; row-gap: 8px; padding: 12px 14px 12px 16px; border-radius: 14px;
        border: 1px solid var(--rd-line); background: var(--rd-panel);
    }
    .bl-row::before { top: 10px; bottom: 10px; }
    .bl-row .bl-c[data-l]::before { content: attr(data-l); font-family: var(--rd-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--rd-faint); }
    .bl-row .bl-st { grid-column: 1; } .bl-row .bl-mach { grid-column: 1 / -1; order: -1; }
    .bl-row .bl-chev { position: absolute; right: 10px; top: 10px; }
    .bl-row .bl-what, .bl-row .bl-team { grid-column: 1 / -1; }
    .bl-row .bl-parts { display: flex; }
    .bl-row .bl-st { grid-column: 1 / -1; }
    .bl-detail { border: 1px solid var(--rd-line); border-radius: 14px; margin-top: -4px; }
}
@media (max-width: 560px) {
    .bl-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
    .bl-tile { padding: 8px 8px; } .bl-tile-n { font-size: 18px; } .bl-tile-l { font-size: 8.5px; letter-spacing: .06em; }
    .bl-search { margin-left: 0; max-width: none; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .bl-chip i { animation: none; } }

/* ---- date field ---- */
.xd {
    position: relative;
    display: block;
}

.xd-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 152px;
    height: 40px;
    padding: 0 12px 0 14px;
    border-radius: 10px;
    font-family: var(--rd-mono, "IBM Plex Mono", monospace);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #e2e8f0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.xd-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.xd-btn:focus-visible,
.xd.is-open .xd-btn {
    outline: none;
    border-color: rgba(var(--theme-rgb), 0.6);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.14);
}

.xd-btn-text { flex: 1; min-width: 0; white-space: nowrap; }
.xd-btn.is-empty .xd-btn-text { color: #5b6880; }

.xd-btn-icon { flex-shrink: 0; display: flex; color: #8b9ab1; transition: color 0.2s ease; }
.xd-btn:hover .xd-btn-icon,
.xd.is-open .xd-btn-icon { color: var(--theme-color); }

.xd-pop {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 0;
    width: 272px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(var(--theme-rgb), 0.24);
    background:
        linear-gradient(180deg, rgba(var(--theme-rgb), 0.11) 0%, rgba(var(--theme-rgb), 0.05) 100%),
        linear-gradient(180deg, #131a28 0%, #0d121d 100%);
    box-shadow:
        0 26px 56px -24px rgba(0, 0, 0, 0.95),
        0 0 44px -26px rgba(var(--theme-rgb), 0.8),
        0 1px 0 rgba(255, 255, 255, 0.07) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.985);
    transform-origin: top left;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.28, 1), visibility 0s linear 0.22s;
}

.xd.is-open .xd-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.28, 1), visibility 0s linear 0s;
}

.xd-pop.is-right { left: auto; right: 0; transform-origin: top right; }
.xd-pop.is-up { top: auto; bottom: calc(100% + 6px); }

.xd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 12px;
}

.xd-nav {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s ease;
}

.xd-nav:hover {
    color: #fff;
    border-color: rgba(var(--theme-rgb), 0.45);
    background: rgba(var(--theme-rgb), 0.16);
}

.xd-title {
    flex: 1;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.xd-title:hover { background: rgba(255, 255, 255, 0.05); }

.xd-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.xd-dow {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rd-mono, "IBM Plex Mono", monospace);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5b6880;
}

.xd-day {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: #b6c2d4;
    color: color-mix(in srgb, var(--theme-soft, #cfd6e2) 26%, #b6c2d4);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.16s ease;
}

.xd-day:hover { background: rgba(var(--theme-rgb), 0.15); color: #fff; }
.xd-day.is-muted { color: #465064; }
.xd-day.is-today { border-color: rgba(var(--theme-rgb), 0.45); }

.xd-day.is-selected {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
    box-shadow: 0 6px 14px -7px rgba(var(--theme-rgb), 0.95);
}

.xd-day.is-disabled { opacity: 0.25; pointer-events: none; }

/* month / year pickers behind the title */
.xd-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.xd-mo {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: #b6c2d4;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.16s ease;
}

.xd-mo:hover { background: rgba(var(--theme-rgb), 0.15); color: #fff; }

.xd-mo.is-selected {
    color: #fff;
    background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end));
}

.xd-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.xd-quick {
    padding: 6px 11px;
    border-radius: 8px;
    font-family: "Inter", sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s ease;
}

.xd-quick:hover {
    color: #fff;
    border-color: rgba(var(--theme-rgb), 0.45);
    background: rgba(var(--theme-rgb), 0.16);
}

.xd-hint {
    font-family: var(--rd-mono, "IBM Plex Mono", monospace);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #465064;
}

/* ===== themed calendar (same look as Report Desk) ===== */
.bl-custom .xd-btn { min-width: 140px; height: 36px; font-size: 12px; }
.bl-custom .xd-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bl-bar { position: relative; z-index: 5; }
@media (max-width: 560px) { .bl-custom { width: 100%; } .bl-custom .xd { flex: 1; } .bl-custom .xd-btn { width: 100%; min-width: 0; } .xd-pop { width: min(272px, calc(100vw - 48px)); } }
@media (prefers-reduced-motion: reduce) { .xd-pop { transition-duration: .01ms !important; } }

/* ===== admin: press-and-hold delete ===== */
body.bl-admin .bl-row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.bl-row.is-holding { background: rgba(239,68,68,.10); }
.bl-row.is-holding::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; background: #ef4444; animation: bl-hold .7s linear forwards; }
@keyframes bl-hold { from { width: 0; } to { width: 100%; } }
.bl-adminhint { display: flex; align-items: center; gap: 6px; margin: 0 2px 8px; font-family: var(--rd-mono, monospace); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--rd-faint); }
.bl-adminhint .material-icons { font-size: 15px; color: var(--theme-color); }
.bl-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,7,14,.66); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s; }
.bl-modal.is-in { opacity: 1; }
.bl-modal-card { width: min(420px, 100%); padding: 22px 20px 18px; border-radius: 16px; border: 1px solid rgba(239,68,68,.32); text-align: center;
    background: linear-gradient(180deg, rgba(239,68,68,.09), rgba(239,68,68,.02)), linear-gradient(180deg, #131a28, #0d121d);
    box-shadow: 0 30px 70px -24px rgba(0,0,0,.95), 0 0 50px -28px rgba(239,68,68,.8); transform: translateY(8px) scale(.98); transition: transform .22s cubic-bezier(.22,1,.28,1); }
.bl-modal.is-in .bl-modal-card { transform: none; }
.bl-md-ic { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #f87171; background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.3); }
.bl-md-ic .material-icons { font-size: 24px; }
.bl-modal-card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #f1f5f9; }
.bl-md-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; margin-bottom: 12px; text-align: left; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.bl-md-sum .wide { grid-column: 1 / -1; }
.bl-md-sum i { display: block; font-style: normal; font-family: var(--rd-mono, monospace); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-faint); margin-bottom: 2px; }
.bl-md-sum b { display: block; font-size: 12.5px; font-weight: 600; color: #e2e8f0; text-transform: capitalize; word-break: break-word; }
.bl-md-sum .wide b { text-transform: none; }
.bl-md-warn { margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: var(--rd-muted); }
.bl-md-warn b { color: #fca5a5; font-weight: 600; }
.bl-md-err { margin: 0 0 12px; padding: 9px 11px; border-radius: 9px; font-size: 12px; text-align: left; color: #fecaca; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); }
.bl-md-btns { display: flex; gap: 10px; }
.bl-md-btns button { flex: 1; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .18s; }
.bl-md-cancel { color: #cbd5e1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.bl-md-cancel:hover:not(:disabled) { background: rgba(255,255,255,.09); color: #fff; }
.bl-md-del { color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626); border: 1px solid #ef4444; box-shadow: 0 8px 18px -10px rgba(239,68,68,.9); }
.bl-md-del .material-icons { font-size: 18px; }
.bl-md-del:hover:not(:disabled) { filter: brightness(1.1); }
.bl-md-btns button:disabled { opacity: .6; cursor: default; }
.bl-md-del.is-busy .material-icons { animation: bl-spin 1s linear infinite; }
@keyframes bl-spin { to { transform: rotate(360deg); } }
.bl-toast { position: fixed; left: 50%; bottom: 26px; z-index: 210; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: #d1fae5; background: #0f1a1a; border: 1px solid rgba(52,211,153,.4); box-shadow: 0 16px 40px -16px rgba(0,0,0,.9); transform: translate(-50%, 14px); opacity: 0; transition: all .28s; }
.bl-toast.is-bad { color: #fecaca; background: #1a1012; border-color: rgba(239,68,68,.4); }
.bl-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.bl-toast .material-icons { font-size: 18px; }
@media (max-width: 560px) { .bl-md-sum { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .bl-modal, .bl-modal-card, .bl-toast { transition: none; } .bl-row.is-holding::after { animation-duration: .01ms; } }

.mt-noloc { font-family: var(--rd-mono, monospace); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--rd-faint); padding: 0 6px; }

/* ===== dashboard popup (module not linked yet) ===== */
.mt-pop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,7,14,.66); backdrop-filter: blur(5px); }
.mt-pop-card { width: min(380px, 100%); padding: 22px 20px 18px; text-align: center; border-radius: 16px; border: 1px solid rgba(var(--theme-rgb), .3);
    background: linear-gradient(180deg, rgba(var(--theme-rgb), .11), rgba(var(--theme-rgb), .04)), linear-gradient(180deg, #131a28, #0d121d); box-shadow: 0 30px 70px -24px rgba(0,0,0,.95); }
.mt-pop-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: #f1f5f9; }
.mt-pop-card p { margin: 0 0 16px; font-size: 12.5px; line-height: 1.55; color: var(--rd-muted); }
.mt-pop-card button { min-width: 96px; height: 38px; padding: 0 18px; border-radius: 10px; font: 600 12.5px inherit; color: #fff; cursor: pointer; border: 1px solid rgba(var(--theme-rgb), .6); background: linear-gradient(135deg, var(--theme-gradient-start), var(--theme-gradient-end)); }

/* ===== one filter card: Location + Period (+ Source) + Showing + Search, with PDF and reload (same idea as the Pro Machine Report) ===== */
.bl-filterbar {
    position: relative; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap;
    padding: 14px 18px; margin: 0 0 14px; border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.014) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.bl-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; flex: 1 1 520px; min-width: 0; }
.bl-filterbar .bl-field { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.bl-filterbar .bl-field > span:first-child { font-family: var(--rd-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6b7890; padding-left: 2px; white-space: nowrap; }
.bl-filterbar .bl-field > .bl-range {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; white-space: nowrap;
    font-family: var(--rd-mono); font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: #cbd5e1;
    background: rgba(var(--theme-rgb), .08); border: 1px solid rgba(var(--theme-rgb), .28);
}
.bl-filterbar .bl-custom { display: inline-flex; align-items: center; gap: 6px; }
.bl-filterbar .bl-search-f { flex: 1 1 240px; max-width: 420px; }
.bl-filterbar .bl-search { display: block; position: relative; width: 100%; margin: 0; flex: none; max-width: none; }
.bl-filterbar .bl-search .material-icons { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--rd-faint); pointer-events: none; }
.bl-filterbar .bl-search input { width: 100%; padding-left: 36px; }
.bl-filterbar select:disabled { opacity: .6; }
.bl-actions { display: flex; align-items: center; gap: 10px; }
.bl-actions .mt-source { margin: 0; }
.bl-pdf, .bl-reload {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 10px; cursor: pointer;
    color: #e2e8f0; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); transition: border-color .2s, background .2s, color .2s;
}
.bl-pdf { padding: 0 14px; font-size: 12.5px; font-weight: 600; }
.bl-pdf b { font-weight: 600; letter-spacing: .04em; }
.bl-pdf .material-icons { font-size: 18px; color: var(--theme-color); }
.bl-pdf:hover, .bl-reload:hover { color: #fff; border-color: rgba(var(--theme-rgb), .45); background: rgba(var(--theme-rgb), .12); }
.bl-pdf.is-busy { opacity: .6; cursor: progress; }
.bl-pdf.is-busy .material-icons { animation: mt-cw 1s linear infinite; }
.bl-reload { width: 38px; padding: 0; }
.bl-ring { position: relative; display: block; width: 20px; height: 20px; }
.bl-ring::before, .bl-ring::after { content: ''; position: absolute; border-radius: 50%; border: 2px solid transparent; }
.bl-ring::before { inset: 0; border-color: rgba(255, 255, 255, .55); border-right-color: transparent; }
.bl-ring::after { inset: 25%; border-color: var(--theme-color); border-left-color: transparent; }
.bl-reload.is-spin .bl-ring::before { animation: mt-cw 1s linear infinite; }
.bl-reload.is-spin .bl-ring::after { animation: mt-ccw .8s linear infinite; }
@media (max-width: 768px) {
    .bl-filterbar { padding: 12px 14px; }
    .bl-fields { flex-basis: 100%; }
    .bl-filterbar .bl-field { flex: 1 1 140px; }
    .bl-filterbar .bl-search-f { flex-basis: 100%; max-width: none; }
    .bl-actions { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { .bl-reload.is-spin .bl-ring::before, .bl-reload.is-spin .bl-ring::after, .bl-pdf.is-busy .material-icons { animation-duration: 3s; } }
@media (max-width: 768px) {
    .bl-filterbar .bl-field { flex: 1 1 130px; }
    .bl-filterbar .bl-dd { width: 100%; }
    .bl-filterbar .bl-dd-btn { width: 100%; min-width: 0; }
    .bl-fields { align-items: flex-start; }
}
@media (max-width: 768px) { .bl-filterbar .bl-field.bl-search-f { flex: 1 1 100%; max-width: none; } }
