:root {
    --bg: #15161b;
    --panel: #1d1f27;
    --panel-2: #252836;
    --border: #34384a;
    --text: #f3f4f7;
    --muted: #a7acc0;
    --purple: #8b5cf6;
    --purple-2: #a78bfa;
    --purple-dark: #6d3df0;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --info: #3b82f6;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 28%),
        linear-gradient(180deg, #121318 0%, #171922 100%);
    color: var(--text);
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.card-title,
.page-title {
    color: #ffffff;
    letter-spacing: 0.2px;
}

.page-title {
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.small-note {
    color: #9ca3af;
    font-size: 0.86rem;
}

label,
.form-label {
    color: #cbd5f5;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

strong {
    color: #ffffff;
}

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

/* =========================
   LAYOUT
========================= */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    min-width: 270px;
    background: linear-gradient(180deg, rgba(20, 22, 29, 0.98), rgba(27, 29, 38, 0.98));
    border-right: 1px solid var(--border);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.6rem;
    padding: 0.35rem 0.2rem;
}

.sidebar-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    box-shadow: 0 10px 22px rgba(139, 92, 246, 0.28);
}

.sidebar-brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.sidebar-brand-sub {
    font-size: 0.84rem;
    color: var(--muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    background: transparent;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(139, 92, 246, 0.10);
    border-color: rgba(167, 139, 250, 0.18);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(109, 61, 240, 0.12));
    border-color: rgba(167, 139, 250, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.sidebar-footer {
    color: var(--muted);
    font-size: 0.82rem;
    padding: 0.75rem 0.3rem 0.2rem;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 2rem;
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* =========================
   CARDS / PANELS
========================= */

.card-dark {
    background: rgba(29, 31, 39, 0.92);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    animation: fadeUp 0.35s ease;
    color: #e5e7eb;
}

.card-dark .card-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-dark .small-note {
    color: #9ca3af;
}

.card-dark .total-label {
    color: #cbd5f5;
}

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 65%);
    pointer-events: none;
}

/* =========================
   FORMS
========================= */

.form-control,
.form-select,
textarea {
    background: var(--panel-2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 12px !important;
    padding: 0.8rem 0.95rem !important;
    transition: all 0.18s ease;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.18) !important;
    background: #2b3040 !important;
}

.form-control::placeholder,
textarea::placeholder {
    color: #8e94aa;
}

.form-check-input {
    background-color: var(--panel-2);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--purple);
    border-color: var(--purple);
}

.form-check-label {
    color: var(--text);
}

/* =========================
   BUTTONS
========================= */

.btn-purple {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border: none;
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
    box-shadow: 0 8px 18px rgba(139, 92, 246, 0.28);
}

.btn-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.34);
    color: #fff;
}

.btn-outline-soft {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    transition: all 0.16s ease;
}

.btn-outline-soft:hover {
    border-color: var(--purple-2);
    color: #fff;
    background: rgba(139, 92, 246, 0.08);
}

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #ffb4b4;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    transition: all 0.16s ease;
}

.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fff;
}

/* =========================
   QUOTE / JOB BLOCKS
========================= */

.quote-item {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    animation: fadeUp 0.25s ease;
}

.quote-item strong {
    font-size: 1rem;
}

.quote-item .meta {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.quote-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.total-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 16px;
    padding: 1rem 1.2rem;
}

.total-label {
    color: var(--muted);
    font-size: 0.92rem;
}

.total-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.preview-box {
    background: rgba(139, 92, 246, 0.08);
    border: 1px dashed rgba(167, 139, 250, 0.35);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    color: var(--muted);
}

.mini-item {
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-bottom: 0.55rem;
    background: rgba(255,255,255,0.02);
}

/* =========================
   TABLES
========================= */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: rgba(255,255,255,0.08);
    color: #e5e7eb;
}

.table thead th {
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: rgba(255,255,255,0.08);
}

.table td,
.table th {
    background: transparent !important;
    color: var(--text) !important;
    vertical-align: middle;
}

/* =========================
   STATUS PILLS
========================= */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.12);
}

.status-pill::before {
    content: "●";
    font-size: 0.65rem;
    opacity: 0.8;
}

.status-approved {
    background: rgba(59, 130, 246, 0.18);
}

.status-proof-approved {
    background: rgba(234, 179, 8, 0.18);
}

.status-in-production {
    background: rgba(249, 115, 22, 0.18);
}

.status-ready-for-install---delivery {
    background: rgba(16, 185, 129, 0.18);
}

.status-installed {
    background: rgba(168, 85, 247, 0.18);
}

.status-completed {
    background: rgba(34, 197, 94, 0.18);
}

.status-on-hold {
    background: rgba(239, 68, 68, 0.18);
}

.stuck-badge {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* =========================
   SUMMARY WIDGET
========================= */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.summary-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.summary-name {
    color: #e5e7eb;
    font-weight: 600;
}

.summary-value {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

.summary-approved { background: rgba(59, 130, 246, 0.10); }
.summary-proof { background: rgba(234, 179, 8, 0.10); }
.summary-production { background: rgba(249, 115, 22, 0.10); }
.summary-ready { background: rgba(16, 185, 129, 0.10); }
.summary-complete { background: rgba(34, 197, 94, 0.10); }
.summary-hold { background: rgba(239, 68, 68, 0.10); }

/* =========================
   ATTENTION JOBS
========================= */

.attention-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.attention-job {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.attention-job-header {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    padding: 1rem 1.1rem;
    text-align: left;
    transition: background 0.16s ease;
}

.attention-job-header:hover {
    background: rgba(139, 92, 246, 0.08);
}

.attention-job-header--board {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    align-items: center;
    gap: 1rem;
}

.attention-job-left,
.attention-job-middle {
    min-width: 0;
}

.attention-job-middle {
    display: flex;
    justify-content: center;
}

.attention-job-right {
    text-align: right;
}

.attention-job-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.attention-job-body {
    padding: 1rem 1.1rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.08);
}

/* =========================
   TRAFFIC BAR
========================= */

.traffic-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.traffic-bar-compact {
    justify-content: center;
}

.traffic-step {
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.35rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.traffic-light {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #3b3f4a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.traffic-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a1a1aa;
    text-align: center;
    line-height: 1.1;
}

.traffic-step.is-on .traffic-label {
    color: #ffffff;
}

.traffic-step.stage-design.is-on .traffic-light {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.traffic-step.stage-proof.is-on .traffic-light {
    background: #eab308;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.8);
}

.traffic-step.stage-print.is-on .traffic-light {
    background: #f97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.85);
}

.traffic-step.stage-laminate.is-on .traffic-light {
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.85);
}

.traffic-step.stage-cut.is-on .traffic-light {
    background: #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.85);
}

.traffic-step.stage-install.is-on .traffic-light {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.85);
}

.traffic-step.stage-complete.is-on .traffic-light {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}

/* =========================
   UTILITIES
========================= */

.h-100 {
    height: 100%;
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 1400px) {
    .traffic-step {
        min-width: 82px;
        padding: 0.55rem 0.45rem;
    }

    .traffic-light {
        width: 18px;
        height: 18px;
    }

    .traffic-label {
        font-size: 0.78rem;
    }
}

@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .attention-job-header--board {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 0.8rem;
    }

    .attention-job-left,
    .attention-job-middle,
    .attention-job-right {
        width: 100%;
    }

    .attention-job-middle {
        justify-content: flex-start;
    }

    .attention-job-right {
        text-align: left;
    }

    .traffic-bar-compact {
        justify-content: flex-start;
    }
}

@media (max-width: 991px) {
    .app-shell {
        display: block;
        min-height: auto;
    }

    .main-content {
        padding: 1rem;
        width: 100%;
    }

    .sidebar {
        width: 270px;
        min-width: 270px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        border-right: 1px solid var(--border);
        border-bottom: none;
    }
}

.deadline-pill {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.34rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.10);
}

.deadline-none {
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
}

.deadline-normal {
    background: rgba(59, 130, 246, 0.16);
    color: #dbeafe;
}

.deadline-soon {
    background: rgba(234, 179, 8, 0.16);
    color: #fef3c7;
}

.deadline-today {
    background: rgba(249, 115, 22, 0.18);
    color: #ffedd5;
}

.deadline-overdue {
    background: rgba(239, 68, 68, 0.20);
    color: #fecaca;
}

@media (max-width: 991px) {
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 767px) {
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .page-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .page-toolbar-actions > * {
        flex: 1 1 auto;
        text-align: center;
    }

    .card-dark {
        border-radius: 14px;
    }

    .attention-job-header {
        padding: 0.85rem 0.9rem;
    }

    .attention-job-body {
        padding: 0.9rem;
    }

    .attention-job-title {
        font-size: 0.95rem;
    }

    .traffic-step {
        min-width: 62px;
        padding: 0.38rem 0.28rem;
    }

    .traffic-label {
        font-size: 0.66rem;
    }

    .summary-pill {
        padding: 0.8rem 0.85rem;
        border-radius: 14px;
    }

    .summary-value {
        font-size: 1.05rem;
    }

    .quote-item {
        padding: 0.85rem;
    }

    .total-box {
        padding: 0.9rem 1rem;
    }

    .total-value {
        font-size: 1.6rem;
    }
}
.text-profit-good {
    color: #86efac !important;
    font-weight: 700;
}

.text-profit-bad {
    color: #fca5a5 !important;
    font-weight: 700;
}

.text-profit-neutral {
    color: #e5e7eb !important;
    font-weight: 700;
}

/* Banner style logo */
.sidebar-banner {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin-bottom: 1rem;
}

/* tighten spacing since we removed the icon layout */
.sidebar-brand {
    margin-bottom: 1.2rem;
}
.text-money-good {
    color: #86efac !important;
    font-weight: 700;
}

.text-money-bad {
    color: #fca5a5 !important;
    font-weight: 700;
}

.text-money-neutral {
    color: #e5e7eb !important;
    font-weight: 700;
}

.payment-nest {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}
.check-badge {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    color: #cbd5e1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.check-badge.is-on {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(167, 139, 250, 0.28);
}
.check-badge {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    color: #cbd5e1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.check-badge.is-on {
    color: #ffffff;
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(167, 139, 250, 0.28);
}

.text-money-good {
    color: #86efac !important;
    font-weight: 700;
}

.text-money-bad {
    color: #fca5a5 !important;
    font-weight: 700;
}

.is-complete {
    opacity: 0.6;
}

/* Authentication */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #10131a; color: #edf0f5; }
.auth-card { width: min(440px, 100%); padding: 36px; background: #181d27; border: 1px solid #303746; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.auth-logo { display: block; max-width: 220px; max-height: 90px; margin: 0 auto 28px; object-fit: contain; }
.auth-kicker { margin: 0 0 8px; color: #aeb7c8; font-size: .72rem; font-weight: 800; letter-spacing: .15em; }
.auth-card h1 { margin: 0 0 8px; font-size: 1.8rem; }
.auth-card p { color: #aeb7c8; }
.auth-card label { display: grid; gap: 7px; margin-top: 18px; font-size: .84rem; font-weight: 700; color: #d8deea; }
.auth-card input { width: 100%; padding: 12px 13px; color: #fff; background: #10141c; border: 1px solid #3a4354; border-radius: 7px; outline: none; }
.auth-card input:focus { border-color: #8b95a8; box-shadow: 0 0 0 3px rgba(139,149,168,.15); }
.auth-card button { width: 100%; margin-top: 24px; padding: 12px; color: #10131a; background: #f0f2f5; border: 0; border-radius: 7px; font-weight: 800; cursor: pointer; }
.auth-card button:hover { transform: translateY(-1px); background: #fff; }
.auth-error { margin-top: 18px; padding: 11px 12px; color: #fecaca; background: #3b171b; border: 1px solid #713038; border-radius: 7px; }
.sidebar-user { margin-bottom: 8px; overflow: hidden; color: #cbd5e1; font-size: .78rem; text-overflow: ellipsis; }
.sidebar-logout { padding: 0; color: #94a3b8; background: none; border: 0; font-size: .78rem; cursor: pointer; }
.sidebar-logout:hover { color: #fff; }

/* =========================================================
   PRINT RELAY-INSPIRED PRODUCTION THEME
   ========================================================= */
:root {
    --bg: #111719;
    --panel: #182023;
    --panel-2: #151b1d;
    --panel-raised: #222c2f;
    --border: #344044;
    --text: #c7cfcb;
    --muted: #758084;
    --purple: #dc7929;
    --purple-2: #ff9b47;
    --purple-dark: #b85e1d;
    --danger: #db675f;
    --success: #6dbb75;
    --warning: #d6aa58;
    --info: #6e9eb5;
    --shadow: 0 8px 24px rgba(0,0,0,.42);
    --relay-font: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

html { background: #0d1112; }
body {
    margin: 0;
    background: #111719;
    background-image: linear-gradient(rgba(36,48,51,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(36,48,51,.16) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text);
    font-family: var(--relay-font);
    font-size: 12px;
}

body::after { content: ""; position: fixed; z-index: 9999; pointer-events: none; inset: 0; opacity: .035; background: repeating-linear-gradient(0deg, #fff 0, #fff 1px, transparent 1px, transparent 3px); }
.relay-topbar { position: sticky; z-index: 1050; top: 0; height: 48px; display: flex; align-items: center; padding: 0 14px; color: var(--text); background: linear-gradient(#252d2f,#171d1f); border-bottom: 1px solid #050707; box-shadow: 0 1px 0 var(--border); }
.relay-brand { display: flex; align-items: center; gap: 8px; color: #dce2df; text-decoration: none; letter-spacing: 1px; }
.relay-brand:hover { color: #fff; }
.relay-brand>i { width: 10px; height: 10px; background: var(--purple); clip-path: polygon(0 0,100% 50%,0 100%); }
.relay-brand strong { color: inherit; font-size: 15px; font-weight: 900; }
.relay-brand span { color: var(--muted); font-size: 9px; font-weight: 400; }
.relay-context { display: flex; align-items: center; gap: 22px; margin-left: auto; color: #6f7a77; font-size: 9px; }
.relay-live { color: #899592; }
.relay-live i,.sidebar-environment i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 7px var(--success); animation: relayBlink 2.2s ease-in-out infinite; }

.app-shell { min-height: calc(100vh - 48px); }
.sidebar { top: 48px; width: 224px; min-width: 224px; height: calc(100vh - 48px); padding: 0; background: var(--panel); border-right: 1px solid var(--border); box-shadow: none; }
.sidebar-brand { min-height: 90px; margin: 0; padding: 14px; background: linear-gradient(90deg,var(--panel-raised),var(--panel)); border-bottom: 1px solid var(--border); }
.sidebar-banner { max-width: 170px; max-height: 62px; margin: 0 auto; filter: saturate(.75) contrast(1.08); }
.sidebar-nav { gap: 0; padding: 7px; }
.sidebar-link { position: relative; gap: 9px; padding: 11px 9px; color: #aab4b0; border: 1px solid transparent; border-bottom-color: #2d3638; border-radius: 0; letter-spacing: .04em; text-transform: uppercase; font-size: 10px; transition: background .14s,border-color .14s,color .14s,transform .14s; }
.sidebar-link>span:first-child { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #586164; }
.sidebar-link:hover { color: #e0e6e3; background: #20292b; border-color: #3b474a; transform: translateX(2px); }
.sidebar-link.active { color: #f0f3f1; background: linear-gradient(90deg,rgba(220,121,41,.18),#20292b); border-color: #4b4a42; box-shadow: inset 3px 0 var(--purple); }
.sidebar-link.active>span:first-child { background: var(--purple-2); box-shadow: 0 0 7px rgba(255,155,71,.75); }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--border); background: #151b1d; }
.sidebar-environment { display: block; margin-bottom: 10px; color: #65716e; font-size: 8px; letter-spacing: .1em; }
.sidebar-user { color: #aeb8b4; font-size: 10px; }
.sidebar-logout { color: var(--purple-2); font-family: inherit; font-size: 9px; text-transform: uppercase; }

.main-content { padding: 22px 24px 48px; background: rgba(17,23,25,.86); }
.page-toolbar,.page-header { min-height: 54px; margin: -22px -24px 18px; padding: 10px 16px; background: #141a1c; border-bottom: 1px solid var(--border); }
.page-title,.page-toolbar h1,.page-toolbar h2,.page-header h1 { color: #d7ddda; font-size: 17px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
h1,h2,h3,h4,h5,h6,.card-title { color: #d4dad7; font-family: var(--relay-font); }
.small-note,.text-muted { color: var(--muted)!important; }

.card-dark,.content-card,.modal-content,.dropdown-menu { color: var(--text); background: linear-gradient(180deg,#1c2527,#182023); border: 1px solid var(--border); border-radius: 0; box-shadow: var(--shadow); backdrop-filter: none; animation: relayPanelIn .24s ease both; }
.card-dark::before,.content-card::before { content: ""; display: block; height: 3px; margin: -1px -1px 10px; background: linear-gradient(90deg,var(--purple),transparent 38%); opacity: .7; }
.dashboard-stat-card::after { display: none; }
.dashboard-stat-card { border-left: 3px solid #4b585b; }
.dashboard-stat-card:hover { border-left-color: var(--purple); background: #20292b; transform: translateY(-1px); }
.total-value { color: #dce2df; font-size: 26px!important; letter-spacing: -.05em; }
.total-box { background: #20282a; border: 1px solid var(--border); border-left: 3px solid var(--purple); border-radius: 0; }
.quote-item,.mini-item,.attention-job,.summary-pill,.payment-nest,.preview-box { background: #1a2224; border: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.quote-item:hover,.mini-item:hover,.attention-job:hover { border-color: #4b585b; background: #20292b; }

.form-control,.form-select,textarea,.auth-card input { min-height: 34px; padding: 7px 9px!important; color: var(--text)!important; background: #151b1d!important; border: 1px solid var(--border)!important; border-radius: 0!important; font-family: var(--relay-font); font-size: 11px; }
.form-control:focus,.form-select:focus,textarea:focus,.auth-card input:focus { background: #182023!important; border-color: var(--purple)!important; box-shadow: inset 3px 0 var(--purple),0 0 0 1px rgba(220,121,41,.12)!important; }
label,.form-label { color: #818c88; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.form-check-input { border-radius: 0!important; background-color: #111719; }
.form-check-input:checked { background-color: var(--purple); border-color: var(--purple-2); }

.btn { border-radius: 0; font-family: var(--relay-font); font-size: 10px; letter-spacing: .035em; text-transform: uppercase; }
.btn-purple { padding: 8px 12px; color: #1a0f08; background: var(--purple); border: 1px solid var(--purple-2); border-radius: 0; box-shadow: none; }
.btn-purple:hover { color: #160d06; background: var(--purple-2); box-shadow: 0 0 14px rgba(220,121,41,.28); transform: translateY(-1px); }
.btn-outline-soft,.btn-danger-soft { padding: 8px 12px; border-radius: 0; box-shadow: none; }
.btn-outline-soft { color: #aeb8b4; background: #151b1d; border-color: var(--border); }
.btn-outline-soft:hover { color: #e6ebe8; background: #222c2f; border-color: #596568; }
.btn-danger-soft { color: #df7770; background: #26191a; border-color: #71433f; }

.table { --bs-table-color: var(--text); --bs-table-border-color: #303a3d; font-size: 10px; }
.table thead th { color: #838e8a!important; background: linear-gradient(#222c2f,#1b2325)!important; border-bottom: 1px solid #4a5659; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.table td,.table th { padding: 10px 9px; }
.table tbody tr:hover td { background: #20292b!important; }

.status-pill,.deadline-pill,.check-badge,.badge { padding: 4px 7px; border-radius: 1px; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; }
.alert { border-radius: 0; border-width: 1px 1px 1px 3px; font-size: 10px; }
.accordion-item,.accordion-button { color: var(--text); background: var(--panel); border-color: var(--border); border-radius: 0!important; }
.accordion-button:not(.collapsed) { color: var(--purple-2); background: #20292b; box-shadow: inset 3px 0 var(--purple); }
.modal-header,.modal-footer { border-color: var(--border); }

.auth-page { background-color: #0d1112; background-image: linear-gradient(rgba(36,48,51,.38) 1px,transparent 1px),linear-gradient(90deg,rgba(36,48,51,.38) 1px,transparent 1px); background-size: 24px 24px; }
.auth-card { border-radius: 0; background: var(--panel); border: 1px solid #4b585b; box-shadow: 0 20px 70px #000c; }
.auth-card::before { content: "AUTHENTICATION / SECURE ACCESS"; display: block; margin: -36px -36px 26px; padding: 10px 12px; color: #8f9996; background: linear-gradient(90deg,var(--panel-raised),var(--panel)); border-bottom: 1px solid var(--border); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.auth-card button { color: #1a0f08; background: var(--purple); border: 1px solid var(--purple-2); border-radius: 0; font-family: var(--relay-font); text-transform: uppercase; }
.auth-card button:hover { background: var(--purple-2); box-shadow: 0 0 18px rgba(220,121,41,.35); }
.auth-kicker { color: var(--purple-2); }

.traffic-step { border-radius: 0!important; }
.traffic-step.is-on { box-shadow: inset 0 -2px var(--purple); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #0e1314; }
::-webkit-scrollbar-thumb { background: #344044; border: 2px solid #0e1314; }
::-webkit-scrollbar-thumb:hover { background: #536064; }
::selection { color: #160d06; background: var(--purple-2); }

@keyframes relayPanelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes relayBlink { 0%,100% { opacity: 1; } 50% { opacity: .42; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms!important; animation-iteration-count: 1!important; scroll-behavior: auto!important; transition-duration: .001ms!important; } }
@media (max-width: 900px) {
    .relay-brand span,.relay-context>span:last-child { display: none; }
    .sidebar { width: 184px; min-width: 184px; }
    .main-content { padding: 18px 14px 42px; }
    .page-toolbar,.page-header { margin: -18px -14px 16px; }
}
@media (max-width: 720px) {
    .app-shell { display: block; }
    .sidebar { position: relative; top: 0; width: 100%; height: auto; }
    .sidebar-brand,.sidebar-footer { display: none; }
    .sidebar-nav { display: grid; grid-template-columns: repeat(3,1fr); }
    .sidebar-link { justify-content: center; padding: 10px 4px; font-size: 8px; }
    .sidebar-link>span:first-child { display: none; }
}
.skip-link { position: fixed; z-index: 99999; top: 6px; left: 8px; padding: 8px 10px; color: #160d06; background: var(--purple-2); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.relay-activated { animation: relaySignal .25s ease; }
@keyframes relaySignal { 50% { box-shadow: inset 3px 0 var(--purple),0 0 10px rgba(220,121,41,.2); } }
.diagnostic-row { display: grid; grid-template-columns: 10px minmax(130px,.7fr) 130px 2fr; align-items: center; gap: 10px; padding: 11px 8px; border-bottom: 1px solid var(--border); font-size: 10px; }
.diagnostic-row strong { color: #cbd2cf; }
.diagnostic-row>span:nth-child(3) { font-size: 8px; letter-spacing: .08em; }
.diagnostic-row small { color: var(--muted); }
.diagnostic-light { width: 7px; height: 7px; border-radius: 50%; }
.diagnostic-row.is-ready .diagnostic-light { background: var(--success); box-shadow: 0 0 7px var(--success); }
.diagnostic-row.is-ready>span:nth-child(3) { color: var(--success); }
.diagnostic-row.is-failed .diagnostic-light { background: var(--danger); box-shadow: 0 0 7px var(--danger); }
.diagnostic-row.is-failed>span:nth-child(3) { color: var(--danger); }
@media(max-width:720px){.diagnostic-row{grid-template-columns:10px 1fr auto}.diagnostic-row small{grid-column:2/-1}}
.production-board{display:grid;grid-template-columns:repeat(7,minmax(220px,1fr));gap:5px;padding-bottom:12px;overflow-x:auto}.board-column{min-height:550px;background:#151c1e;border:1px solid var(--border)}.board-column>header{display:flex;justify-content:space-between;padding:10px;color:#8f9996;background:linear-gradient(90deg,var(--panel-raised),var(--panel));border-bottom:1px solid var(--border);font-size:9px}.board-column>header span{color:var(--purple-2)}.board-card{margin:7px;padding:9px;background:#1d2628;border:1px solid #3b4749;border-left:3px solid #536064;box-shadow:0 5px 12px #0006}.board-card:hover{border-left-color:var(--purple)}.board-card a{color:var(--text);text-decoration:none}.board-card a>*{display:block}.board-card a span{margin-top:5px}.board-card a small{margin:6px 0;color:var(--muted);font-size:8px}.board-card .form-select{min-height:28px!important;padding:4px!important;font-size:8px}.report-metrics{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.report-metrics article{padding:14px;background:linear-gradient(#20292b,#182023);border:1px solid var(--border);border-top:2px solid var(--purple)}.report-metrics small,.report-metrics strong{display:block}.report-metrics small{color:var(--muted);font-size:8px}.report-metrics strong{margin-top:8px;color:#dce2df;font-size:18px}@media(max-width:1100px){.report-metrics{grid-template-columns:repeat(3,1fr)}}@media(max-width:620px){.report-metrics{grid-template-columns:repeat(2,1fr)}}
.pdf-centre-layout{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:calc(100vh - 145px);border:1px solid var(--border);background:#111719}.pdf-control-panel{padding:12px;background:var(--panel);border-right:1px solid var(--border);overflow:auto}.panel-title-relay{margin:0 -12px 14px;padding:9px 10px;color:#8f9996;background:linear-gradient(90deg,var(--panel-raised),var(--panel));border-bottom:1px solid var(--border);font-size:9px;font-weight:700;letter-spacing:.1em}.pdf-live-stage{position:relative;display:grid;grid-template-rows:34px 1fr;min-width:0;background-image:linear-gradient(#24303355 1px,transparent 1px),linear-gradient(90deg,#24303355 1px,transparent 1px);background-size:24px 24px}.pdf-stage-bar{display:flex;align-items:center;justify-content:space-between;padding:0 10px;color:#778380;background:#151c1e;border-bottom:1px solid var(--border);font-size:9px;letter-spacing:.08em}.pdf-stage-bar i{display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--success);box-shadow:0 0 7px var(--success)}#pdf-preview{width:100%;height:100%;min-height:700px;border:0;background:#4a5050}.pdf-loading-screen{position:absolute;z-index:4;inset:34px 0 0;display:grid;place-content:center;justify-items:center;gap:10px;color:#778481;background:#111719;transition:opacity .25s,visibility .25s}.pdf-loading-screen.is-hidden{opacity:0;visibility:hidden}.pdf-loading-screen strong{color:var(--purple-2);letter-spacing:.14em}.relay-loader{display:flex;gap:5px;height:36px;align-items:end}.relay-loader i{display:block;width:7px;background:var(--purple);animation:relayLoad .8s ease-in-out infinite alternate}.relay-loader i:nth-child(2){animation-delay:.12s}.relay-loader i:nth-child(3){animation-delay:.24s}.relay-loader i:nth-child(4){animation-delay:.36s}.pdf-version-row{display:block;padding:9px 7px;color:var(--text);text-decoration:none;border-bottom:1px solid var(--border)}.pdf-version-row:hover{background:#20292b;color:#fff}.pdf-version-row strong,.pdf-version-row small{display:block}.pdf-version-row small{margin-top:4px;color:var(--muted);font-size:8px}@keyframes relayLoad{from{height:8px;opacity:.35}to{height:34px;opacity:1}}@media(max-width:900px){.pdf-centre-layout{grid-template-columns:1fr}.pdf-control-panel{border-right:0;border-bottom:1px solid var(--border)}#pdf-preview{min-height:620px}}
