:root {
    --bs-font-sans-serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --app-bg: #f5f7fb;
    --app-text: #1f2937;
    --app-muted: #6b7280;

    --sidebar-bg: #111827;
    --sidebar-text: #f9fafb;
    --sidebar-muted: #9ca3af;
    --sidebar-subtext: #cbd5e1;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-sub-hover: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.08);

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.25);

    --danger-soft: rgba(239, 68, 68, 0.18);
    --danger-text: #fca5a5;

    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --shadow-sm: 0 0.5rem 1rem rgba(15, 23, 42, 0.06);
    --shadow-md: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
    --shadow-primary: 0 10px 25px rgba(37, 99, 235, 0.25);
}

body.app-body {
    font-family: var(--bs-font-sans-serif);
    background: var(--app-bg);
    color: var(--app-text);
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 30%);
    pointer-events: none;
    z-index: 0;
}

/* Portal shell: the footer stays in the content column, beside the sidebar. */
.app-layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100dvh;
    align-items: start;
    position: relative;
    z-index: 1;
}
.public-layout { min-height: 100dvh; display: flex; flex-direction: column; }
.app-content-column { min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; }
.public-layout .app-content-column { min-height: 0; flex: 1; }
.app-main { flex: 1; min-width: 0; padding: 1.5rem; }
.app-main-inner, .app-footer-inner { width: 100%; max-width: 1480px; margin: 0 auto; }
.app-topbar { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid #e0e7ed; }
.app-topbar > div { min-height: 68px; }
.app-offcanvas { --bs-offcanvas-width: 296px; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 1100; background: #fff; color: #162c40; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* A stationary brand and account area frame an independently scrollable menu. */
.app-sidebar { width: auto; min-width: 0; position: sticky; top: 0; height: 100dvh; padding: 20px 14px 14px; background: #14232f; color: #e8eef3; border-right: 1px solid #233743; overflow: hidden; }
.portal-sidebar-content { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; color: #fff; padding: 8px 10px 22px; margin-bottom: 10px; border-bottom: 1px solid #2b3c47; }
.sidebar-brand:hover { color: #fff; }
.sidebar-brand-mark { border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; }
.brand-title { display: block; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.brand-subtitle { display: block; font-size: .68rem; color: #a5bac6; margin-top: 4px; }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #435561 transparent; display: flex; flex-direction: column; gap: 4px; padding: 0 3px 16px; }
.nav-section-title { font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; color: #93aab8; font-weight: 600; margin: 8px 0 12px; padding: 0 10px; }
.nav-group { margin: 0 0 3px; }
.nav-app-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #dce7ee; text-align: left; font-weight: 600; font-size: .82rem; transition: background .15s ease; }
.nav-label { display: flex; align-items: center; gap: 11px; }
.nav-icon { color: #9bb8c8; font-size: 1rem; width: 19px; text-align: center; }
.nav-app-toggle:hover { background: #203441; color: #fff; }
.nav-app-toggle.active { background: #21433f; color: #e7fff8; border-color: #31574f; }
.nav-app-toggle.active .nav-icon { color: #8bd0b9; }
.nav-chevron { font-size: .65rem; color: #a3b6c2; transition: transform .15s ease; }
.nav-app-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-sublinks { display: flex; flex-direction: column; gap: 3px; margin: 7px 0 10px 20px; padding: 0 0 0 14px; border-left: 1px solid #38515c; }
.nav-sublinks a { display: block; text-decoration: none; color: #b8cbd6; font-size: .78rem; font-weight: 500; padding: 9px 10px; border-radius: 7px; }
.nav-sublinks a:hover { color: #fff; background: #203441; }
.nav-sublinks a.active-sub { color: #baf1de; background: #1d3739; font-weight: 600; }
.nav-app-toggle:focus-visible, .nav-sublinks a:focus-visible, .sidebar-account a:focus-visible { outline: 2px solid #9bd8c2; outline-offset: 2px; }
.sidebar-account { flex-shrink: 0; padding: 16px 6px 0; border-top: 1px solid #2b3c47; }
.sidebar-account-person { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sidebar-account-person > i { font-size: 1.7rem; color: #93b2c2; }
.sidebar-account-details { min-width: 0; }
.sidebar-account-details strong { display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account-details span { display: block; font-size: .68rem; color: #a5bac6; margin-top: 2px; }
.sidebar-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sidebar-account-actions a { display: block; color: #c8d9e4; font-size: .72rem; padding: 9px 6px; text-align: center; border: 1px solid #38505d; border-radius: 8px; text-decoration: none; }
.sidebar-account-actions a:hover, .sidebar-account-actions a.active-sub { background: #203441; color: #fff; }
.sidebar-account-actions a.sidebar-signout { color: #f4bab3; }
.app-offcanvas, .app-offcanvas .offcanvas-header, .app-offcanvas .offcanvas-body { background: #14232f; color: #e8eef3; }
.app-offcanvas .offcanvas-header { border-bottom: 1px solid #2b3c47; }
.app-offcanvas .offcanvas-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 14px; }
.app-offcanvas .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Compact support footer, aligned with the workspace rather than the full screen. */
.app-footer { flex-shrink: 0; background: #fff; border-top: 1px solid #e0e7ed; padding: 22px 36px 15px; color: #61758a; }
.footer-support { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px 28px; }
.footer-support strong { display: block; color: #263e50; font-size: .83rem; }
.footer-support p { font-size: .72rem; margin: 4px 0 0; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 9px 22px; padding-top: 2px; }
.footer-contacts a, .footer-resources a { color: #476477; text-decoration: none; font-size: .75rem; }
.footer-contacts a:hover, .footer-resources a:hover { color: #245f50; text-decoration: underline; }
.footer-contacts a { overflow-wrap: anywhere; }
.footer-contacts i { margin-right: 4px; }
.footer-resources { font-size: .75rem; }
.footer-resources summary { display: flex; gap: 10px; align-items: center; cursor: pointer; color: #476477; padding: 2px 0; list-style: none; }
.footer-resources summary::-webkit-details-marker { display: none; }
.footer-resources summary i { font-size: .6rem; }
.footer-resources[open] summary i { transform: rotate(180deg); }
.footer-resources nav { display: grid; gap: 9px; margin-top: 14px; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid #edf1f5; margin-top: 16px; padding-top: 12px; font-size: .64rem; color: #778996; }
.footer-meta a { color: inherit; }
@media (max-width: 991.98px) {
    .app-layout { display: block; min-height: calc(100dvh - 68px); }
    .app-layout .app-content-column { min-height: calc(100dvh - 68px); }
    .app-footer { padding: 20px 24px 14px; }
}
@media (max-width: 575.98px) {
    .footer-support { flex-direction: column; gap: 16px; }
    .footer-contacts { flex-direction: column; }
    .footer-meta { flex-direction: column; }
}
@media print {
    .app-sidebar, .app-topbar, .app-page-tools, .app-footer, .bg-overlay, .offcanvas, .offcanvas-backdrop, .report-controls, .skip-link { display: none !important; }
    .app-layout, .app-content-column { display: block; min-height: 0; }
    .app-main { padding: 0; }
    body.app-body { background: #fff; }
}

/* Shared components */
.card,
.table,
.alert,
.dropdown-menu,
.offcanvas,
.modal-content {
    border-radius: var(--radius-md);
}

.btn {
    font-weight: 600;
}

.bg-light-subtle {
    background-color: var(--surface-soft);
}

.min-vh-75 {
    min-height: 75vh;
}

/* Ticket detail helpers */
.ticket-meta-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-meta-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--app-muted);
}

.ticket-meta-value {
    color: #111827;
    word-break: break-word;
}

.ticket-markdown-content p:last-child {
    margin-bottom: 0;
}

/* Ticket cards */
.ticket-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

/* Tables / surfaces polish */
.card {
    box-shadow: var(--shadow-sm);
    border: 0;
    background: var(--surface);
}

/* Forms in offcanvas */
#ticketFilterOffcanvas {
    width: min(100%, 460px);
}

/* Mobile */
@media (max-width: 991.98px) {
    .app-main {
        padding: 1rem;
    }

    .app-main-inner {
        max-width: 100%;
    }

    .app-offcanvas .nav-app-link,
    .app-offcanvas .nav-app-toggle {
        font-size: 1rem;
    }

    .app-offcanvas .nav-sublinks a {
        font-size: 0.95rem;
    }

    .sidebar-brand {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .nav-section-title {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

#userTicketFilterOffcanvas {
    width: min(100%, 420px);
}

.computer-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.computer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08) !important;
}

#computerFilterOffcanvas {
    width: min(100%, 460px);
}

.hide-me {
    backdrop-filter: blur(6px);
}

.notification-container {
    pointer-events: none;
}

.notification-container .custom-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.notification-container .custom-toast.hide {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

.notification-container .custom-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #0d6efd;
}

.toast-success {
    border-left-color: #198754;
}

.toast-success .toast-status-dot {
    background-color: #198754;
}

.toast-danger {
    border-left-color: #dc3545;
}

.toast-danger .toast-status-dot {
    background-color: #dc3545;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-warning .toast-status-dot {
    background-color: #ffc107;
}

.toast-info {
    border-left-color: #0dcaf0;
}

.toast-info .toast-status-dot {
    background-color: #0dcaf0;
}

.toast-debug {
    border-left-color: #6c757d;
}

.toast-debug .toast-status-dot {
    background-color: #6c757d;
}

.ck-editor__editable {
    min-height: 300px !important;  /* or height: 300px !important; */
}
/* Report layout */

.ict-report { --report-ink:#162c40; --report-muted:#61758a; color:var(--report-ink); }
.ict-report .report-eyebrow { text-transform:uppercase; letter-spacing:.14em; font-size:.72rem; font-weight:700; color:#397165; }
.ict-report .report-panel { background:#fff; border:1px solid #e0e7ed; border-radius:18px; padding:1.5rem; height:100%; }
.ict-report .report-kpi { border-top:3px solid #397165; }
.ict-report .report-number { font-size:2rem; font-weight:700; letter-spacing:-.04em; line-height:1.2; }
.ict-report .report-caption { font-size:.82rem; color:var(--report-muted); }
.ict-report .report-chart { position:relative; height:265px; }
.ict-report .table { --bs-table-color:var(--report-ink); font-size:.875rem; }
.ict-report .table thead { --bs-table-bg:#f1f5f7; --bs-table-color:#455c70; }
.ict-report .table th { color:var(--report-muted); font-weight:600; white-space:nowrap; }
.ict-report .report-table { max-height:440px; overflow:auto; }
.ict-report .report-heading { font-weight:700; font-size:1.1rem; }
@media print { .ict-report .report-controls, .app-sidebar, .app-topbar, .offcanvas { display:none !important; } .ict-report .report-panel { break-inside:avoid; } .ict-report .report-table { max-height:none; overflow:visible; } }

/* Shared workspace design system: surfaces, typography, controls and data. */
:root {
    --app-bg: #f3f6f8;
    --app-text: #203542;
    --app-muted: #647785;
    --primary: #286b59;
    --primary-dark: #205747;
    --primary-soft: #e9f3ee;
    --surface-soft: #f6f8fa;
    --shadow-sm: 0 2px 6px rgb(20 35 47 / 3%);
    --shadow-md: 0 6px 18px rgb(20 35 47 / 7%);
    --bs-body-color: var(--app-text);
    --bs-body-bg: var(--app-bg);
    --bs-primary: #286b59;
    --bs-primary-rgb: 40,107,89;
    --bs-link-color: #286b59;
    --bs-link-hover-color: #205747;
    --bs-border-color: #dfe7ec;
    --bs-secondary-color: #647785;
    --bs-border-radius: .65rem;
}
body.app-body { font-size: .875rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.app-main { padding: 0 2.25rem 2.5rem; }
.app-page-tools { min-height: 90px; padding: 1.1rem 0; border-bottom: 1px solid #dfe7ec; margin-bottom: 0 !important; gap: 1rem; }
.workspace-identity { display: flex; align-items: center; gap: .75rem; }
.workspace-emblem { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #e4eeeb; color: #286b59; }
.workspace-label, .workspace-title { display: block; }
.workspace-label { font-size: .65rem; letter-spacing: .035em; color: #647785; }
.workspace-title { font-size: .85rem; font-weight: 600; color: #203542; }
.workspace-actions { display: flex; align-items: center; gap: 1.25rem; font-size: .75rem; }
.workspace-date { color: #647785; border-left: 1px solid #d7e1e7; padding-left: 1.25rem; }
.workspace-notices { color: #456071; text-decoration: none; }
.workspace-notices i { margin-right: .4rem; }
.public-topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 4rem); background: #fff; border-bottom: 1px solid #dfe7ec; }
.public-brand { font-weight: 700; color: #203542; text-decoration: none; }
.public-brand span { display: block; font-size: .7rem; color: #647785; font-weight: 400; }
.portal-page { max-width: 1480px; padding: 2rem 0 !important; }
.portal-page h1, .portal-page .display-6 { font-size: clamp(1.55rem, 1.1rem + 1vw, 2rem); letter-spacing: -.045em; line-height: 1.25; color: #1b303e; }
.portal-page h1 + p, .portal-page h1 + .text-muted { font-size: .85rem; line-height: 1.65; margin-top: .45rem; }
h2, h3, h4, h5, h6 { letter-spacing: -.02em; color: #203542; }
.h4, h4 { font-size: 1.15rem; }
.h5, h5 { font-size: 1rem; }
.fw-bold { font-weight: 700 !important; }
.text-muted { color: #647785 !important; }
.text-dark { color: #203542 !important; }
a { text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid #7bb6a4; outline-offset: 3px; border-radius: 4px; }
.app-body .card { background: #fff; border: 1px solid #dfe7ec !important; border-radius: 14px !important; box-shadow: var(--shadow-sm) !important; }
.app-body .card .card { box-shadow: none !important; border-color: #e6ecef !important; }
.card-body { padding: 1.4rem; }
.card-title { font-size: .95rem; line-height: 1.5; }
.card-header { border-bottom: 1px solid #e3eaee; background: #f9fbfc; padding: 1rem 1.4rem; }
.card-footer { background: #fafcfc; border-color: #e3eaee; }
.bg-light, .bg-light-subtle { background-color: #f6f8fa !important; }
.app-body .btn { border-radius: 8px !important; font-size: .8rem; line-height: 1.5; padding: .6rem 1rem; font-weight: 600; letter-spacing: 0; box-shadow: 0 1px 2px rgb(20 35 47 / 3%); transition: background-color .15s, border-color .15s, box-shadow .15s; }
.app-body .btn-sm { padding: .35rem .65rem; font-size: .73rem; }
.app-body .btn-lg { padding: .8rem 1.3rem; font-size: .9rem; }
.btn-dark, .btn-primary { --bs-btn-bg: #286b59; --bs-btn-border-color: #286b59; --bs-btn-color: #fff; --bs-btn-hover-bg: #205747; --bs-btn-hover-border-color: #205747; --bs-btn-active-bg: #194637; --bs-btn-active-border-color: #194637; --bs-btn-disabled-bg: #286b59; --bs-btn-disabled-border-color: #286b59; --bs-btn-focus-shadow-rgb: 40,107,89; }
.btn-outline-dark, .btn-outline-secondary, .btn-light { --bs-btn-color: #415b6c; --bs-btn-bg: #fff; --bs-btn-border-color: #d5e0e6; --bs-btn-hover-bg: #edf3f5; --bs-btn-hover-color: #203542; --bs-btn-hover-border-color: #b7cad3; --bs-btn-active-bg: #e4eeeb; --bs-btn-active-color: #205747; --bs-btn-active-border-color: #9ebcaf; }
.btn-success { --bs-btn-bg: #e7f3ec; --bs-btn-color: #236345; --bs-btn-border-color: #cce5d5; --bs-btn-hover-bg: #d4eadd; --bs-btn-hover-color: #194b33; --bs-btn-hover-border-color: #aacfb9; }
.btn-warning { --bs-btn-bg: #fff4da; --bs-btn-color: #80580a; --bs-btn-border-color: #ecdba9; --bs-btn-hover-bg: #f7e9bc; --bs-btn-hover-color: #654307; --bs-btn-hover-border-color: #dbc88a; }
.btn-danger { --bs-btn-bg: #fff0ef; --bs-btn-color: #ac3e38; --bs-btn-border-color: #efcfca; --bs-btn-hover-bg: #f8dedb; --bs-btn-hover-color: #8f302c; --bs-btn-hover-border-color: #dfaaa4; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgb(40 107 89 / 22%); }
.app-body .badge { font-size: .63rem; font-weight: 600; line-height: 1.35; letter-spacing: .025em; border-radius: 5px !important; padding: .35rem .55rem !important; white-space: normal; }
.badge.text-bg-success { color: #266343 !important; background: #e6f3eb !important; }
.badge.text-bg-danger { color: #a63d37 !important; background: #fce9e7 !important; }
.badge.text-bg-warning, .badge.bg-warning { color: #805f16 !important; background: #fff2d4 !important; }
.badge.text-bg-secondary { color: #5e6f7d !important; background: #edf1f4 !important; }
.badge.text-bg-light { color: #4f6878 !important; background: #eff4f6 !important; }
.table { --bs-table-bg: transparent; --bs-table-color: #334e5f; --bs-table-border-color: #e6ecef; --bs-table-striped-bg: #f8fafb; --bs-table-hover-bg: #f2f7f5; font-size: .81rem; border-radius: 0; }
.table > :not(caption) > * > * { padding: .95rem 1rem; box-shadow: none; }
.table thead, .table-light, .table-dark { --bs-table-bg: #f5f8fa; --bs-table-color: #657a89; --bs-table-border-color: #e0e8ed; }
.table thead th { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .055em; vertical-align: middle; border-bottom-width: 1px; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table a:not(.btn) { font-weight: 600; text-decoration: none; color: #286b59; }
.table a:not(.btn):hover { text-decoration: underline; }
.table-responsive { border-radius: 10px; }
.form-label, form label { color: #3d5667; font-size: .78rem; font-weight: 600; margin-bottom: .45rem; }
.form-control, .form-select, .app-body input.form-control-sm { min-height: 42px; border: 1px solid #d5e0e6; border-radius: 8px !important; background-color: #fff; color: #203542; font-size: .84rem; padding: .6rem .8rem; }
.form-control::placeholder { color: #8b9aa5; }
.form-control:focus, .form-select:focus { border-color: #6a9e8e; box-shadow: 0 0 0 3px rgb(40 107 89 / 10%); }
.form-control:disabled, .form-select:disabled { background-color: #f0f4f6; }
.form-text, .helptext { font-size: .72rem; color: #647785; }
.form-check-input:checked { background-color: #286b59; border-color: #286b59; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { min-height: 42px; border-color: #d5e0e6; border-radius: 8px; background: #fff; font-size: .84rem; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 40px; padding-left: .8rem; color: #203542; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; right: 7px; }
.select2-container--default.select2-container--focus .select2-selection--multiple, .select2-container--default.select2-container--open .select2-selection--single { border-color: #6a9e8e; box-shadow: 0 0 0 3px rgb(40 107 89 / 10%); }
.select2-dropdown { border-color: #d5e0e6; border-radius: 8px; box-shadow: var(--shadow-md); font-size: .84rem; }
.select2-results__option { padding: .6rem .8rem; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: #286b59; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: #edf4f1; border-color: #cbded5; color: #285e4f; margin-top: 7px; }
.select2-container .select2-search--inline .select2-search__field { font-family: inherit; margin-top: 10px; }
.page-link { color: #456071; border-color: #dfe7ec; background: #fff; font-size: .8rem; padding: .55rem .85rem; }
.page-link:hover { color: #205747; background: #edf4f1; border-color: #cadcd4; }
.active > .page-link, .page-link.active { background: #286b59; border-color: #286b59; }
.offcanvas:not(.app-offcanvas) { --bs-offcanvas-width: min(100vw, 460px); background: #f6f8fa; border-radius: 0; }
.offcanvas:not(.app-offcanvas) .offcanvas-header { padding: 1.4rem; background: #fff; }
.offcanvas:not(.app-offcanvas) .offcanvas-body { padding: 1.4rem; }
.offcanvas .offcanvas-title { font-size: 1.1rem; }
.ticket-card:hover, .computer-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; border-color: #acc9bd !important; }
.ticket-meta-label { font-size: .65rem; color: #718390; letter-spacing: .07em; font-weight: 600; }
.ticket-meta-value { font-size: .86rem; color: #203542; }
.ticket-meta-list { gap: 1.15rem; }
.ticket-markdown-content { line-height: 1.8; overflow-wrap: anywhere; }
.ticket-markdown-content img { max-width: 100%; height: auto; }
.ict-report { --report-ink: #203542; --report-muted: #647785; }
.ict-report .report-panel { border-color: #dfe7ec; border-radius: 14px; padding: 1.4rem; box-shadow: var(--shadow-sm); }
.ict-report .report-heading { font-size: 1rem; }
.ict-report .report-caption { font-size: .78rem; line-height: 1.65; }
.ict-report .report-eyebrow { font-size: .65rem; color: #286b59; }
.ict-report .report-kpi { border-top: 3px solid #609981; }
.ict-report .report-number { font-size: 2rem; color: #203e35; }
.ict-report .table { font-size: .8rem; }
.ict-report .table thead { --bs-table-bg: #f5f8fa; }
.ict-report .table th { font-weight: 600; }
.auth-page { max-width: 1200px; }
.auth-page .min-vh-75 { min-height: 65vh; }
.auth-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 1.5rem; background: #e7f2ec; color: #286b59; font-size: 1.45rem; }
.auth-page .card { box-shadow: 0 12px 40px rgb(20 35 47 / 7%) !important; }
.ck.ck-editor { --ck-border-radius: 8px; --ck-color-base-border: #d5e0e6; --ck-color-focus-border: #6a9e8e; --ck-font-face: inherit; --ck-font-size-base: .84rem; }
@media (min-width: 1400px) { .portal-page .row-cols-xl-4 > * { width: 33.333333%; } }
@media (min-width: 1800px) { .portal-page .row-cols-xl-4 > * { width: 25%; } }
@media (max-width: 1199.98px) and (min-width: 992px) { .app-main { padding-inline: 1.5rem; } .portal-page .row-cols-md-2 > * { width: 100%; } }
@media (max-width: 991.98px) { .app-main { padding: 0 1.25rem 1.5rem; } .portal-page { padding: 1.5rem 0 !important; } .app-body .app-topbar .btn { padding: .5rem .75rem; } }
@media (max-width: 575.98px) { .app-main { padding-inline: 1rem; } .portal-page h1, .portal-page .display-6 { font-size: 1.6rem; } .card-body.p-lg-5, .card-body.p-4 { padding: 1.25rem !important; } .table > :not(caption) > * > * { padding: .8rem; } .public-brand span { max-width: 200px; font-size: .62rem; } .app-body .btn.px-4 { padding-inline: .9rem !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } .ticket-card:hover, .computer-card:hover { transform: none; } }
@media print { .app-body { font-size: 10pt; } .portal-page { padding: 0 !important; } .card, .ict-report .report-panel { box-shadow: none !important; } }

/* Explicit profile columns prevent long select options from wrapping the form below. */
.profile-layout > * { min-width: 0; }
.profile-layout form, .profile-layout .card, .profile-layout .card-body { min-width: 0; }
.profile-layout select { width: 100%; max-width: 100%; min-width: 0; }
.profile-layout .select2-container { width: 100% !important; max-width: 100%; min-width: 0; }
.profile-layout .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; }
.profile-layout .ticket-meta-value { overflow-wrap: anywhere; }

/* Role choices stay readable when an account has several responsibilities. */
fieldset:has(input[name="access_roles"]) > div:has(> .form-check) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: .65rem;
}
fieldset:has(input[name="access_roles"]) .form-check {
    margin: 0;
    padding: .8rem .85rem .8rem 2.4rem;
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    background: #fafcfc;
}
fieldset:has(input[name="access_roles"]) .form-check:has(input:checked) {
    border-color: #8eb8a7;
    background: #edf5f0;
}
fieldset:has(input[name="access_roles"]) .form-check label {
    display: block;
    margin: 0;
    cursor: pointer;
}
fieldset:has(input[name="access_roles"]) .form-check:focus-within {
    outline: 2px solid #609981;
    outline-offset: 2px;
}
fieldset:has(input[name="access_roles"]) .form-text { grid-column: 1 / -1; }

/* Profile overview and user details share the same responsive sections. */
.profile-eyebrow { color: #286b59; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.profile-facts dt { font-size: .65rem; font-weight: 600; color: #718390; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.profile-facts dd { font-size: .85rem; margin: 0 0 .9rem; overflow-wrap: anywhere; }
.profile-facts a { text-decoration: none; }
.profile-facts a:hover { text-decoration: underline; }
.profile-ticket-stats > div > div { height: 100%; padding: .85rem 1rem; border: 1px solid #e1e9ed; background: #f6f9fa; border-radius: 9px; }
.profile-ticket-stats span { display: block; font-size: .7rem; color: #647785; }
.profile-ticket-stats strong { display: block; font-size: 1.6rem; line-height: 1.4; color: #244b3e; letter-spacing: -.04em; }
.profile-asset-list { display: grid; gap: .6rem; }
.profile-asset { display: grid; gap: .25rem; padding: .85rem; border: 1px solid #e1e9ed; border-radius: 8px; background: #f8fafb; overflow-wrap: anywhere; }
.profile-asset strong { font-size: .8rem; }
.profile-asset span { color: #647785; font-size: .73rem; }
.profile-asset a { text-decoration: none; }
.profile-asset a:hover { text-decoration: underline; }

.profile-facts a { color: #286b59; }
.profile-layout .h5 { font-weight: 600; }
.profile-asset a { color: #286b59; }
.profile-page-header > div { min-width: 0; max-width: 100%; }
.profile-page-header h1, .profile-page-header p, .profile-layout .badge { overflow-wrap: anywhere; }

/* Department profiles reuse the user-profile surfaces and asset cards. */
.department-card { color: #203542; transition: border-color .15s, box-shadow .15s; }
.department-card:hover { color: #286b59; border-color: #9ebfac !important; box-shadow: var(--shadow-md) !important; }
.department-card h2 { overflow-wrap: anywhere; line-height: 1.5; }
.department-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #e7f2ec; color: #286b59; font-size: 1.1rem; }
.department-section { scroll-margin-top: 85px; }
.profile-review-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; font-size: .8rem; }
.profile-review-list dt { color: #647785; font-weight: 500; }
.profile-review-list dd { margin: 0; font-weight: 700; color: #203542; }
.department-section a:not(.btn) { color: #286b59; }

/* Scheduled digest previews share the operations report surfaces. */
.ict-report .digest-summary-row { padding: .65rem 0; font-size: .85rem; line-height: 1.65; overflow-wrap: anywhere; }
.ict-report .digest-summary-metric { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.5rem; border-bottom: 1px solid #e6ecef; }
.ict-report .digest-summary-metric strong { color: #203542; font-weight: 600; }
.ict-report .digest-summary-bullet { display: block; padding: .65rem 1rem; border-left: 3px solid #609981; border-radius: 0 8px 8px 0; background: #f6f8fa; }

/* Partial navigation keeps the workspace in place while the next view loads. */
.portal-progress { position: fixed; z-index: 2000; inset: 0 0 auto; height: 3px; background: #153e5c; opacity: 0; pointer-events: none; }
.portal-progress.htmx-request { opacity: 1; animation: portal-loading 1s ease-in-out infinite alternate; }
@keyframes portal-loading { from { transform: scaleX(.25); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.portal-feedback { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 2100; max-width: min(90vw, 42rem); padding: 1rem 1.25rem; border: 1px solid #e6b9aa; border-radius: .75rem; background: #fff2ec; color: #632c1b; box-shadow: 0 4px 20px #0002; }
.portal-dialog { border: 0; border-radius: 1rem; width: min(960px, 95vw); max-height: 90dvh; padding: 1rem; box-shadow: 0 20px 80px #0004; }
.portal-dialog::backdrop { background: #10273980; }
.portal-dialog-toolbar { display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 5; }
.portal-dialog .app-main { margin: 0; padding: 0; min-height: 0; }
.portal-dialog .app-page-tools { display: none !important; }
@media (prefers-reduced-motion: reduce) { .portal-progress.htmx-request { animation: none; } }

.stock-movement { max-width: 720px; margin: 0 auto; padding: 1.25rem 1rem; }
.stock-movement-heading h1 { font-size: clamp(1.5rem, 3vw, 1.85rem); margin: .4rem 0; font-weight: 750; }
.stock-movement-heading p { font-size: .83rem; margin-bottom: 1.25rem; }
.stock-movement-item { display: flex; gap: 1rem; align-items: center; justify-content: space-between; background: #f3f7f9; border: 1px solid #dfe7ec; border-radius: 12px; padding: 1rem 1.25rem; }
.stock-movement-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: #647785; }
.stock-movement-item h2 { font-size: 1rem; margin: .25rem 0; }
.stock-balance { text-align: right; flex-shrink: 0; }
.stock-balance strong { display: block; font-size: 1.6rem; color: #286b59; line-height: 1.2; }
.stock-balance span { font-size: .7rem; color: #647785; }
.stock-movement-types { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.25rem 0; }
.stock-movement-types legend { float: none; font-size: .8rem; font-weight: 650; margin-bottom: .65rem; }
.stock-movement-choice { display: flex; align-items: center; gap: .65rem; padding: .9rem; border: 1px solid #d5e0e6; border-radius: 10px; cursor: pointer; }
.stock-movement-choice:has(input:checked) { border-color: #286b59; background: #edf7f2; box-shadow: 0 0 0 1px #286b59; }
.stock-movement-choice:focus-within { outline: 2px solid #244b6e; outline-offset: 3px; }
.stock-movement-choice input { accent-color: #286b59; }
.stock-movement-choice strong, .stock-movement-choice small { display: block; }
.stock-movement-choice strong { font-size: .8rem; }
.stock-movement-choice small { font-size: .68rem; color: #647785; margin-top: .15rem; }
.stock-choice-icon { font-size: 1.2rem; color: #286b59; }
.stock-movement-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1rem; }
.stock-movement-preview { background: #f3f7f9; padding: .7rem 1rem; border-radius: 10px; }
.stock-movement-preview span, .stock-movement-preview small { display: block; font-size: .7rem; color: #647785; }
.stock-movement-preview strong { display: block; font-size: 1.1rem; margin: .2rem 0; }
.stock-movement-warning { background: #fff2ec; color: #922d1b; }
.stock-movement-warning small { color: #922d1b; }
.stock-movement-notes textarea { min-height: 90px; resize: vertical; }
.stock-movement-actions { display: flex; justify-content: flex-end; gap: .6rem; border-top: 1px solid #e5ecef; padding-top: 1rem; }
.portal-dialog:has(.stock-movement) { width: min(760px, 95vw); }
.portal-dialog .stock-movement { padding-top: 0 !important; }
@media (max-width: 575.98px) { .stock-movement-fields, .stock-movement-types { grid-template-columns: 1fr; } .stock-movement-choice { padding: .7rem; } .stock-movement-item { padding: .8rem; } .stock-movement-actions .btn { flex: 1; } }
.deletion-reason { min-width: 210px; max-width: 380px; overflow-wrap: anywhere; font-size: .8rem; }
/* Keep native controls hidden even when third-party Select2 CSS is unavailable. */
select.select2-hidden-accessible { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

/* People and attendance share the portal's workspace and dialog surfaces. */
.attendance-page { font-size: .85rem; }
.attendance-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe7ec; border-radius: 1rem; background: #fff; }
.attendance-summary > div { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; }
.attendance-summary > div + div { border-left: 1px solid #e6ecef; }
.attendance-summary strong { display: block; font-size: 1.65rem; font-weight: 700; line-height: 1.25; color: #1b303e; }
.attendance-summary span:not(.attendance-stat-icon) { color: #6a7d89; font-size: .75rem; }
.attendance-stat-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; width: 42px; height: 42px; background: #eaf3ee; color: #286b59; border-radius: .8rem; font-size: 1.2rem; }
.attendance-stat-muted { color: #8d702e; background: #faf4e6; }
.attendance-search { flex: 1; max-width: 560px; }
.attendance-search .form-control { min-width: 0; }
.attendance-table { min-width: 720px; }
.attendance-table td { padding-top: 1rem; padding-bottom: 1rem; }
.attendance-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: .8rem; background: #edf3f5; color: #426858; font-size: .78rem; font-weight: 700; }
.attendance-email { overflow-wrap: anywhere; margin-top: .2rem; }
.attendance-id { font-variant-numeric: tabular-nums; font-size: .76rem; font-weight: 700; letter-spacing: .05em; color: #415b6c; }
.attendance-status { display: inline-flex; align-items: center; background: #eaf3ee; border: 1px solid #d7e7de; border-radius: .4rem; padding: .25rem .5rem; font-size: .68rem; font-weight: 600; color: #286b59; white-space: nowrap; }
.attendance-status-pending { background: #fbf5e9; color: #886726; border-color: #eee2c5; }
.attendance-empty { padding: 4.5rem 1.5rem; text-align: center; }
.attendance-empty > i { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 1.25rem; background: #edf4f0; color: #557b68; border-radius: 1.2rem; font-size: 1.7rem; }
.attendance-empty h2 { font-size: 1.1rem; font-weight: 700; color: #263e4c; }
.attendance-empty p { max-width: 440px; margin: .75rem auto 1.5rem; color: #6a7d89; line-height: 1.7; }
.attendance-time { color: #286b59; background: #eaf3ee; border-radius: .45rem; padding: .4rem .65rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.attendance-day { --bs-table-bg: #f5f8fa; font-size: .75rem; }
.attendance-filter-dialog { width: min(640px, 95vw); padding: 1.75rem; color: #334e5f; }
.employee-badge-panel { background: #f1f7f3; border: 1px solid #d9e7df; }
.employee-portrait { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; background: #fff; border: 4px solid #fff; }
.employee-barcode { display: block; width: 100%; max-width: 260px; height: 80px; object-fit: contain; margin: auto; }
.employee-facts { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 1rem; font-size: .8rem; }
.employee-facts dt { color: #6a7d89; font-weight: 500; }
.employee-facts dd { margin: 0; overflow-wrap: anywhere; }
.employee-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.employee-edit-fields > .alert, .employee-edit-fields > #div_id_picture { grid-column: 1 / -1; }
.portal-dialog .attendance-page { padding-top: .5rem !important; }
@media (max-width: 767.98px) {
    .attendance-summary { grid-template-columns: 1fr; }
    .attendance-summary > div { padding: 1rem 1.25rem; }
    .attendance-summary > div + div { border-left: 0; border-top: 1px solid #e6ecef; }
    .attendance-search { flex-basis: 100%; max-width: none; }
    .employee-edit-fields { grid-template-columns: 1fr; }
    .attendance-filter-dialog { padding: 1.25rem; }
}
