/* Momina ERP — brand blue #10498A, gold #FBBA00 */
:root {
    --brand: #10498A;
    --brand-600: #0d3d74;
    --brand-700: #0a305b;
    --brand-50: #eef4fb;
    --gold: #FBBA00;
    --gold-soft: #fff4d1;
    --ink: #1b2533;
    --muted: #64748b;
    --line: #e3e8ef;
    --surface: #ffffff;
    --canvas: #f4f6f9;
    --surface-2: #fafbfc;
    --brand-rgb: 16, 73, 138;
    --hover-line: var(--hover-line);
    --sidebar-from: var(--brand-700);
    --sidebar-to: var(--brand);
    --sidebar-ink: #dbe6f4;
    --hero-end: #1d64b3;
    --sidebar-w: 256px;
    --topbar-h: 60px;
    --radius: 10px;

    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-700);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--surface); /* cards, modals, inputs; the page itself uses --canvas */
    --bs-border-color: var(--line);
    --bs-font-sans-serif: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
}

body { font-size: .925rem; background: var(--canvas); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .card a:hover, .sidebar a:hover, .list-group-item-action:hover, .dropdown-item:hover { text-decoration: none; }
code { color: #9a3412; }
.req { color: #dc2626; }
:focus-visible { outline: 3px solid rgba(251, 186, 0, .7); outline-offset: 2px; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--surface); padding: .5rem 1rem; border-radius: 6px; }

/* Bootstrap primary overrides */
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); }
.text-primary { color: var(--brand) !important; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--brand-rgb), .55); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .15); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.page-link { color: var(--brand); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }
.badge-gold { background: var(--gold); color: var(--brand-700); }

/* ---------- Layout ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
    background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
    color: var(--sidebar-ink); display: flex; flex-direction: column;
    transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; height: var(--topbar-h); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-emblem { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.sidebar-brand-text { line-height: 1.05; }
.sidebar-brand-text strong { display: block; font-size: 1.05rem; letter-spacing: .3px; }
.sidebar-brand-text small { color: var(--gold); font-weight: 700; letter-spacing: 2px; font-size: .7rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .65rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.sidebar-section { text-transform: uppercase; font-size: .68rem; letter-spacing: 1.2px; color: rgba(219,230,244,.55); padding: 1rem .75rem .35rem; font-weight: 600; }
button.sidebar-section { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; border-radius: 6px; text-align: left; cursor: pointer; margin-top: .35rem; padding: .55rem .75rem; }
button.sidebar-section:hover { color: #fff; background: rgba(255,255,255,.05); }
button.sidebar-section:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.sidebar-chevron { font-size: .7rem; transition: transform .2s; }
.sidebar-group.is-collapsed .sidebar-chevron { transform: rotate(-90deg); }
.sidebar-group.has-active > .sidebar-section { color: #fff; }
.sidebar-group-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .2s ease; }
.sidebar-group-items > div { overflow: hidden; min-height: 0; }
.sidebar-group.is-collapsed .sidebar-group-items { grid-template-rows: 0fr; }
.sidebar-group.is-collapsed .sidebar-group-items .sidebar-link { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .sidebar-group-items, .sidebar-chevron { transition: none; } }
.sidebar-link { display: flex; align-items: center; gap: .7rem; padding: .5rem .75rem; border-radius: 8px; color: var(--sidebar-ink); font-size: .9rem; position: relative; }
.sidebar-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .9; }
a.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.sidebar-link.active::before { content: ""; position: absolute; left: -.65rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.sidebar-link.is-soon { opacity: .5; cursor: default; }
.badge-soon { margin-left: auto; font-size: .62rem; text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.12); padding: .15rem .4rem; border-radius: 4px; }
.sidebar-foot { padding: .75rem 1.25rem; font-size: .72rem; color: rgba(219,230,244,.5); border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-backdrop { display: none; }

.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; }
.topbar-title { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.2rem; color: var(--ink); border: 0; }
.btn-icon:hover { background: var(--canvas); }
.notif-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: .65rem; font-weight: 700; line-height: 18px; text-align: center; }
.notif-menu { width: min(360px, 92vw); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: block; padding: .65rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.notif-item:hover { background: var(--canvas); }
.notif-item.is-unread { background: var(--brand-50); }
.user-chip { display: flex; align-items: center; gap: .6rem; border: 0; padding: .25rem .5rem; border-radius: 30px; }
.user-chip:hover { background: var(--canvas); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 2px var(--gold); }
.content { padding: 1.5rem; flex: 1; max-width: 1600px; width: 100%; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 25, 45, .45); z-index: 1035; }
    .main-wrap { margin-left: 0; }
    .topbar { padding: 0 .75rem; }
    .content { padding: 1rem; }
}

/* ---------- Page elements ---------- */
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0; color: var(--ink); }
.page-subtitle { color: var(--muted); margin: .25rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb { font-size: .8rem; margin-bottom: .35rem; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 .75rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: .85rem 1.15rem; }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--line); }
.card-title { font-size: 1rem; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; align-items: center; }
.form-label { font-weight: 500; font-size: .875rem; }
.detail-list { display: grid; grid-template-columns: 9rem 1fr; gap: .55rem 1rem; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .5rem; opacity: .5; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); vertical-align: middle; }
.activity-list .list-group-item { font-size: .875rem; }
.change-list { list-style: none; padding: 0; margin: .35rem 0 0; font-size: .8rem; }
.change-list del { color: #b91c1c; }
.audit-value { white-space: pre-wrap; margin: 0; font-size: .8rem; font-family: inherit; max-height: 220px; overflow: auto; }

/* Dashboard */
.hero-card { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 1.75rem; border-radius: 14px; color: #fff; background: linear-gradient(120deg, var(--brand-700), var(--brand) 60%, var(--hero-end)); }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(251, 186, 0, .18); }
.hero-eyebrow { color: var(--gold); font-weight: 600; font-size: .8rem; letter-spacing: .5px; margin-bottom: .25rem; }
.hero-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .35rem; }
.hero-text { color: rgba(255,255,255,.82); max-width: 640px; }
.hero-emblem { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; position: relative; z-index: 1; flex-shrink: 0; }
@media (max-width: 575.98px) { .hero-emblem { display: none; } .hero-title { font-size: 1.3rem; } }
.stat-card { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: box-shadow .15s, transform .15s; }
.stat-card:hover { box-shadow: 0 6px 18px rgba(var(--brand-rgb), .1); transform: translateY(-1px); }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand); font-size: 1.15rem; margin-bottom: .4rem; }
.stat-card.is-warning .stat-icon { background: rgba(220, 38, 38, .12); color: #dc2626; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .8rem; }
.roadmap { list-style: none; margin: 0; padding: 1rem 1.25rem; }
.roadmap li { display: flex; gap: .85rem; align-items: flex-start; padding: .45rem 0; position: relative; color: var(--muted); }
.roadmap li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 2.1rem; bottom: -.45rem; width: 2px; background: var(--line); }
.roadmap-dot { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; position: relative; z-index: 1; }
.roadmap li.is-done { color: var(--ink); }
.roadmap li.is-done .roadmap-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.roadmap li.is-current { color: var(--ink); font-weight: 600; }
.roadmap li.is-current .roadmap-dot { background: var(--gold); border-color: var(--gold); color: var(--brand-700); }

/* Cards that are links */
.role-card, .master-card { color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.role-card:hover, .master-card:hover { border-color: var(--hover-line); box-shadow: 0 6px 18px rgba(var(--brand-rgb), .08); }

/* Permission matrix */
.perm-table th.perm-module { width: 30%; min-width: 220px; font-weight: 600; background: var(--surface-2); }
.perm-table td, .perm-table th { padding: .65rem 1rem; vertical-align: middle; }
.perm-actions { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.perm-actions .form-check-inline { margin-right: 0; }

/* Settings */
.settings-nav .nav-link { color: var(--ink); border-radius: 8px; }
.settings-nav .nav-link.active { color: #fff; }
@media (max-width: 991.98px) { .settings-nav { flex-wrap: nowrap; overflow-x: auto; gap: .25rem; } .settings-nav .nav-link { white-space: nowrap; } }
.image-slot { height: 120px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; }
.image-slot { position: relative; }
.image-slot img { max-width: 92%; max-height: 104px; object-fit: contain; }
.slot-badge { position: absolute; top: 6px; right: 6px; font-size: .68rem; background: var(--gold); color: var(--brand-700); padding: .1rem .4rem; border-radius: 4px; font-weight: 600; }
.form-section { font-size: .8rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); }
.sign-pad { position: relative; height: 260px; border: 1px solid var(--line); border-radius: 8px; background: #fff; touch-action: none; }
.sign-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.sign-line { position: absolute; left: 8%; right: 8%; bottom: 60px; border-bottom: 1px dashed var(--line); pointer-events: none; }
@media (max-width: 575.98px) { .sign-pad { height: 200px; } }

/* Notifications list */
.notif-bullet { width: 8px; height: 8px; border-radius: 50%; margin-top: .45rem; flex-shrink: 0; background: transparent; }
.is-unread .notif-bullet { background: var(--brand); }
.list-group-item.is-unread { background: var(--brand-50); }

/* DataTables */
div.dt-container .dt-search input { min-width: 220px; }
table.dataTable tbody tr[data-href] { cursor: pointer; }
table.dataTable > thead > tr > th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
@media (max-width: 575.98px) { div.dt-container .dt-search input { min-width: 0; width: 100%; } }

/* Select2 sizing with Bootstrap 5 theme */
.select2-container--bootstrap-5 .select2-selection { min-height: calc(1.5em + .75rem + 2px); }

/* ---------- Phase 2: CRM & sales ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chips .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: .3rem .8rem; font-size: .82rem; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.chips .chip:hover { border-color: var(--hover-line); }
.chips .chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips .chip .count { background: rgba(0,0,0,.07); border-radius: 10px; padding: 0 .45rem; font-size: .72rem; font-weight: 600; }
.chips .chip.active .count { background: rgba(255,255,255,.22); }
.status-badge { font-weight: 600; }
.text-bg-light.status-badge { border: 1px solid var(--line); }
.record-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.record-meta { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--muted); font-size: .85rem; margin-top: .35rem; }
.record-meta i { margin-right: .3rem; }
.nav-tabs.record-tabs { border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.nav-tabs.record-tabs .nav-link { white-space: nowrap; color: var(--muted); border: 0; border-bottom: 3px solid transparent; }
.nav-tabs.record-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--gold); background: transparent; font-weight: 600; }
.nav-tabs.record-tabs .badge { font-size: .68rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: .45rem; top: 1.3rem; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--brand-50); border: 2px solid var(--brand); }
.timeline .dot.is-due { background: var(--gold-soft); border-color: var(--gold); }
.timeline .dot.is-overdue { background: rgba(220, 38, 38, .12); border-color: #dc2626; }
.timeline .dot.is-note { background: var(--surface-2); border-color: #9ca3af; }
.timeline .when { font-size: .78rem; color: var(--muted); }
.quick-contact a { display: inline-flex; align-items: center; gap: .35rem; }
.lines-table { min-width: 1180px; }
.lines-table td > select.form-select-sm, .lines-table [data-vat] { min-width: 84px; }
.lines-table [data-qty], .lines-table [data-rate], .lines-table [data-cost] { min-width: 84px; }
.lines-table .input-group { min-width: 150px; }
.lines-table .input-group .form-select { min-width: 64px; padding-right: 1.6rem; }
.lines-table td, .lines-table th { vertical-align: top; padding: .4rem; }
.lines-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); white-space: nowrap; }
.lines-table textarea { min-height: 38px; resize: vertical; }
.lines-table .line-num { width: 32px; color: var(--muted); padding-top: .75rem; text-align: center; }
.lines-table tr.is-section td { background: var(--brand-50); }
.lines-table tr.is-optional td { background: rgba(245, 158, 11, .1); }
.lines-table .amount { font-variant-numeric: tabular-nums; padding-top: .7rem; text-align: right; white-space: nowrap; font-weight: 600; }
.lines-table .drag { cursor: grab; color: var(--muted); }
.totals-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.totals-box dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; font-variant-numeric: tabular-nums; }
.totals-box dt { font-weight: 500; color: var(--muted); }
.totals-box dd { margin: 0; text-align: right; }
.totals-box .grand { font-size: 1.15rem; font-weight: 700; color: var(--brand); border-top: 2px solid var(--brand); padding-top: .4rem; }
.doc-items td, .doc-items th { font-variant-numeric: tabular-nums; }
.doc-items tr.is-section td { background: var(--brand-50); font-weight: 600; color: var(--brand); }
.status-steps { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.status-steps li { flex: 1; min-width: 110px; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 1.6rem; }
.status-steps li::before { content: ""; position: absolute; top: .55rem; left: 0; right: 0; height: 3px; background: var(--line); }
.status-steps li::after { content: ""; position: absolute; top: .2rem; left: calc(50% - .5rem); width: 1rem; height: 1rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.status-steps li.done { color: var(--ink); }
.status-steps li.done::before, .status-steps li.done::after { background: var(--brand); border-color: var(--brand); }
.status-steps li.current { color: var(--brand); font-weight: 700; }
.status-steps li.current::after { background: var(--gold); border-color: var(--gold); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.photo-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.photo-card img { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--canvas); }
.photo-card .body { padding: .5rem; font-size: .8rem; }
.measure-table input { min-width: 70px; }
.findings-grid .form-check { margin-bottom: .2rem; }
.kpi-inline { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.kpi-inline div { min-width: 120px; }
.kpi-inline .v { font-size: 1.2rem; font-weight: 700; }
.kpi-inline .l { font-size: .78rem; color: var(--muted); }
.diff-add { background: rgba(16, 185, 129, .14); }
.diff-del { background: rgba(220, 38, 38, .12); text-decoration: line-through; color: #991b1b; }
.diff-chg { background: rgba(245, 158, 11, .14); }

/* Errors */
.error-icon { font-size: 3.5rem; color: var(--brand); opacity: .8; }
.error-code { font-size: .85rem; letter-spacing: 3px; color: var(--muted); margin: .5rem 0 0; font-weight: 700; }

/* ---------- Sign-in ---------- */
body.auth { background: var(--surface); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--brand-700), var(--brand) 55%, #1d64b3); color: #fff; display: flex; align-items: center; padding: 3rem; }
.auth-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.auth-logo { width: min(320px, 80%); height: auto; margin-bottom: 2.5rem; }
.auth-brand h1 { font-size: 2rem; font-weight: 700; margin-bottom: .75rem; }
.auth-brand p { color: rgba(255,255,255,.8); font-size: 1.02rem; }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-points li { display: flex; gap: .75rem; align-items: center; padding: .4rem 0; color: rgba(255,255,255,.9); }
.auth-points i { color: var(--gold); font-size: 1.15rem; }
.auth-pattern { position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle at 20% 20%, var(--gold) 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, #fff 0 1.5px, transparent 2.5px); background-size: 46px 46px, 32px 32px; }
.auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 50px solid rgba(251, 186, 0, .16); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-title { font-weight: 700; font-size: 1.6rem; }
.auth-foot { margin-top: 2.5rem; font-size: .78rem; color: var(--muted); text-align: center; }
@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 1.75rem 1.25rem; }
    .auth-brand h1, .auth-brand p, .auth-points { display: none; }
    .auth-logo { margin: 0 auto; display: block; width: 220px; }
    .auth-brand-inner { margin: 0 auto; }
}

/* ---- Public verification pages (no login) */
.public-page { background: #f4f7fb; }
.public-head { background: #10498A; padding: 14px 0; }
.public-page .detail-list { grid-template-columns: 8.5rem 1fr; }

/* ---- Print (reports, schedules): page content only */
@media print {
    .sidebar, .sidebar-backdrop, .topbar, .no-print, .page-actions, .breadcrumb, form.report-filters, .btn { display: none !important; }
    .main-wrap { margin: 0 !important; padding: 0 !important; }
    .card { border: 0 !important; box-shadow: none !important; }
    .table { font-size: 9pt; }
    a { color: inherit !important; text-decoration: none !important; }
    body { background: #fff !important; }
}
.report-chart { position: relative; height: 260px; }

/* Sidebar footer: the developer's mark, then one line with copyright, version and About. */
.sidebar-foot { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.sidebar-foot .foot-text { white-space: nowrap; line-height: 1.3; }
.sidebar-foot .foot-text a { color: rgba(219,230,244,.8); text-decoration: none; }
.sidebar-foot .foot-text a:hover { color: #fff; text-decoration: underline; }
.sidebar-foot .abr-link { display: inline-block; line-height: 0; opacity: .95; transition: opacity .15s; }
.sidebar-foot .abr-link:hover { opacity: 1; }
.sidebar-foot .abr-link img { height: 24px; width: auto; }

/* About box: a plain window with a brand banner instead of a title bar. */
.about-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(10,48,91,.35); }
.about-close { position: absolute; top: 14px; right: 16px; z-index: 2; }
.about-hero { display: flex; align-items: center; gap: 1.1rem; padding: 1.75rem 1.75rem 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 70%), var(--brand); position: relative; }
.about-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, var(--gold), #f59e0b); }
.about-emblem { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.about-emblem img { width: 66px; height: auto; }
.about-product { font-size: 1.85rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.about-tagline { opacity: .9; margin-top: .25rem; }
.about-version { font-size: .8rem; opacity: .7; margin-top: .35rem; }
.about-body { padding: 1.25rem 1.75rem; }
.about-dev { text-align: center; padding: .25rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.about-dev-logo { display: inline-block; background: #fff; border-radius: 12px; padding: .6rem 1rem; }
.about-dev-logo img { height: 64px; width: auto; max-width: 100%; }
.about-legal { font-size: .8rem; color: var(--muted); }
.about-legal h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); margin: 1rem 0 .3rem; }
.about-legal h3:first-child { margin-top: 0; }
.about-legal p { margin-bottom: .4rem; text-align: justify; }
.about-foot { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.75rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.about-mark { height: 30px; width: auto; }
@media (max-width: 575.98px) {
    .about-hero { flex-direction: column; text-align: center; }
    .about-product { font-size: 1.5rem; }
    .about-dev-logo img { height: 48px; }
}
