/* =====================================================================
   TSI Attendance — Metis theme layer (v4.3.0)
   Loaded AFTER assets/vendor/metis/metis.css.
   1. Brand variables (light + dark)
   2. Layout additions (logo, sidebar sections, theme toggle)
   3. Restyle of existing page components in the Metis look
   4. Status colours
   5. Dark-mode fixes for inline colours
   6. Print
   ===================================================================== */

/* ---------- 1. Brand variables ------------------------------------ */
:root, [data-bs-theme="light"] {
    --brand-red: #AD4444;
    --brand-red-dark: #8A3636;
    --brand-red-tint: rgba(173, 68, 68, .10);
    --brand-black: var(--bs-emphasis-color);
    --text-main: var(--bs-body-color);
    --text-muted: var(--bs-secondary-color);
    --grey-border: var(--bs-border-color);
    --grey-bg: var(--bs-tertiary-bg);
    --white: var(--bs-body-bg);
    --green: #15803d;
    --green-tint: rgba(22, 163, 74, .12);
    --amber: #b45309;
    --amber-tint: rgba(217, 119, 6, .14);
    --danger: #dc2626;
    --danger-tint: rgba(220, 38, 38, .12);
    --info: #2563eb;
    --info-tint: rgba(37, 99, 235, .12);
    --muted-tint: rgba(100, 116, 139, .14);
    --muted-fg: #64748b;
}
[data-bs-theme="dark"] {
    --brand-red: #D46A6A;
    --brand-red-dark: #E08A8A;
    --brand-red-tint: rgba(212, 106, 106, .16);
    --green: #4ade80;
    --green-tint: rgba(74, 222, 128, .14);
    --amber: #fbbf24;
    --amber-tint: rgba(251, 191, 36, .14);
    --danger: #f87171;
    --danger-tint: rgba(248, 113, 113, .15);
    --info: #60a5fa;
    --info-tint: rgba(96, 165, 250, .15);
    --muted-tint: rgba(148, 163, 184, .16);
    --muted-fg: #94a3b8;
}

/* ---------- 2. Layout additions ----------------------------------- */
.brand-logo { background: #fff; border-radius: 8px; padding: 3px 8px; display: inline-flex; align-items: center; }
.brand-logo img { height: 30px; width: auto; }
.brand-title { font-weight: 700; }
.sidebar-section { display: block; padding: 1rem 1rem .35rem; font-size: .7rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: #AD4444; }
.sidebar-backdrop { display: none; }
.sidebar-backdrop.show { display: block; }
.theme-toggle .bi-sun { display: none; }
[data-bs-theme="dark"] .theme-toggle .bi-sun { display: inline-block; }
[data-bs-theme="dark"] .theme-toggle .bi-moon { display: none; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.app-footer { text-align: center; color: var(--bs-secondary-color); font-size: .8rem; padding: 1.5rem 0 .5rem; }

/* Legacy wrappers that used to be ".container" / ".centered-page" */
.tsi-content { width: 100%; }
.tsi-content.tsi-narrow { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }

/* ---------- 3. Existing components, Metis look -------------------- */
/* Cards that hold content directly (all legacy pages) */
.tsi-content .card:not(.m-card) {
    padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
    border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg);
    display: block;
}
.tsi-content .card h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }

/* Tables without Bootstrap classes */
.tsi-content table:not(.table) { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tsi-content table:not(.table) th {
    text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
    color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); padding: .7rem .75rem;
    border-bottom: 1px solid var(--bs-border-color);
}
.tsi-content table:not(.table) td { padding: .7rem .75rem; border-bottom: 1px solid var(--bs-border-color); vertical-align: middle; }
.tsi-content table:not(.table) tr:hover td { background: var(--bs-tertiary-bg); }

/* Form controls without Bootstrap classes (inline styles keep their sizes) */
.tsi-content input[type=text], .tsi-content input[type=email], .tsi-content input[type=password],
.tsi-content input[type=number], .tsi-content input[type=date], .tsi-content input[type=month],
.tsi-content input[type=file], .tsi-content select, .tsi-content textarea {
    font-family: inherit; font-size: .9rem; color: var(--bs-body-color);
    background-color: var(--bs-body-bg); border: 1px solid var(--bs-border-color) !important;
    border-radius: .5rem; padding: .55rem .75rem;
}
.tsi-content input:focus, .tsi-content select:focus, .tsi-content textarea:focus {
    outline: none; border-color: var(--brand-red) !important; box-shadow: 0 0 0 .2rem var(--brand-red-tint);
}
.tsi-content input[type=checkbox] { accent-color: var(--brand-red); }
.tsi-content label { color: var(--bs-secondary-color); }

/* Plain <button> without Bootstrap classes = primary button */
/* Solid buttons use the full-strength brand red in BOTH themes (white text stays readable). */
.tsi-content button:not(.btn):not(.toggle-eye):not(.ai-chip) {
    font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
    background: #AD4444; color: #fff; border: 1px solid #AD4444;
    border-radius: .5rem; padding: .5rem 1rem; transition: background .15s ease;
}
.tsi-content button:not(.btn):not(.toggle-eye):not(.ai-chip):hover { background: #8A3636; border-color: #8A3636; }
.tsi-content button:disabled { opacity: .55; cursor: not-allowed; }
/* Smaller buttons inside table rows */
.tsi-content td button:not(.btn):not(.toggle-eye):not(.ai-chip) { font-size: .8rem; padding: .35rem .8rem; }
/* "Danger" buttons (Deny, Remove, Delete): outlined, clearly different from the main action */
.tsi-content button.btn-danger:not(.btn):not(.toggle-eye):not(.ai-chip) {
    background: transparent !important; color: var(--danger) !important; border: 1px solid var(--danger) !important; font-weight: 500;
}
/* (Metis forces white text on .btn-danger with !important, so these need !important too) */
.tsi-content button.btn-danger:not(.btn):not(.toggle-eye):not(.ai-chip):hover,
.tsi-content button.btn-danger:not(.btn):not(.toggle-eye):not(.ai-chip):focus { background: var(--danger-tint) !important; color: var(--danger) !important; }

/* Text links styled as buttons in old markup */
.tsi-content a.btn-link:not(.btn) { color: var(--brand-red) !important; text-decoration: none; font-weight: 500; }
.tsi-content a.btn-link:not(.btn):hover { text-decoration: underline; }
.tsi-content a:not(.btn):not(.stat-card) { color: var(--brand-red); }

.hint { color: var(--bs-secondary-color); font-size: .875rem; }
.error { color: var(--danger); background: var(--danger-tint); font-size: .875rem; padding: .6rem .85rem; border-radius: .5rem; }
.tsi-content code { color: var(--brand-red); }

/* Forms that were centred cards (.auth-form) */
.tsi-content .auth-form { width: 100%; max-width: 560px; display: flex; flex-direction: column; }
.tsi-content .auth-form h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .25rem; color: var(--bs-emphasis-color); }
.tsi-content .auth-form label { margin-top: .9rem; font-size: .8rem; font-weight: 500; }
.tsi-content .auth-form input, .tsi-content .auth-form select { margin-top: .3rem; width: 100%; }
.tsi-content .auth-form button[type=submit] { margin-top: 1.25rem; padding: .7rem 1rem; }

/* Legacy stat cards (reports, leave pages) */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { display: block; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
    border-radius: .75rem; padding: 1rem 1.15rem; text-decoration: none !important; color: inherit !important;
    border-left: 4px solid var(--brand-red); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--bs-emphasis-color); }
.stat-card .stat-label { font-size: .8rem; color: var(--bs-secondary-color); margin-top: .15rem; }
.stat-card.alert, .stat-card.stat-orange { border-left-color: var(--amber); }
.stat-card.stat-orange .stat-value { color: var(--amber); }
.stat-card.stat-green { border-left-color: var(--green); }
.stat-card.stat-green .stat-value { color: var(--green); }
a.stat-card { transition: box-shadow .15s ease, transform .15s ease; }
a.stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }

/* Password eye (kept identical in behaviour) */
.password-wrapper { position: relative; }
.password-wrapper input { width: 100%; padding-right: 44px !important; }
.password-wrapper .toggle-eye, .password-wrapper .toggle-eye:hover, .password-wrapper .toggle-eye:focus, .password-wrapper .toggle-eye:active {
    all: unset; box-sizing: border-box; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; color: var(--brand-red); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.password-wrapper .toggle-eye svg { display: block; width: 20px; height: 20px; pointer-events: none; }
.auth-form .password-wrapper input { margin-top: .3rem; }

/* Profile blocks */
.profile-header { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-header h2 { margin: 0 0 .25rem; font-size: 1.3rem; font-weight: 700; }
.profile-header p { margin: 0; color: var(--bs-secondary-color); font-size: .9rem; }
.profile-pic { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand-red); background: var(--bs-tertiary-bg); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.5rem; margin-top: 1rem; }
.info-grid .field label { display: block; font-size: .72rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.info-grid .field div { font-size: .92rem; font-weight: 500; color: var(--bs-emphasis-color); }

/* Scan page */
.scan-card { width: 100%; max-width: 420px; margin: 0 auto; text-align: center; }
.result-box { margin-top: 1rem; padding: .75rem; border-radius: .5rem; font-size: .9rem; font-weight: 500; }
.result-ok { background: var(--green-tint); color: var(--green); }
.result-fail { background: var(--danger-tint); color: var(--danger); }
.popup-overlay { position: fixed; inset: 0; background: rgba(14,14,14,.55); align-items: center; justify-content: center; z-index: 2000; animation: popupFadeIn .2s ease; }
.popup-overlay.popup-fade-out { animation: popupFadeOut .25s ease forwards; }
.popup-card { background: var(--bs-body-bg); border-radius: 16px; padding: 36px 28px; text-align: center; max-width: 300px; box-shadow: 0 12px 40px rgba(0,0,0,.25); animation: popupPop .35s cubic-bezier(.34,1.56,.64,1); }
.popup-emoji { font-size: 52px; line-height: 1; margin-bottom: 12px; animation: popupBounce .6s ease .1s; }
.popup-title { font-size: 20px; font-weight: 700; color: var(--bs-emphasis-color); margin-bottom: 6px; }
.popup-sub { font-size: 14px; color: var(--bs-secondary-color); }
@keyframes popupFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popupFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popupPop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes popupBounce { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-10px); } 50% { transform: translateY(0); } 70% { transform: translateY(-4px); } }

/* Reports page print area */
.print-toolbar { text-align: right; margin: 1rem 0; }
.print-toolbar button { background: #AD4444; color: #fff; border: none; padding: .55rem 1.1rem; border-radius: .5rem; font-weight: 600; }
.report-page { width: 100%; background: var(--bs-body-bg); padding: 1.5rem 1.75rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; margin-bottom: 1.5rem; }
.report-page h1 { font-size: 1.25rem; color: var(--bs-emphasis-color); margin-bottom: .15rem; }
.report-page .report-sub { color: var(--brand-red); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.25rem; }
.report-page table { margin-top: .75rem; width: 100%; border-collapse: collapse; font-size: .9rem; }
.report-page th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); padding: .65rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
.report-page td { padding: .65rem .75rem; border-bottom: 1px solid var(--bs-border-color); }
.report-page .stat-card { padding: .9rem 1rem; }

/* ---------- 4. Status colours ------------------------------------- */
/* Legacy badge classes -> status palette. Absent/rejected uses a brighter
   "danger" red, clearly different from the brand red used for buttons. */
.badge.badge-present, .st-present { background: var(--green-tint) !important; color: var(--green) !important; }
.badge.badge-rejected, .st-absent { background: var(--danger-tint) !important; color: var(--danger) !important; }
.badge.badge-flagged, .st-late { background: var(--amber-tint) !important; color: var(--amber) !important; }
.st-leave, .badge.badge-leave { background: var(--info-tint) !important; color: var(--info) !important; }
.badge.badge-leave { font-weight: 600; font-size: .75rem; padding: .35em .7em; border-radius: 6px; } /* v4.11.1 */
.st-off { background: var(--muted-tint) !important; color: var(--muted-fg) !important; }
.badge.badge-present, .badge.badge-rejected, .badge.badge-flagged { font-weight: 600; font-size: .75rem; padding: .35em .7em; border-radius: 6px; }
.st-badge { display: inline-block; font-weight: 600; font-size: .75rem; padding: .35em .7em; border-radius: 6px; white-space: nowrap; }
.tag { background: var(--amber-tint); color: var(--amber); padding: 2px 8px; border-radius: 6px; font-size: .75rem; }

/* ---------- 5. Dark-mode fixes for inline colours ----------------- */
[data-bs-theme="dark"] [style*="#FDF3E0"] { background: var(--amber-tint) !important; }
[data-bs-theme="dark"] [style*="#5c4210"] { color: #fcd34d !important; }
[data-bs-theme="dark"] [style*="color:#1E8E3E"], [data-bs-theme="dark"] [style*="color: #1E8E3E"] { color: var(--green) !important; }
[data-bs-theme="dark"] [style*="color:#666"] { color: var(--bs-secondary-color) !important; }
[data-bs-theme="dark"] [style*="background:#fff"] { background: transparent !important; }
[data-bs-theme="dark"] [style*="background:var(--brand-red)"] { background: #AD4444 !important; }
[data-bs-theme="dark"] [style*="background:var(--green)"] { background: #16a34a !important; }
[data-bs-theme="dark"] .ai-a, [data-bs-theme="dark"] .ai-chip { background: var(--bs-body-bg) !important; color: var(--bs-body-color); }
[data-bs-theme="dark"] .ai-q { background: #2a2a2a !important; }
[data-bs-theme="dark"] .ai-form textarea { background: var(--bs-body-bg); color: var(--bs-body-color); }

/* ---------- Mobile -------------------------------------------------- */
@media (max-width: 767.98px) {
    .tsi-content table:not(.table), .report-page table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .tsi-content .card:not(.m-card) { padding: 1rem; }
    .info-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .profile-header { text-align: center; justify-content: center; }
}

/* ---------- 6. Print ------------------------------------------------ */
@media print {
    html, body, .admin-app, .admin-wrapper, .admin-main, .admin-main > .container-fluid { background: #fff !important; color: #000 !important; }
    .admin-header, .admin-sidebar, .sidebar-backdrop, .no-print, .app-footer, .page-head .page-actions { display: none !important; }
    .admin-main { margin: 0 !important; padding: 0 !important; }
    .report-page, .tsi-content .card:not(.m-card) { border: none !important; padding: 0 !important; background: #fff !important; }
    [data-bs-theme] { --bs-body-bg: #fff; --bs-body-color: #000; --bs-emphasis-color: #000; --bs-tertiary-bg: #f3f4f6; --bs-border-color: #ddd;
        --bs-secondary-color: #555; --brand-red: #AD4444; --green: #15803d; --amber: #b45309; --danger: #dc2626; --info: #2563eb; --muted-fg: #64748b; }
    .page-head { display: none !important; }
    :root, [data-bs-theme] { color-scheme: light !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Headings inside legacy page content, sized to Metis typography */
.tsi-content > div > h2, .tsi-content > h2 { font-size: 1.15rem; font-weight: 600; margin: 0; }

/* ---------- Collapsed sidebar (desktop "icons only" rail) — v4.3.1 ---------- */
.admin-wrapper.sidebar-collapsed .admin-sidebar { overflow-x: hidden; }
.admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-content,
.admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-nav { width: 100%; overflow-x: hidden; overflow-y: auto;
    max-height: calc(100vh - var(--header-height) - 1rem);
    scrollbar-width: thin; scrollbar-color: rgba(173,68,68,.3) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background-color: rgba(173,68,68,.3); border-radius: 4px; }
.admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-nav .nav-link {
    justify-content: center; margin: .15rem .5rem; padding: .65rem 0; width: auto; gap: 0;
}
.admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-nav .nav-link i { margin: 0; font-size: 1.15rem; }
/* Section titles become thin dividers */
.admin-wrapper.sidebar-collapsed .sidebar-section {
    font-size: 0; line-height: 0; padding: 0; height: 1px; margin: .6rem .9rem; background: var(--bs-border-color);
}
@media (max-width: 991.98px) {
    /* On phones/tablets the slide-in menu always shows full labels */
    .admin-wrapper.sidebar-collapsed .sidebar-section {
        font-size: .7rem; line-height: normal; height: auto; margin: 0; padding: 1rem 1rem .35rem; background: none;
    }
    .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-nav .nav-link { justify-content: flex-start; margin: 0; padding: .75rem 1rem; }
    .admin-wrapper.sidebar-collapsed .admin-sidebar .sidebar-nav .nav-link i { margin-right: .75rem; }
}
.admin-header .hamburger-menu { margin-left: .75rem; }

/* ---------- Full screen + notifications (v4.4.0) ---------- */
.fullscreen-toggle { display: none; }
.fullscreen-toggle.is-supported { display: inline-flex; align-items: center; }
.fullscreen-toggle .bi-fullscreen-exit { display: none; }
html.is-fullscreen .fullscreen-toggle .bi-fullscreen-exit { display: inline-block; }
html.is-fullscreen .fullscreen-toggle .bi-arrows-fullscreen { display: none; }

.tsi-notif-badge {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700;
    line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bs-body-bg);
}
.tsi-notif-menu { width: 360px; max-width: calc(100vw - 24px); overflow: hidden; }
.tsi-notif-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color); }
.tsi-notif-readall { background: none; border: none; padding: 0; color: var(--brand-red); font-size: .8rem; font-weight: 500; cursor: pointer; }
.tsi-notif-readall:disabled { color: var(--bs-secondary-color); cursor: default; }
.tsi-notif-list { max-height: 420px; overflow-y: auto; }
.tsi-notif-item { display: flex; gap: .75rem; width: 100%; text-align: left; padding: .75rem 1rem; border: none;
    border-bottom: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color);
    text-decoration: none; cursor: pointer; font: inherit; }
.tsi-notif-item:hover { background: var(--bs-tertiary-bg); }
.tsi-notif-item.unread { background: var(--brand-red-tint); }
.tsi-notif-item.unread:hover { background: var(--bs-tertiary-bg); }
.tsi-notif-icon { flex: 0 0 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--bs-tertiary-bg); color: var(--brand-red); font-size: .95rem; }
.tsi-notif-text { flex: 1; min-width: 0; }
.tsi-notif-title { font-size: .85rem; font-weight: 600; color: var(--bs-emphasis-color); }
.tsi-notif-item.unread .tsi-notif-title::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: #dc2626; margin-left: 6px; vertical-align: middle; }
.tsi-notif-body { font-size: .8rem; color: var(--bs-secondary-color); margin-top: 2px; word-wrap: break-word; }
.tsi-notif-time { font-size: .72rem; color: var(--bs-secondary-color); margin-top: 3px; }
.tsi-notif-empty { padding: 1.5rem 1rem; text-align: center; color: var(--bs-secondary-color); font-size: .85rem; }
@media (max-width: 575.98px) {
    /* Phones: notifications open as a full-width panel under the header */
    .tsi-notif .tsi-notif-menu.show {
        position: fixed !important; inset: 64px 8px auto 8px !important; transform: none !important;
        width: auto; max-width: none; margin: 0 !important;
    }
    .tsi-notif-list { max-height: calc(100vh - 160px); }
}

/* ---------- Calendar (v4.5.0) ---------- */
.tsi-cal .calendar-container { height: auto; min-height: 640px; }
.tsi-cal .calendar-layout { min-height: 640px; }
.tsi-cal .month-grid { grid-template-rows: repeat(6, minmax(104px, auto)); }
.tsi-cal .month-day .day-number { cursor: pointer; }
.tsi-cal .day-events { display: flex; flex-direction: column; gap: 2px; }
.tsi-cal .hour-slot, .tsi-cal .schedule-hour { height: auto; min-height: 56px; display: flex; flex-direction: column; gap: 3px; }
.tsi-cal .week-event, .tsi-cal .schedule-event { position: static; }
.tsi-cal .week-day-header .tsi-cal-allday { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; width: 100%; }
.tsi-cal .tsi-cal-allday .day-event { font-size: .68rem; }
.tsi-cal .day-view-header .tsi-cal-allday { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .5rem; }
.tsi-cal-status { margin: .75rem; padding: .6rem .85rem; border-radius: .5rem; background: var(--amber-tint); color: var(--amber); font-size: .85rem; }

/* HR event colours (Metis already colours meeting / deadline / event) */
.day-event.event-holiday, .week-event.event-holiday, .schedule-event.event-holiday { background: #ea580c; color: #fff; }
.day-event.event-leave, .week-event.event-leave, .schedule-event.event-leave { background: #2563eb; color: #fff; }
.day-event.event-birthday, .week-event.event-birthday, .schedule-event.event-birthday { background: #db2777; color: #fff; }
.day-event.event-training, .week-event.event-training, .schedule-event.event-training { background: #0891b2; color: #fff; }
.day-event.event-personal, .week-event.event-personal, .schedule-event.event-personal { background: #7c3aed; color: #fff; }
.day-event.event-busy, .week-event.event-busy, .schedule-event.event-busy {
    background: repeating-linear-gradient(135deg, #64748b, #64748b 6px, #748297 6px, #748297 12px); color: #fff; }

/* Legend swatches + "kind" badge use the same colours */
.tsi-swatch { display: inline-block; }
.tsi-swatch.event-holiday, .tsi-cal-kind.event-holiday { background: #ea580c; }
.tsi-swatch.event-leave, .tsi-cal-kind.event-leave { background: #2563eb; }
.tsi-swatch.event-birthday, .tsi-cal-kind.event-birthday { background: #db2777; }
.tsi-swatch.event-training, .tsi-cal-kind.event-training { background: #0891b2; }
.tsi-swatch.event-personal, .tsi-cal-kind.event-personal { background: #7c3aed; }
.tsi-swatch.event-busy, .tsi-cal-kind.event-busy { background: #64748b; }
.day-event.event-gcal, .week-event.event-gcal, .schedule-event.event-gcal { background: #1a73e8; color: #fff; }
.tsi-swatch.event-gcal, .tsi-cal-kind.event-gcal { background: #1a73e8; }
.tsi-swatch.event-meeting, .tsi-cal-kind.event-meeting { background: var(--bs-success); }
.tsi-swatch.event-deadline, .tsi-cal-kind.event-deadline { background: var(--bs-danger); }
.tsi-swatch.event-event, .tsi-cal-kind.event-event { background: var(--bs-primary); }
.tsi-cal-kind { display: inline-block; color: #fff; font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 6px; }
.tsi-cal-desc { white-space: pre-wrap; word-wrap: break-word; }
/* Calendar filters: make "off" obvious (Metis hides the checkbox itself) */
.tsi-cal .category-item:not(:has(.form-check-input:checked)) { opacity: .45; }
.tsi-cal .category-item:not(:has(.form-check-input:checked)) .category-name { text-decoration: line-through; }
/* Calendar columns must never be wider than the screen: long titles get "…" */
.tsi-cal .month-header, .tsi-cal .month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tsi-cal .week-header, .tsi-cal .week-grid { grid-template-columns: 80px repeat(7, minmax(0, 1fr)); }
.tsi-cal .day-schedule { grid-template-columns: 80px minmax(0, 1fr); }
.tsi-cal .month-day, .tsi-cal .week-day-column, .tsi-cal .week-day-header, .tsi-cal .schedule-hour { min-width: 0; }
.tsi-cal .day-event, .tsi-cal .week-event .event-title, .tsi-cal .week-event .event-time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tsi-cal .calendar-main, .tsi-cal .calendar-content { min-width: 0; }

/* ---------- File Manager (v4.6.0) — scoped, Metis look ---------- */
.tsi-fm .fm-storage { background: linear-gradient(135deg, #AD4444, #7a2e2e); color: #fff; border-radius: .75rem; padding: 1.1rem 1.2rem; margin-bottom: 1.25rem; }
.tsi-fm .fm-storage-bar { background: rgba(255,255,255,.25); border-radius: 50px; height: 8px; margin: .7rem 0 .4rem; overflow: hidden; }
.tsi-fm .fm-storage-fill { background: #fff; height: 100%; border-radius: 50px; transition: width .5s ease; }
.tsi-fm .fm-side-title { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); margin: 0 0 .5rem; }
.tsi-fm .fm-nav { display: flex; flex-direction: column; gap: 2px; }
.tsi-fm .fm-nav-item { display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; border: none; background: transparent;
    color: var(--bs-body-color); padding: .55rem .7rem; border-radius: .5rem; font: inherit; font-size: .9rem; cursor: pointer; }
.tsi-fm .fm-nav-item:hover { background: var(--bs-tertiary-bg); }
.tsi-fm .fm-nav-item.active { background: var(--brand-red-tint); color: var(--brand-red); font-weight: 600; }
.tsi-fm .fm-side-note { font-size: .78rem; color: var(--bs-secondary-color); margin: 1rem 0 0; }
.tsi-fm .fm-main { min-height: 480px; transition: box-shadow .15s ease; }
.tsi-fm .fm-main.fm-dragging { box-shadow: 0 0 0 3px var(--brand-red); }
.tsi-fm .fm-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tsi-fm .fm-toolbar .btn.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.tsi-fm .fm-sort { width: auto; }
.tsi-fm .fm-search { position: relative; margin-left: auto; min-width: 200px; }
.tsi-fm .fm-search i { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); font-size: .8rem; }
.tsi-fm .fm-search input { padding-left: 1.8rem; }
.tsi-fm .fm-upload-zone { margin-top: 1rem; border: 2px dashed var(--bs-border-color); border-radius: .75rem; padding: 1rem; text-align: center; color: var(--bs-secondary-color); }
.tsi-fm .fm-upload-zone i { font-size: 1.6rem; color: var(--brand-red); display: block; }
.tsi-fm .fm-items { margin-top: 1.25rem; }
.tsi-fm .fm-empty { text-align: center; color: var(--bs-secondary-color); padding: 3rem 1rem; }
.tsi-fm .fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.tsi-fm .fm-card { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: 1.1rem .9rem .8rem; text-align: center; cursor: pointer;
    background: var(--bs-body-bg); transition: box-shadow .15s ease, transform .15s ease; min-width: 0; display: flex; flex-direction: column; }
.tsi-fm .fm-card:hover, .tsi-fm .fm-card:focus { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); outline: none; }
.tsi-fm .fm-card.trashed { cursor: default; opacity: .85; }
.tsi-fm .fm-card .file-icon { width: 52px; height: 52px; margin: 0 auto .8rem; font-size: 1.5rem; border-radius: .75rem; display: flex; align-items: center; justify-content: center; }
.tsi-fm .fm-name { font-weight: 600; font-size: .88rem; color: var(--bs-emphasis-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsi-fm .fm-meta { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .2rem; min-height: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsi-fm .fm-actions { display: flex; gap: .3rem; justify-content: center; margin-top: .7rem; }
.tsi-fm .fm-actions .btn { padding: .2rem .45rem; font-size: .8rem; }
.tsi-fm .fm-table .fm-actions { justify-content: flex-end; margin-top: 0; }
.tsi-fm .fm-icon-sm.file-icon { width: 30px; height: 30px; margin: 0; font-size: .9rem; border-radius: .45rem; display: flex; align-items: center; justify-content: center; }
.tsi-fm .fm-list-name span { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
@media (max-width: 575.98px) {
    .tsi-fm .fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .tsi-fm .fm-search { min-width: 100%; margin-left: 0; }
}
/* File-type colours (same palette as Metis' file manager) */
.tsi-fm .file-icon { color: #fff; }
.tsi-fm .file-icon.folder { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tsi-fm .file-icon.document { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tsi-fm .file-icon.spreadsheet { background: linear-gradient(135deg, #10b981, #059669); }
.tsi-fm .file-icon.presentation { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tsi-fm .file-icon.image { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tsi-fm .fm-card.trashed .file-icon { filter: grayscale(.6); }

/* ---------- Monthly reports bar in the File Manager (v4.10.0) ---------- */
.tsi-fm .fm-reportbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; padding: .75rem 1rem;
    border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--brand-red-tint); }
.tsi-fm .fm-reportbar[hidden] { display: none; }
.tsi-fm .fm-reportbar-text { flex: 1 1 260px; font-size: .85rem; }
.tsi-fm .fm-reportbar .form-select { width: auto; }

.tsi-fm .fm-meta.wrap { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* ---------- Permissions matrix (v4.11.0) ---------- */
.perm-matrix th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.perm-matrix .perm-group td { background: var(--bs-tertiary-bg); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-red); padding: .4rem 1rem; }
.perm-matrix td:first-child { padding-left: 1rem; }
.perm-matrix .form-check-input { width: 1.15rem; height: 1.15rem; cursor: pointer; }
.perm-matrix .form-check-input:checked { background-color: var(--brand-red); border-color: var(--brand-red); }
.perm-matrix .form-check-input:disabled { cursor: not-allowed; opacity: .55; }

/* ---------- Brand outline button (v4.11.0): brand colour instead of grey/black ---------- */
.btn-outline-brand { --bs-btn-color: var(--brand-red); --bs-btn-border-color: var(--brand-red);
    --bs-btn-hover-color: var(--brand-red); --bs-btn-hover-bg: var(--brand-red-tint); --bs-btn-hover-border-color: var(--brand-red);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-red); --bs-btn-active-border-color: var(--brand-red);
    --bs-btn-focus-shadow-rgb: 173, 68, 68; background: transparent; }
.btn-outline-brand:hover, .btn-outline-brand:focus-visible { box-shadow: 0 0 0 3px rgba(173, 68, 68, .14); }

/* =====================================================================
   Help & Support (v4.11.0): brand colours instead of grey/black,
   light brand borders on hover, redesigned FAQ and messages
   ===================================================================== */
.tsi-help-section { display: none; }
.tsi-help-section.active { display: block; }
.help-sidebar { position: sticky; top: 1rem; }

/* section buttons (left) */
.help-nav .nav-link { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; margin-bottom: .2rem;
    border: 1px solid transparent; border-radius: .6rem; color: var(--bs-body-color);
    transition: background .15s, border-color .15s, color .15s, transform .15s; }
.help-nav .nav-link i { width: 1.2rem; text-align: center; color: var(--bs-secondary-color); transition: color .15s; }
.help-nav .nav-link:hover { background: var(--brand-red-tint); border-color: rgba(173, 68, 68, .35); color: var(--brand-red); transform: translateX(2px); }
.help-nav .nav-link:hover i, .help-nav .nav-link.active i { color: var(--brand-red); }
.help-nav .nav-link.active { background: var(--brand-red-tint); border-color: rgba(173, 68, 68, .5); color: var(--brand-red); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-red); }
.help-nav .nav-link:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }

/* article cards */
.help-layout .article-card { height: 100%; padding: 1.1rem 1.2rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; background: var(--bs-body-bg);
    transition: border-color .18s, box-shadow .18s, transform .18s; }
.help-layout .article-card:hover { border-color: rgba(173, 68, 68, .5); box-shadow: 0 6px 18px rgba(173, 68, 68, .10); transform: translateY(-2px); }
.help-layout .article-card > .d-flex > .bi { color: var(--brand-red) !important; font-size: 1.1rem; }
.help-layout a:not(.btn):not(.nav-link) { color: var(--brand-red); }

/* step guides, contact cards, info rows */
.step-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.contact-card { height: 100%; border: 1px solid var(--bs-border-color); border-radius: .8rem; padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; transition: border-color .18s, box-shadow .18s; }
.contact-card:hover { border-color: rgba(173, 68, 68, .5); box-shadow: 0 6px 18px rgba(173, 68, 68, .10); }
.contact-card > i { font-size: 1.4rem; color: var(--brand-red); flex-shrink: 0; }
.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--bs-border-color); font-size: .9rem; }
.info-row:last-child { border-bottom: none; }

/* FAQ */
.faq-tools { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: 1rem; }
.faq-search { position: relative; flex: 1 1 260px; }
.faq-search > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); pointer-events: none; }
.faq-search input { padding-left: 2.4rem; border-radius: .7rem; }
.faq-search input:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(173, 68, 68, .14); }
.faq-chips { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1 1 100%; order: 3; }
.faq-chip { border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); border-radius: 999px; padding: .25rem .85rem; font-size: .8rem; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s; }
.faq-chip:hover { border-color: rgba(173, 68, 68, .55); color: var(--brand-red); background: var(--brand-red-tint); }
.faq-chip.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.faq-toggle-all { background: none; border: none; color: var(--brand-red); font-size: .85rem; font-weight: 600; cursor: pointer; padding: .25rem .5rem; }
.faq-toggle-all:hover { text-decoration: underline; }
.faq-item { border: 1px solid var(--bs-border-color); border-radius: .8rem; margin-bottom: .6rem; background: var(--bs-body-bg); overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.faq-item[hidden] { display: none; }
.faq-item:hover { border-color: rgba(173, 68, 68, .45); }
.faq-item.open { border-color: rgba(173, 68, 68, .6); box-shadow: 0 4px 14px rgba(173, 68, 68, .08); }
.faq-heading { margin: 0; font-size: inherit; }
.faq-question { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .75rem; width: 100%; padding: .95rem 1.1rem; cursor: pointer; font-weight: 600; color: var(--bs-emphasis-color); transition: background .15s, color .15s; }
.faq-question:focus-visible { outline: 2px solid var(--brand-red); outline-offset: -2px; border-radius: .8rem; }
.faq-q-text { flex: 1; }
.faq-cat { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-red); background: var(--brand-red-tint); padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.faq-chevron { color: var(--bs-secondary-color); transition: transform .25s, color .25s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--brand-red); }
.faq-item.open .faq-question { color: var(--brand-red); background: var(--brand-red-tint); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; min-height: 0; padding: 0 1.1rem; font-size: .92rem; line-height: 1.6; }
.faq-item.open .faq-answer-inner { padding: .85rem 1.1rem 1.1rem; border-top: 1px solid var(--bs-border-color); }
.faq-answer-inner p { margin: 0 0 .5rem; }
.faq-answer-inner ol, .faq-answer-inner ul { padding-left: 1.3rem; margin: .25rem 0 .6rem; }
.faq-answer-inner li { margin-bottom: .3rem; }
.faq-answer-inner li::marker { color: var(--brand-red); font-weight: 700; }
.faq-empty { text-align: center; color: var(--bs-secondary-color); padding: 2rem 1rem; }
.faq-empty[hidden] { display: none; }
.faq-empty i { font-size: 1.6rem; display: block; margin-bottom: .4rem; }
@media (max-width: 575.98px) { .faq-cat { display: none; } .faq-question { padding: .85rem .9rem; } }

/* employee <-> HR messages */
.msg-bubble { max-width: 92%; padding: .65rem .9rem; border-radius: .8rem; margin-bottom: .6rem; border: 1px solid var(--bs-border-color); }
.msg-bubble.from-emp { background: var(--bs-tertiary-bg); }
.msg-bubble.from-hr { background: var(--brand-red-tint); border-color: rgba(173, 68, 68, .3); margin-left: auto; }
.msg-meta { font-size: .72rem; color: var(--bs-secondary-color); margin-bottom: .15rem; }
.msg-text { font-size: .9rem; word-wrap: break-word; }
.msg-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; padding: .85rem 1.1rem; cursor: pointer; list-style: none; }
.msg-summary::-webkit-details-marker { display: none; }
details.msg-thread[open] > .msg-summary { border-bottom: 1px solid var(--bs-border-color); }
details.msg-thread { transition: border-color .18s; }
details.msg-thread:hover { border-color: rgba(173, 68, 68, .4); }

.reset-link { color: var(--brand-red); font-weight: 600; text-decoration: none; border-bottom: 1px dashed rgba(173, 68, 68, .5); }
.reset-link:hover { border-bottom-style: solid; }

.tsi-fm .fm-progress { margin-top: 1rem; padding: .75rem 1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); }
.tsi-fm .fm-progress[hidden] { display: none; }


/* v4.19.1: the v4.12.3 bold-red sidebar labels were removed (back to the plain Metis menu colours). */

/* v4.19.0: the open sidebar scrolls when the menu is taller than the screen */
.admin-sidebar { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(173,68,68,.3) transparent; }
.admin-sidebar .sidebar-content { padding-bottom: 1.5rem; }
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background-color: rgba(173,68,68,.3); border-radius: 4px; }

/* =====================================================================
   My Profile — admin (v4.20.0)
   Self-contained ".ap-" block; works in both themes.
   ===================================================================== */
.ap-hero { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    padding: 1.35rem 1.5rem; border: 1px solid var(--bs-border-color); border-radius: 1rem;
    background: linear-gradient(135deg, var(--brand-red-tint) 0%, var(--bs-body-bg) 55%); }
.ap-avatar { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
    font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; color: #fff;
    background: linear-gradient(145deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    box-shadow: 0 6px 18px rgba(173, 68, 68, .28); }
.ap-hero-text { min-width: 0; flex: 1 1 220px; }
.ap-name { font-size: 1.35rem; font-weight: 700; margin: 0; color: var(--bs-emphasis-color); line-height: 1.25; }
.ap-handle { font-size: .85rem; color: var(--bs-secondary-color); margin-top: .1rem; }
.ap-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.ap-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600;
    padding: .3rem .6rem; border-radius: 999px; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.ap-chip i { font-size: .85rem; }
.ap-chip-role { background: var(--brand-red-tint); color: var(--brand-red); }
.ap-chip-ok { background: var(--green-tint); color: var(--green); }
.ap-chip-off { background: var(--danger-tint); color: var(--danger); }
.ap-hero-meta { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-left: auto; }
.ap-meta-item { display: flex; flex-direction: column; gap: .15rem; }
.ap-meta-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.ap-meta-value { font-size: .88rem; font-weight: 600; color: var(--bs-emphasis-color); white-space: nowrap; }

.ap-form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem;
    padding-top: 1.1rem; border-top: 1px solid var(--bs-border-color); }
.ap-form .form-control:disabled { background: var(--bs-tertiary-bg); }

.ap-note { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; line-height: 1.45;
    padding: .7rem .85rem; border-radius: .65rem; margin-bottom: .85rem;
    background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.ap-note i { font-size: 1rem; line-height: 1.35; color: var(--bs-secondary-color); }
.ap-note-ok { background: var(--green-tint); } .ap-note-ok i { color: var(--green); }
.ap-note-warn { background: var(--amber-tint); } .ap-note-warn i { color: var(--amber); }

.ap-perms { display: flex; flex-direction: column; gap: .9rem; max-height: 460px; overflow-y: auto; padding-right: .25rem; }
.ap-perm-head { display: flex; justify-content: space-between; align-items: baseline;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--brand-red); padding-bottom: .3rem; border-bottom: 1px solid var(--bs-border-color); }
.ap-perm-count { color: var(--bs-secondary-color); font-weight: 600; letter-spacing: 0; }
.ap-perm-list { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.ap-perm-list li { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; line-height: 1.35; }
.ap-perm-list li i { font-size: .85rem; line-height: 1.5; flex: none; }
.ap-perm-list li.yes i { color: var(--green); }
.ap-perm-list li.no { color: var(--bs-secondary-color); }
.ap-perm-list li.no i { color: var(--bs-border-color); }
.ap-perm-list li.no span { text-decoration: line-through; text-decoration-color: var(--bs-border-color); }

@media (max-width: 767.98px) {
    .ap-hero { padding: 1.1rem; gap: 1rem; }
    .ap-avatar { width: 60px; height: 60px; font-size: 1.25rem; }
    .ap-hero-meta { margin-left: 0; gap: 1.25rem; width: 100%; padding-top: .75rem; border-top: 1px solid var(--bs-border-color); }
    .ap-perms { max-height: none; }
}
