/* Create this file if it doesn't exist to prevent 404 errors */

/* Basic styles for the portal */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Common styles for cards and containers */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Styles for the supplier and client selection in contract form */
.list-group-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: #000;
    border-color: #dee2e6;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Other common styles */
.table-responsive {
    overflow-x: auto;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}


/* ---------------- Modern Design Tokens (Mobilization) ---------------- */
:root {
    /* Color Palette */
    --color-primary:#0066CC;
    --color-primary-hover:#004c99;
    --color-bg:#f5f7fb;
    --color-surface:#ffffff;
    --color-surface-alt:#f0f3f8;
    --color-border:#dee3ea;
    --color-border-strong:#c9d1dc;
    --color-text:#212529;
    --color-text-muted:#6c757d;
    --color-success:#00A86B;
    --color-warning:#FFB84D;
    --color-danger:#DC3545;
    --color-info:#17A2B8;
    --radius-xs:4px;
    --radius-sm:6px;
    --radius-md:10px;
    --radius-lg:14px;
    --shadow-sm:0 2px 4px rgba(0,0,0,.06);
    --shadow-md:0 4px 12px rgba(0,0,0,.08);
    --transition-fast:.15s ease;
    --transition-medium:.25s cubic-bezier(.4,0,.2,1);
    --gradient-primary:linear-gradient(90deg,#0066CC,#1684ff);
    --gradient-success:linear-gradient(90deg,#00A86B,#14c483);
    --gradient-warning:linear-gradient(90deg,#FFB84D,#ff9f1f);
    --gradient-danger:linear-gradient(90deg,#DC3545,#ff4d5d);
}

body.mob-modern-enabled { background: var(--color-bg); }

/* Global Navbar Modernization */
.mob-global-navbar { background: var(--color-surface); border-bottom:1px solid var(--color-border); backdrop-filter:blur(8px); }
.mob-global-navbar { position:sticky; top:0; z-index:1045; }
/* Ensure dropdown menus always overlay cards/animated sections */
.navbar .dropdown-menu { z-index:2000; }
:root[data-theme='dark'] .navbar .dropdown-menu { z-index:2000; }
.mob-global-navbar .navbar-brand { font-weight:600; letter-spacing:.5px; display:flex; align-items:center; gap:.4rem; }
.mob-global-navbar .nav-link { font-weight:500; color:var(--color-text-muted); position:relative; transition:color var(--transition-fast); }
.mob-global-navbar .nav-link:hover, .mob-global-navbar .nav-link:focus { color:var(--color-text); }
.mob-global-navbar .nav-link.active, .mob-global-navbar .dropdown.show > .nav-link { color:var(--color-primary); }
.mob-global-navbar .dropdown-menu { border-radius: var(--radius-md); box-shadow:var(--shadow-md); border:1px solid var(--color-border); }
.mob-global-navbar .dropdown-item { font-size:.8rem; }

/* Elevate generic cards to modern look (applied across legacy pages) */
.card { border-radius: var(--radius-lg); border:1px solid var(--color-border); box-shadow:var(--shadow-sm); transition: box-shadow var(--transition-fast), transform var(--transition-fast); }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { font-weight:600; }

/* Modern form elements */
input.form-control, select.form-select, textarea.form-control { border-radius: var(--radius-sm); transition:border-color var(--transition-fast), box-shadow var(--transition-fast); }
input.form-control:focus, select.form-select:focus, textarea.form-control:focus { box-shadow:0 0 0 3px rgba(0,102,204,.15); border-color:var(--color-primary); }

/* Tables modernization */
table.table { font-size:.82rem; }
table.table thead th { text-transform:uppercase; font-size:.6rem; letter-spacing:.5px; font-weight:600; }
table.table tbody tr { transition:background var(--transition-fast); }
table.table tbody tr:hover { background: var(--color-surface-alt); }

/* Badge polish */
.badge { font-weight:500; letter-spacing:.3px; }

/* Generic utility buttons alignment */
.btn { border-radius: var(--radius-sm); font-weight:500; }
.btn-sm { font-size:.7rem; font-weight:600; letter-spacing:.4px; }

/* Toast container refine */
.toast { border-radius: var(--radius-md); box-shadow:var(--shadow-md); }

/* Page header & filter bar */
.mob-page-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; gap:1rem; }
.mob-page-title { font-size:1.25rem; font-weight:600; letter-spacing:-.25px; margin:0; }
.mob-filter-bar { background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); padding:.65rem .9rem; box-shadow:var(--shadow-sm); }
.mob-filter-bar input.form-control-sm, .mob-filter-bar .form-select-sm { font-size:.7rem; }

/* Table skeleton lines */
.mob-table-skel-row .mob-skel-line { display:block; width:70%; height:12px; border-radius:6px; }
tbody.loading { position:relative; }
tbody.loading .mob-table-skel-row .mob-skel-line { animation:skeleton 1.1s infinite; }

/* Utility adjustments */
.table-sm th, .table-sm td { padding:.45rem .65rem; }

:root[data-theme='dark'] .mob-filter-bar { background:var(--color-surface); border-color:var(--color-border); }

/* Light/Dark adjustments for newly added global elements */
:root[data-theme='dark'] .mob-global-navbar { background:#182029; border-color:var(--color-border); }
:root[data-theme='dark'] .mob-global-navbar .nav-link { color:var(--color-text-muted); }
:root[data-theme='dark'] .mob-global-navbar .nav-link:hover { color:var(--color-text); }
:root[data-theme='dark'] .card { background:var(--color-surface); }
:root[data-theme='dark'] table.table tbody tr:hover { background:#2a3541; }
:root[data-theme='dark'] input.form-control, :root[data-theme='dark'] select.form-select, :root[data-theme='dark'] textarea.form-control { background:#1d232b; border-color:#2f3b47; color:var(--color-text); }
:root[data-theme='dark'] input.form-control:focus, :root[data-theme='dark'] select.form-select:focus, :root[data-theme='dark'] textarea.form-control:focus { border-color:#3d8dff; box-shadow:0 0 0 3px rgba(61,141,255,.25); }


/* ---------------- Generic Enhancements ---------------- */
.mob-fade-in { animation:mobiFade .35s var(--transition-medium); }
@keyframes mobiFade { from {opacity:0; transform:translateY(6px);} to {opacity:1; transform:translateY(0);} }

/* Scrollbar (webkit) */
body::-webkit-scrollbar { width:10px; }
body::-webkit-scrollbar-track { background:transparent; }
body::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.15); border-radius:20px; }
body::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,0.3); }

/* ---------------- Process List Items ---------------- */
.mob-process-item {
    border:1px solid var(--color-border);
    border-radius:8px;
    margin:.25rem 0;
    background: var(--color-surface);
    box-shadow:0 1px 2px rgba(0,0,0,.05);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    position:relative;
    width:100%;
    padding:.65rem .75rem;
}
.mob-process-item:hover { background:var(--color-surface-alt); }
.mob-process-item.active { border-color: var(--color-primary); background:var(--color-surface-alt); box-shadow:0 0 0 1px var(--color-primary), 0 2px 4px rgba(0,0,0,.06); }
.mob-process-item .badge { font-weight:500; letter-spacing:.25px; }

/* Scroll panel for process list */
.mob-scroll-panel { max-height: calc(100vh - 260px); overflow-y:auto; overflow-x:hidden; position:relative; padding-right:4px; }
.mob-scroll-panel::-webkit-scrollbar { width: 10px; }
.mob-scroll-panel::-webkit-scrollbar-track { background: var(--color-surface-alt, #f1f3f5); border-radius: 8px; }
.mob-scroll-panel::-webkit-scrollbar-thumb { background: linear-gradient(var(--color-primary,#0d6efd), var(--color-primary-accent,#3b82f6)); border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.mob-scroll-panel::-webkit-scrollbar-thumb:hover { filter: brightness(1.1); }
.mob-scroll-panel { scrollbar-width: thin; scrollbar-color: var(--color-primary,#0d6efd) var(--color-surface-alt,#f1f3f5); }

/* ---------------- Status Badge w/ Icons ---------------- */
.mob-status-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .55rem; border-radius: 999px; font-size:.675rem; font-weight:600; letter-spacing:.4px; text-transform:uppercase; background:var(--color-border); color:var(--color-text); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.mob-status-badge[data-status=approved]{ background:var(--gradient-success); color:#fff; }
.mob-status-badge[data-status=rejected]{ background:var(--gradient-danger); color:#fff; }
.mob-status-badge[data-status=pending], .mob-status-badge[data-status=waiting_docs]{ background:var(--gradient-warning); color:#553700; }
.mob-status-badge[data-status=under_review]{ background:var(--gradient-primary); color:#fff; }
.mob-status-badge[data-status=in_progress]{ background:var(--color-info); color:#fff; }

/* ---------------- Stage Timeline ---------------- */
.mob-stage-timeline { list-style:none; padding-left:0; margin:0; position:relative; }
.mob-stage-timeline:before { content:""; position:absolute; left:13px; top:0; bottom:0; width:2px; background:linear-gradient(to bottom, var(--color-border), transparent 85%); }
.mob-stage-item { position:relative; border:none !important; background:transparent; margin:0; padding:.6rem .75rem .6rem 2.25rem; cursor:pointer; border-radius:var(--radius-sm); transition:background var(--transition-fast); }
.mob-stage-item:hover { background:rgba(0,102,204,0.06); }
.mob-stage-item:focus { outline:2px solid var(--color-primary); outline-offset:2px; }
.mob-stage-item .mob-stage-caret { width:16px; height:16px; margin-right:.5rem; display:inline-flex; align-items:center; justify-content:center; transition:transform var(--transition-medium); opacity:.55; }
.mob-stage-item:hover .mob-stage-caret { opacity:.9; }
.mob-stage-item.active .mob-stage-caret { transform:rotate(180deg); opacity:1; }
.mob-stage-item .mob-stage-label { position:relative; }
.mob-stage-item .mob-stage-label:after { content:"Clique para expandir"; position:absolute; left:0; top:100%; font-size:.6rem; letter-spacing:.5px; text-transform:uppercase; color:var(--color-text-muted); opacity:0; transform:translateY(-2px); transition:opacity .25s, transform .25s; pointer-events:none; }
.mob-stage-item:hover .mob-stage-label:after { opacity:1; transform:translateY(0); }
.mob-stage-item:before { content:""; position:absolute; width:14px; height:14px; left:7px; top:50%; transform:translateY(-50%); border-radius:50%; background:#fff; border:3px solid var(--color-border); box-shadow:0 0 0 3px #fff; transition: border-color var(--transition-fast), background var(--transition-fast); }
.mob-stage-item[data-stage-status=approved]:before { border-color:var(--color-success); background:var(--color-success); }
.mob-stage-item[data-stage-status=rejected]:before { border-color:var(--color-danger); background:var(--color-danger); }
.mob-stage-item[data-stage-status=under_review]:before { border-color:var(--color-primary); background:var(--color-primary); }
.mob-stage-item[data-stage-status=pending]:before, .mob-stage-item[data-stage-status=waiting_docs]:before { border-color:var(--color-warning); background:var(--color-warning); }
.mob-stage-item.active { background:var(--color-surface-alt); }
.mob-stage-item.is-locked { opacity:.55; filter:grayscale(.35); cursor:not-allowed; }
.mob-stage-item.is-locked:hover { background:transparent; }
.mob-stage-item.is-locked:before { border-color:#b0b8c2; background:#b0b8c2; }
.mob-stage-item.is-locked .mob-stage-label:after { content:"Bloqueada"; }

/* Stage actions */
.mob-stage-item .btn-group { opacity:0; transform:translateX(-4px); transition:opacity var(--transition-fast), transform var(--transition-fast); }
.mob-stage-item:hover .btn-group { opacity:1; transform:translateX(0); }

/* ---------------- Progress Bar Modern ---------------- */
.progress.mobilization-progress { background:var(--color-border); border-radius:999px; overflow:hidden; height:10px; }
.progress.mobilization-progress .progress-bar { background:var(--gradient-success); box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); }

/* ---------------- Document Table ---------------- */
#mob-stage-documents-panel { animation:mobiFade .35s var(--transition-medium); }
table.mob-docs-table { --row-hover:rgba(0,0,0,0.035); }
table.mob-docs-table thead th { font-size:.675rem; letter-spacing:.5px; text-transform:uppercase; background:var(--color-surface-alt); }
table.mob-docs-table tbody tr { transition:background var(--transition-fast); }
table.mob-docs-table tbody tr:hover { background:var(--row-hover); }
table.mob-docs-table .badge { font-size:.6rem; padding:.35rem .5rem; border-radius:var(--radius-sm); }
tr.table-danger.small { background:rgba(220,53,69,.08)!important; }

/* Upload inline label button */
label.btn-outline-secondary input[type=file] + span, label.btn-outline-secondary { position:relative; }
label.btn-outline-secondary:hover { background:var(--color-surface-alt); }

/* ---------------- Modal Polish ---------------- */
.modal-content { border:1px solid var(--color-border); box-shadow:var(--shadow-md); border-radius:var(--radius-lg); }
.modal-header { background:var(--color-surface-alt); }

/* ---------------- Utilities ---------------- */
.text-gradient-primary { background:var(--gradient-primary); -webkit-background-clip:text; background-clip:text; color:transparent; }
.shadow-hover-sm { transition:box-shadow var(--transition-fast), transform var(--transition-fast); }
.shadow-hover-sm:hover { box-shadow:var(--shadow-md)!important; transform:translateY(-2px); }

/* Skeleton Placeholder (simple shimmer) */
.mob-skeleton { position:relative; overflow:hidden; background:linear-gradient(100deg,#e2e6ea 30%,#f1f4f7 50%,#e2e6ea 70%); background-size:200% 100%; animation:skeleton 1.2s infinite; border-radius:6px; }
@keyframes skeleton { from {background-position:200% 0;} to {background-position:-200% 0;} }

/* Dashboard KPI Cards */
.mob-kpi-card { position:relative; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); padding:.9rem .95rem .85rem; display:flex; flex-direction:column; gap:.35rem; overflow:hidden; isolation:isolate; }
.mob-kpi-card:before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 85% 15%,rgba(0,102,204,.18),transparent 60%); opacity:.75; pointer-events:none; }
.mob-kpi-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); transition:box-shadow var(--transition-medium), transform var(--transition-medium); }
.mob-kpi-icon { width:42px; height:42px; border-radius:12px; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.25rem; box-shadow:0 4px 10px -3px rgba(0,102,204,.45); }
.mob-kpi-card[data-theme="green"] .mob-kpi-icon { background:var(--gradient-success); box-shadow:0 4px 10px -3px rgba(0,168,107,.45); }
.mob-kpi-card[data-theme="amber"] .mob-kpi-icon { background:var(--gradient-warning); box-shadow:0 4px 10px -3px rgba(255,159,31,.45); }
.mob-kpi-card[data-theme="red"] .mob-kpi-icon { background:var(--gradient-danger); box-shadow:0 4px 10px -3px rgba(220,53,69,.45); }
.mob-kpi-label { font-size:.65rem; text-transform:uppercase; letter-spacing:.6px; font-weight:600; color:var(--color-text-muted); }
.mob-kpi-value { font-size:1.55rem; font-weight:600; line-height:1.1; letter-spacing:-.5px; }
.mob-kpi-badges span { font-size:.55rem; font-weight:500; background:var(--color-surface-alt); padding:.25rem .45rem; border-radius:999px; margin-right:.3rem; }
.mob-kpi-card .mob-skeleton { height:22px; margin:.25rem 0; }

/* Chart card polish */
.mob-chart-card .card-header { background:var(--color-surface-alt); border-bottom:1px solid var(--color-border); font-size:.7rem; letter-spacing:.5px; text-transform:uppercase; font-weight:600; }
.mob-chart-wrapper { position:relative; min-height:180px; display:flex; align-items:center; justify-content:center; }
.mob-chart-skel { position:absolute; inset:0; display:grid; grid-template-rows:repeat(6,1fr); gap:.45rem; padding:.8rem 1.2rem; }
.mob-chart-skel span { height:12px; }
.mob-chart-wrapper.loading canvas { opacity:0; }
.mob-chart-wrapper:not(.loading) .mob-chart-skel { display:none; }

/* Attention table skeleton */
#mob-table-attention.loading tbody { opacity:.35; }

/* Fade-in utility after load */
.mob-soft-fade { animation:softFade .45s ease; }
@keyframes softFade { from { opacity:0; transform:translateY(6px);} to {opacity:1; transform:translateY(0);} }

/* Segmented Control (modern buttons) */
.mob-segment-group { display:inline-flex; background:var(--color-surface-alt); border:1px solid var(--color-border); border-radius:999px; padding:2px; gap:2px; position:relative; }
.mob-segment-btn { --seg-color:#2563eb; position:relative; border:0; background:transparent; color:var(--color-text-muted); font-size:.65rem; font-weight:600; letter-spacing:.4px; padding:.45rem .9rem; line-height:1; border-radius:999px; cursor:pointer; transition:color .25s ease; }
.mob-segment-btn[data-theme="neutral"] { --seg-color:#64748b; }
.mob-segment-btn.active { color:#fff; text-shadow:0 1px 1px rgba(0,0,0,.25); font-weight:700; }
.mob-segment-btn { color: #495057; }
.mob-segment-group { backdrop-filter: blur(6px); }
.mob-segment-slider { filter:saturate(1.15); }

/* Higher contrast adjustments (light mode) */
.mob-segment-group .mob-segment-btn { font-weight:600; }
.mob-segment-group .mob-segment-btn.active { letter-spacing:.5px; }
.mob-segment-group .mob-segment-slider { background:linear-gradient(135deg,#0057ad 0%,#1173d8 60%,#0b5aa8 100%); }
.mob-kpi-card { color:var(--color-text); }
.mob-kpi-label { color: #495057; }


/* Dark Mode Theme */
:root[data-theme='dark'] {
    --color-bg:#11161c;
    --color-surface:#1b232c;
    --color-surface-alt:#242e3a;
    --color-border:#2f3b47;
    --color-border-strong:#425463;
    --color-text:#e5e9ef;
    --color-text-muted:#9aa7b4;
    --gradient-primary:linear-gradient(90deg,#1d63b8,#3d8dff);
    --gradient-success:linear-gradient(90deg,#029a63,#16d485);
    --gradient-warning:linear-gradient(90deg,#ffb84d,#ff9f1f);
    --gradient-danger:linear-gradient(90deg,#e04453,#ff5d6c);
}
:root[data-theme='dark'] body { background: var(--color-bg)!important; color: var(--color-text); }
:root[data-theme='dark'] body.mob-modern-enabled { background: var(--color-bg); }
:root[data-theme='dark'] a { color:#5ca9ff; }
:root[data-theme='dark'] a:hover { color:#82c2ff; }
:root[data-theme='dark'] .card { background:var(--color-surface); border-color:var(--color-border); box-shadow:0 4px 14px -6px rgba(0,0,0,.7); }
:root[data-theme='dark'] .table { color:var(--color-text); }
:root[data-theme='dark'] .table thead { background:var(--color-surface-alt); color:var(--color-text-muted); }
:root[data-theme='dark'] .table tbody tr { background:var(--color-surface); }
:root[data-theme='dark'] .table tbody tr:hover { background:#2a3541; }
:root[data-theme='dark'] .navbar, :root[data-theme='dark'] header { background: #182029 !important; }
:root[data-theme='dark'] .btn-outline-secondary { color:var(--color-text-muted); border-color:var(--color-border); }
:root[data-theme='dark'] .btn-outline-secondary:hover { color:var(--color-text); background:var(--color-surface-alt); }
:root[data-theme='dark'] .btn-outline-primary { color:#5ca9ff; border-color:#2f5375; }
:root[data-theme='dark'] .btn-outline-primary:hover { background:#204663; color:#fff; border-color:#204663; }
:root[data-theme='dark'] .btn-primary { background:#1d63b8; border-color:#1d63b8; }
:root[data-theme='dark'] .btn-primary:hover { background:#15518f; }
:root[data-theme='dark'] .form-control, :root[data-theme='dark'] .form-select { background:#1d232b; border:1px solid #2f3b47; color:var(--color-text); }
:root[data-theme='dark'] .form-control:focus, :root[data-theme='dark'] .form-select:focus { border-color:#3d8dff; box-shadow:0 0 0 3px rgba(61,141,255,.25); }
:root[data-theme='dark'] .form-label, :root[data-theme='dark'] label { color:var(--color-text); }
:root[data-theme='dark'] .form-text, :root[data-theme='dark'] small.text-muted { color:var(--color-text-muted)!important; }
:root[data-theme='dark'] ::placeholder { color:#7c8a96!important; opacity:1; }
:root[data-theme='dark'] :-ms-input-placeholder { color:#7c8a96!important; }
:root[data-theme='dark'] ::-ms-input-placeholder { color:#7c8a96!important; }
:root[data-theme='dark'] input.form-control:disabled, :root[data-theme='dark'] select.form-select:disabled, :root[data-theme='dark'] textarea.form-control:disabled { background:#202a33; color:#778491; border-color:#2f3b47; }
:root[data-theme='dark'] .input-group-text { background:#242e3a; border-color:#2f3b47; color:var(--color-text-muted); }
:root[data-theme='dark'] .form-check-input { background:#1d232b; border-color:#3a4652; }
:root[data-theme='dark'] .form-check-input:checked { background-color:#3d8dff; border-color:#3d8dff; }
:root[data-theme='dark'] .form-select option { background:#1d232b; color:var(--color-text); }
:root[data-theme='dark'] textarea.form-control { resize:vertical; }
:root[data-theme='dark'] input.form-control:-webkit-autofill,
:root[data-theme='dark'] textarea.form-control:-webkit-autofill,
:root[data-theme='dark'] select.form-select:-webkit-autofill { -webkit-box-shadow:0 0 0px 1000px #1d232b inset; -webkit-text-fill-color:var(--color-text); caret-color:var(--color-text); }

/* Higher contrast required asterisk */
:root[data-theme='dark'] .form-label.required:after { content:' *'; color:var(--color-danger); }
:root[data-theme='dark'] .mob-segment-btn { color:var(--color-text-muted); }
:root[data-theme='dark'] .mob-segment-btn.active { color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); }
:root[data-theme='dark'] .mob-segment-group { background:#1d242c; border-color:#2a3541; }
:root[data-theme='dark'] .mob-segment-slider { background:linear-gradient(135deg,#1d63b8 0%,#114774 70%,#0c3556 100%); }
:root[data-theme='dark'] .mob-kpi-card { background:var(--color-surface); }
:root[data-theme='dark'] .mob-kpi-label { color:#8ea0b1; }
:root[data-theme='dark'] .mob-chart-wrapper.loading canvas { opacity:0; }
:root[data-theme='dark'] .badge.bg-light { background:#2c3944!important; color:#b9c5cf!important; }
:root[data-theme='dark'] .mob-filter-chip { background:#1d242c; border-color:#2a3541; }
:root[data-theme='dark'] .mob-filter-chip.active { background:var(--gradient-primary); box-shadow:0 2px 8px -2px rgba(0,0,0,.7); }
:root[data-theme='dark'] .modal-content { background:var(--color-surface); }
:root[data-theme='dark'] code, :root[data-theme='dark'] pre { background:#1f2933; color:#d4e4f4; }
:root[data-theme='dark'] hr { border-color:var(--color-border); }
:root[data-theme='dark'] .dropdown-menu { background:var(--color-surface); border-color:var(--color-border); }
:root[data-theme='dark'] .dropdown-item { color:var(--color-text); }
:root[data-theme='dark'] .dropdown-item:hover { background:var(--color-surface-alt); }

:root[data-theme='dark'] .mob-kpi-card:before { background:radial-gradient(circle at 85% 15%,rgba(61,141,255,.25),transparent 60%); }
:root[data-theme='dark'] .mob-kpi-card { border-color:var(--color-border); box-shadow:0 4px 18px -6px rgba(0,0,0,.55); }
:root[data-theme='dark'] .mob-chart-card .card-header { background:var(--color-surface-alt); border-color:var(--color-border); }
:root[data-theme='dark'] .mob-segment-group { background:#1f2933; border-color:#2d3a45; }
:root[data-theme='dark'] .mob-segment-btn { color:var(--color-text-muted); }
:root[data-theme='dark'] .mob-segment-btn.active { color:#fff; }
:root[data-theme='dark'] .mob-segment-slider { box-shadow:0 4px 14px -4px rgba(0,0,0,.6); }
:root[data-theme='dark'] table.table tbody tr { border-color:var(--color-border); }
:root[data-theme='dark'] .mob-age-badge { background:#2c3944; color:#bec9d3; }
:root[data-theme='dark'] .mob-age-danger .mob-age-badge { background:rgba(220,53,69,.25); color:#ff9da6; }
:root[data-theme='dark'] .mob-age-warn .mob-age-badge { background:rgba(255,193,7,.25); color:#ffd27a; }
:root[data-theme='dark'] .mob-skeleton { background:linear-gradient(100deg,#2a3945 30%,#324350 50%,#2a3945 70%); }

/* Dark mode toggle button */
.mob-dark-toggle { border:1px solid var(--color-border); background:var(--color-surface); color:var(--color-text-muted); border-radius:999px; padding:.4rem .75rem; font-size:.65rem; font-weight:600; letter-spacing:.5px; display:inline-flex; align-items:center; gap:.4rem; cursor:pointer; transition:background .25s,color .25s,border-color .25s; }
.mob-dark-toggle:hover { background:var(--color-surface-alt); color:var(--color-text); }
:root[data-theme='dark'] .mob-dark-toggle { background:var(--color-surface-alt); color:var(--color-text-muted); }
:root[data-theme='dark'] .mob-dark-toggle:hover { background:var(--color-surface); }
.mob-segment-btn:focus-visible { outline:2px solid var(--seg-color); outline-offset:2px; }
.mob-segment-slider { position:absolute; top:2px; left:2px; height:calc(100% - 4px); width:0; background:linear-gradient(135deg,var(--seg-color) 0%, var(--seg-color) 60%, rgba(255,255,255,.15) 100%); border-radius:999px; box-shadow:0 4px 12px -4px rgba(0,0,0,.25); transition: all .35s cubic-bezier(.65,.05,.36,1); }
.mob-segment-group[data-ready="1"] .mob-segment-slider { width:var(--seg-w); transform:translateX(var(--seg-x)); }
.mob-segment-group .mob-segment-btn:not(.active):hover { color:var(--seg-color); }

/* Attention table aging */
.mob-age-warn { background:linear-gradient(90deg,rgba(255,193,7,.15),transparent); }
.mob-age-danger { background:linear-gradient(90deg,rgba(220,53,69,.18),transparent); }
.mob-age-badge { font-size:.55rem; font-weight:600; padding:.25rem .45rem; border-radius:6px; background:var(--color-surface-alt); margin-left:.35rem; color:var(--color-text-muted); }
.mob-age-danger .mob-age-badge { background:rgba(220,53,69,.15); color:#b0212e; }
.mob-age-warn .mob-age-badge { background:rgba(255,193,7,.18); color:#9a6d00; }

/* Improve attention row text contrast */
.mob-age-danger td, .mob-age-warn td { color:#2b2f31; }
:root[data-theme='dark'] .mob-age-danger td, :root[data-theme='dark'] .mob-age-warn td { color:#e5e9ef; }

/* Global focus outline for accessibility */
*:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
:root[data-theme='dark'] *:focus-visible { outline:2px solid #3d8dff; }

/* Button subtle style align with design */
.btn-outline-secondary, .btn-outline-primary { --bs-btn-border-radius:10px; }

/* Collapsible container (slide down) */
.mob-collapsible { overflow:hidden; max-height:0; opacity:0; transition:max-height .38s cubic-bezier(.4,0,.2,1), opacity .32s ease; }
.mob-collapsible.open { max-height:1600px; opacity:1; }

/* Skeleton rows for documents */
.mob-docs-skeleton-row { display:grid; grid-template-columns:2fr 0.7fr 0.7fr 0.6fr 1fr; gap:.75rem; align-items:center; padding:.45rem .35rem; }
.mob-docs-skeleton-row > span { height:16px; }

/* Filter chips */
.mob-filter-chip { border:1px solid var(--color-border); background:var(--color-surface); color:var(--color-text-muted); font-size:.65rem; letter-spacing:.5px; padding:.25rem .55rem; border-radius:999px; cursor:pointer; user-select:none; display:inline-flex; align-items:center; gap:.25rem; transition:background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.mob-filter-chip:hover { background:var(--color-surface-alt); color:var(--color-text); }
.mob-filter-chip.active { background:var(--gradient-primary); color:#fff; border-color:transparent; box-shadow:0 2px 6px -2px rgba(0,102,204,.4); }
.mob-filter-chip .bi { font-size:.8rem; line-height:1; }

/* ---------------- Feedback & Checklist (global) ---------------- */
.mob-feedback-icons { display:flex; gap:.65rem; }
.mob-feedback-btn { background:transparent; border:1px solid transparent; padding:.25rem; font-size:1.1rem; line-height:1; color:var(--color-text-muted); border-radius:8px; cursor:pointer; transition:color var(--transition-fast), background var(--transition-fast); }
.mob-feedback-btn:hover { background:var(--color-surface-alt); color:var(--color-text); }
.mob-feedback-btn.active[data-feedback=positive], .mob-feedback-btn[data-feedback=positive]:hover { color:var(--color-success); }
.mob-feedback-btn.active[data-feedback=negative], .mob-feedback-btn[data-feedback=negative]:hover { color:var(--color-danger); }
.mob-feedback-btn:disabled { opacity:.5; cursor:not-allowed; }
.checklist-table { border-radius: var(--radius-md); overflow:hidden; }
.checklist-item:hover { background:var(--color-surface-alt); }
.mob-filter-surface { background:var(--color-surface-alt); border:1px solid var(--color-border); }

/* Upload / wizard step circles */
.mob-step-circle { width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--gradient-primary); color:#fff; font-size:1rem; font-weight:600; box-shadow:0 2px 6px -2px rgba(0,0,0,.3); }
.mob-step-circle[data-variant='neutral'] { background:var(--color-surface-alt); color:var(--color-text); }
.mob-step-circle[data-variant='success'] { background:var(--gradient-success); }
.mob-wizard-block { position:relative; padding-bottom:1.25rem; margin-bottom:1.25rem; border-bottom:1px solid var(--color-border); }
.mob-wizard-block:last-of-type { border-bottom:none; margin-bottom:.25rem; padding-bottom:.25rem; }
.mob-wizard-block h5, .mob-wizard-block h6 { font-weight:600; }
.mob-wizard-block.is-disabled { opacity:.4; filter:grayscale(.25); pointer-events:none; position:relative; }
.mob-wizard-block.is-disabled:after { content:""; position:absolute; inset:0; background:linear-gradient(135deg,rgba(0,0,0,.05),rgba(0,0,0,.15)); border-radius:4px; }
.mob-wizard-select-list .list-group-item { cursor:pointer; transition:background var(--transition-fast); }
.mob-wizard-select-list .list-group-item:hover { background:var(--color-surface-alt); }
.mob-wizard-select-list .list-group-item.active { background:linear-gradient(90deg,rgba(0,102,204,.15),rgba(0,102,204,.05)); }

/* Compact badge overrides for status_badge macro */
.badge.bg-success, .badge.bg-danger, .badge.bg-warning, .badge.bg-secondary, .badge.bg-primary { font-size:.55rem; padding:.4rem .55rem; }

/* PDF export button adjustments */
#exportPdfBtn { display:inline-flex; align-items:center; gap:.35rem; }

/* -------- PGR Analysis Enhancements -------- */
.mob-analysis-hero { position:relative; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); padding:1.5rem 1.75rem; overflow:hidden; box-shadow:var(--shadow-sm); }
.mob-analysis-hero .mob-hero-bg-shape { position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle at 85% 20%,rgba(0,102,204,.18),transparent 60%); opacity:.9; }
:root[data-theme='dark'] .mob-analysis-hero .mob-hero-bg-shape { background:radial-gradient(circle at 80% 25%,rgba(61,141,255,.25),transparent 62%); }
.mob-hero-title { font-weight:600; letter-spacing:-.25px; }
.mob-progress-thin { height:8px; border-radius:8px; overflow:hidden; }
.mob-hero-stats .mob-hero-stat { position:relative; background:var(--color-surface-alt); border:1px solid var(--color-border); border-radius:var(--radius-md); padding:.65rem .75rem .55rem; display:flex; flex-direction:column; gap:.25rem; min-height:72px; justify-content:space-between; }
.mob-hero-stats .mob-hero-stat .label { font-size:.55rem; text-transform:uppercase; letter-spacing:.6px; font-weight:600; color:var(--color-text-muted); }
.mob-hero-stats .mob-hero-stat .value { font-size:1.05rem; font-weight:600; letter-spacing:-.25px; }
.mob-hero-stats .mob-hero-stat[data-theme='green'] { background:linear-gradient(90deg,rgba(0,168,107,.08),rgba(0,168,107,0)); }
.mob-hero-stats .mob-hero-stat[data-theme='red'] { background:linear-gradient(90deg,rgba(220,53,69,.10),rgba(220,53,69,0)); }
.mob-hero-stats .mob-hero-stat[data-theme='amber'] { background:linear-gradient(90deg,rgba(255,184,77,.15),rgba(255,184,77,0)); }
.mob-hero-stats .mob-hero-stat[data-theme='outline'] { background:linear-gradient(90deg,rgba(0,102,204,.12),rgba(0,102,204,0)); }
.mob-hero-stats .mob-hero-stat[data-theme='neutral'] { background:linear-gradient(90deg,rgba(108,117,125,.15),rgba(108,117,125,0)); }
:root[data-theme='dark'] .mob-hero-stats .mob-hero-stat { background:#242e3a; }
.mob-section-card { scroll-margin-top:110px; }
.mob-sticky-aside { position:sticky; top:90px; }
.mob-aside-card { border:1px solid var(--color-border); background:var(--color-surface); box-shadow:var(--shadow-sm); }
:root[data-theme='dark'] .mob-aside-card { box-shadow:0 4px 14px -6px rgba(0,0,0,.6); }

