/* =====================================================================
   HR Ticketing theme: original admin theme (Bootstrap 5 based).
   Layout: fixed header + dark sidebar with profile block + content.
   ===================================================================== */

:root {
    --ct-teal: #00acac;
    --ct-teal-dark: #008a8a;
    --ct-blue: #348fe2;
    --ct-indigo: #8753de;
    --ct-purple: #727cb6;
    --ct-orange: #f59c1a;
    --ct-red: #ff5b57;
    --ct-green: #32a932;
    --ct-yellow: #ffd900;
    --ct-dark: #2d353c;
    --ct-darker: #1a2229;
    --ct-gray: #929ba1;
    --ct-gray-light: #c1ccd1;
    --ct-body-bg: #d9e0e7;
    --ct-text: #2d353c;
    --ct-muted: #6f7b87;
    --ct-border: #e2e7eb;
    --ct-header-h: 50px;
    --ct-sidebar-w: 220px;
    --ct-sidebar-w-min: 60px;
    --bs-body-font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
    --bs-body-font-size: .8125rem;
    --bs-body-color: var(--ct-text);
    --bs-primary: var(--ct-blue);
    --bs-primary-rgb: 52, 143, 226;
    --bs-link-color: #2a72b5;
    --bs-link-color-rgb: 42, 114, 181;
    --bs-link-hover-color: #1c5a92;
    --bs-border-color: var(--ct-border);
}

html, body { min-height: 100%; }
body { background: var(--ct-body-bg); font-family: var(--bs-body-font-family); font-size: var(--bs-body-font-size); color: var(--ct-text); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.fw-600 { font-weight: 600 !important; }
.fs-12px { font-size: 12px !important; }
.fs-11px { font-size: 11px !important; }
.text-pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- colour utilities ---------- */
.bg-teal { background-color: var(--ct-teal) !important; color: #fff; }
.bg-blue { background-color: var(--ct-blue) !important; color: #fff; }
.bg-indigo { background-color: var(--ct-indigo) !important; color: #fff; }
.bg-purple { background-color: var(--ct-purple) !important; color: #fff; }
.bg-orange { background-color: var(--ct-orange) !important; color: #fff; }
.bg-red { background-color: var(--ct-red) !important; color: #fff; }
.bg-green { background-color: var(--ct-green) !important; color: #fff; }
.bg-dark-theme { background-color: var(--ct-dark) !important; color: #fff; }
.bg-gray { background-color: var(--ct-gray) !important; color: #fff; }
.bg-gray-light { background-color: var(--ct-gray-light) !important; color: #2d353c; }
.text-teal { color: var(--ct-teal) !important; }
.text-blue { color: var(--ct-blue) !important; }
.text-indigo { color: var(--ct-indigo) !important; }
.text-orange { color: var(--ct-orange) !important; }
.text-red { color: var(--ct-red) !important; }
.text-green { color: var(--ct-green) !important; }
.text-muted { color: var(--ct-muted) !important; }

/* ---------- buttons ---------- */
.btn { font-size: .8125rem; border-radius: 4px; font-weight: 500; }
.btn-sm { font-size: .75rem; }
.btn-primary { --bs-btn-bg: var(--ct-blue); --bs-btn-border-color: var(--ct-blue); --bs-btn-hover-bg: #2a7fd0; --bs-btn-hover-border-color: #2a7fd0; --bs-btn-active-bg: #2470b8; --bs-btn-disabled-bg: var(--ct-blue); --bs-btn-disabled-border-color: var(--ct-blue); }
.btn-theme, .btn-success { --bs-btn-color: #fff; --bs-btn-bg: var(--ct-teal); --bs-btn-border-color: var(--ct-teal); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ct-teal-dark); --bs-btn-hover-border-color: var(--ct-teal-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: #007a7a; --bs-btn-disabled-bg: var(--ct-teal); --bs-btn-disabled-border-color: var(--ct-teal); --bs-btn-disabled-color: #fff; }
.btn-warning { --bs-btn-color: #fff; --bs-btn-bg: var(--ct-orange); --bs-btn-border-color: var(--ct-orange); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #dd8b12; --bs-btn-hover-border-color: #dd8b12; --bs-btn-active-color: #fff; }
.btn-danger { --bs-btn-bg: var(--ct-red); --bs-btn-border-color: var(--ct-red); --bs-btn-hover-bg: #f2413d; --bs-btn-hover-border-color: #f2413d; }
.btn-indigo { --bs-btn-color: #fff; --bs-btn-bg: var(--ct-indigo); --bs-btn-border-color: var(--ct-indigo); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #7443cc; --bs-btn-hover-border-color: #7443cc; }
.btn-default, .btn-white { --bs-btn-color: var(--ct-text); --bs-btn-bg: #fff; --bs-btn-border-color: #d5dbe0; --bs-btn-hover-bg: #f2f3f4; --bs-btn-hover-border-color: #c9d0d6; --bs-btn-active-bg: #e9ecef; }
.btn-xs { padding: 2px 9px; font-size: 11.5px; line-height: 1.5; border-radius: 3px; }
.btn-icon { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-xs.btn-icon { width: 20px; height: 20px; font-size: 10px; }
.btn-circle { border-radius: 50% !important; }

/* ---------- forms ---------- */
.form-control, .form-select { font-size: .8125rem; border-color: #d5dbe0; border-radius: 4px; padding: .42rem .75rem; }
.form-select { padding-right: 2.25rem; text-overflow: ellipsis; }
.form-select-sm { padding-right: 2rem; }
.form-control:focus, .form-select:focus { border-color: #7dbbf2; box-shadow: 0 0 0 .2rem rgba(52, 143, 226, .18); }
.form-label { font-weight: 600; margin-bottom: .3rem; color: #3e4a54; }
.form-label .req { color: var(--ct-red); margin-left: 2px; }
.form-text { font-size: .75rem; color: var(--ct-muted); }
.form-check-input:checked { background-color: var(--ct-teal); border-color: var(--ct-teal); }
.input-group-text { font-size: .8125rem; background: #f2f3f4; border-color: #d5dbe0; }
.field-hint-fil { font-style: italic; color: var(--ct-muted); font-weight: 400; display: block; font-size: .75rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }

/* =====================================================================
   App shell
   ===================================================================== */

.app-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--ct-header-h); z-index: 1030;
    background: #fff; display: flex; align-items: center;
    box-shadow: 0 0 16px rgba(0, 0, 0, .15);
}
.app-header .navbar-brand {
    width: var(--ct-sidebar-w); height: var(--ct-header-h); display: flex; align-items: center; gap: 10px;
    padding: 0 20px; font-size: 16px; color: var(--ct-text); margin: 0; white-space: nowrap; overflow: hidden;
}
.brand-logo {
    width: 28px; height: 28px; border-radius: 7px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #00c9c9 0%, var(--ct-teal) 50%, #007f9e 100%); color: #fff; font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 172, 172, .45);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; background: #fff; }
.brand-text b { font-weight: 700; }
.brand-text span { font-weight: 300; }
.app-header .menu-toggler { border: 0; background: transparent; padding: 0 14px; height: 100%; color: #6f7b87; font-size: 22px; }
.app-header .menu-toggler:hover { color: var(--ct-text); }
.app-header .navbar-nav-right { margin-left: auto; display: flex; align-items: center; height: 100%; }
.app-header .header-item { height: 100%; display: flex; align-items: center; }
.app-header .header-link {
    display: flex; align-items: center; height: 100%; padding: 0 15px; color: #59646e; position: relative; font-size: 13px;
}
.app-header .header-link:hover, .app-header .header-link.show { color: var(--ct-text); background: #f7f8f9; }
.app-header .header-link .bi { font-size: 18px; }
.app-header .header-badge {
    position: absolute; top: 9px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--ct-red); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}
.header-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ct-teal); color: #fff; font-weight: 700; font-size: 12px; margin-right: 8px;
}
.dropdown-menu { font-size: .8125rem; border-color: #e2e7eb; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); border-radius: 4px; }
.dropdown-notifications { width: 340px; padding: 0; }
.dropdown-notifications .dropdown-header { background: #f2f3f4; color: #5b6670; font-weight: 600; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; }
.notif-item { display: flex; gap: 10px; padding: 10px 15px; border-bottom: 1px solid #f0f2f4; color: var(--ct-text); }
.notif-item:hover { background: #f7f8f9; color: var(--ct-text); }
.notif-item.unread { background: #f2fbfb; }
.notif-icon { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--ct-blue); color: #fff; }
.notif-item.unread .notif-icon { background: var(--ct-teal); }
.notif-title { font-weight: 600; font-size: 12.5px; }
.notif-msg { color: var(--ct-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-time { color: #9aa4ad; font-size: 11px; }

/* ---------- sidebar ---------- */
.app-sidebar {
    position: fixed; top: var(--ct-header-h); bottom: 0; left: 0; width: var(--ct-sidebar-w); z-index: 1020;
    background: var(--ct-dark); color: rgba(255, 255, 255, .65); display: flex; flex-direction: column;
    transition: width .15s ease, transform .2s ease;
}
.app-sidebar-content { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #47525b transparent; }
.sidebar-profile {
    position: relative; padding: 20px; color: #fff; overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(0, 172, 172, .45) 0, rgba(0, 172, 172, 0) 55%),
        radial-gradient(circle at 10% 110%, rgba(52, 143, 226, .35) 0, rgba(52, 143, 226, 0) 60%),
        linear-gradient(135deg, #161c21 0%, #242c33 100%);
}
.sidebar-profile .profile-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .15); border: 2px solid rgba(255, 255, 255, .35); font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.sidebar-profile .profile-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile .profile-role { font-size: 11px; color: rgba(255, 255, 255, .6); }
.menu-header { padding: 18px 20px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: rgba(255, 255, 255, .38); white-space: nowrap; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu-link {
    display: flex; align-items: center; padding: 8px 20px; color: rgba(255, 255, 255, .65); line-height: 20px;
    border-left: 3px solid transparent; white-space: nowrap; position: relative;
}
.menu-link:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.menu-icon { width: 20px; margin-right: 10px; font-size: 15px; text-align: center; color: rgba(255, 255, 255, .5); }
.menu-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-badge { margin-left: 8px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--ct-red); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }
.menu-badge.teal { background: var(--ct-teal); }
.menu-badge.orange { background: var(--ct-orange); }
.menu-caret { font-size: 10px; transition: transform .15s; opacity: .6; }
.menu-item.active > .menu-link { color: #fff; background: rgba(0, 0, 0, .25); border-left-color: var(--ct-teal); }
.menu-item.active > .menu-link .menu-icon { color: var(--ct-teal); }
.menu-item.has-sub.expand > .menu-link .menu-caret { transform: rotate(90deg); }
.menu-submenu { display: none; list-style: none; margin: 0; padding: 4px 0 8px; background: var(--ct-darker); }
.menu-item.has-sub.expand > .menu-submenu { display: block; }
.menu-submenu .menu-link { padding: 5px 20px 5px 53px; font-size: 12.5px; }
.menu-submenu .menu-item.active > .menu-link { background: transparent; color: var(--ct-teal); border-left-color: transparent; }
.sidebar-minify-btn {
    border: 0; background: #242a30; color: rgba(255, 255, 255, .55); height: 36px; display: flex; align-items: center; justify-content: flex-end;
    padding: 0 22px; width: 100%; font-size: 14px;
}
.sidebar-minify-btn:hover { color: #fff; }

.app-content { margin-left: var(--ct-sidebar-w); padding: calc(var(--ct-header-h) + 20px) 30px 30px; min-height: 100vh; transition: margin-left .15s ease; }
.app-footer { margin-left: var(--ct-sidebar-w); padding: 12px 30px; color: #7a858f; font-size: 12px; border-top: 1px solid #ccd5dc; }

/* minified sidebar (desktop) */
@media (min-width: 992px) {
    .app-sidebar-minified .app-sidebar { width: var(--ct-sidebar-w-min); }
    .app-sidebar-minified .app-content, .app-sidebar-minified .app-footer { margin-left: var(--ct-sidebar-w-min); }
    .app-sidebar-minified .sidebar-profile .profile-name, .app-sidebar-minified .sidebar-profile .profile-role,
    .app-sidebar-minified .menu-header, .app-sidebar-minified .menu-text, .app-sidebar-minified .menu-caret,
    .app-sidebar-minified .menu-submenu { display: none !important; }
    .app-sidebar-minified .sidebar-profile { padding: 12px 0; text-align: center; }
    .app-sidebar-minified .sidebar-profile .profile-avatar { margin: 0; }
    .app-sidebar-minified .menu-link { padding: 10px 0; justify-content: center; }
    .app-sidebar-minified .menu-icon { margin: 0; font-size: 17px; }
    .app-sidebar-minified .menu-badge { position: absolute; top: 3px; right: 6px; min-width: 16px; line-height: 15px; padding: 0 4px; margin: 0; font-size: 9px; }
    .app-sidebar-minified .sidebar-minify-btn { justify-content: center; padding: 0; }
    .app-sidebar-minified .sidebar-minify-btn .bi { transform: rotate(180deg); }
    .app-header .menu-toggler.mobile { display: none; }
}
@media (max-width: 991.98px) {
    .app-header .navbar-brand { width: auto; padding-right: 0; }
    .app-sidebar { transform: translateX(-100%); top: var(--ct-header-h); box-shadow: 0 0 30px rgba(0, 0, 0, .3); }
    .app-sidebar-mobile-toggled .app-sidebar { transform: none; }
    .app-sidebar-bg { position: fixed; inset: var(--ct-header-h) 0 0 0; background: rgba(0, 0, 0, .45); z-index: 1010; display: none; }
    .app-sidebar-mobile-toggled .app-sidebar-bg { display: block; }
    .app-content, .app-footer { margin-left: 0; padding-left: 15px; padding-right: 15px; }
    .sidebar-minify-btn { display: none; }
    .app-header .header-name { display: none; }
}

/* ---------- page header ---------- */
.page-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.page-header { font-size: 22px; font-weight: 500; margin: 0; color: #242a30; line-height: 1.3; }
.page-header small { font-size: 13px; font-weight: 400; color: #6f7b87; margin-left: 6px; }
.breadcrumb { margin: 0; font-size: 12px; --bs-breadcrumb-divider-color: #8a949e; }
.breadcrumb a { color: #5b6670; }
.breadcrumb .active { color: #8a949e; }

/* =====================================================================
   Components
   ===================================================================== */

.panel { background: #fff; border-radius: 4px; margin-bottom: 20px; border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.panel-heading { display: flex; align-items: center; gap: 10px; padding: 10px 15px; border-radius: 4px 4px 0 0; }
.panel-title { flex: 1; margin: 0; font-size: 13px; font-weight: 600; line-height: 20px; display: flex; align-items: center; gap: 8px; }
.panel-inverse > .panel-heading { background: var(--ct-dark); color: #fff; }
.panel-default > .panel-heading { background: #f2f3f4; color: var(--ct-text); border-bottom: 1px solid var(--ct-border); }
.panel-teal > .panel-heading { background: var(--ct-teal); color: #fff; }
.panel-heading-btn { display: flex; gap: 4px; align-items: center; }
.panel-heading-btn .btn-xs { font-size: 10px; }
.panel-body { padding: 15px; }
.panel-body.p-0 { padding: 0; }
.panel-footer { padding: 10px 15px; background: #f9fafb; border-top: 1px solid var(--ct-border); border-radius: 0 0 4px 4px; }
.panel.collapsed > :not(.panel-heading) { display: none; }
.panel-heading .nav-tabs { border: 0; margin: -10px 0 -10px; }
.panel-heading .nav-tabs .nav-link { color: rgba(255, 255, 255, .65); border: 0; border-radius: 0; padding: 12px 14px; font-weight: 500; }
.panel-heading .nav-tabs .nav-link.active { background: #fff; color: var(--ct-text); }

.widget-stats {
    position: relative; border-radius: 4px; padding: 15px; color: #fff; overflow: hidden; margin-bottom: 20px; min-height: 120px;
}
.widget-stats .stats-icon { position: absolute; right: 12px; top: 6px; font-size: 64px; line-height: 1; opacity: .2; }
.widget-stats .stats-info h4 { font-size: 11.5px; font-weight: 600; margin: 4px 0 6px; color: rgba(255, 255, 255, .75); text-transform: uppercase; letter-spacing: .3px; }
.widget-stats .stats-info p { font-size: 26px; font-weight: 600; margin: 0; line-height: 1.2; }
.widget-stats .stats-desc { font-size: 11.5px; color: rgba(255, 255, 255, .7); margin-top: 4px; }
.widget-stats .stats-link a {
    display: block; margin: 12px -15px -15px; padding: 7px 15px; background: rgba(0, 0, 0, .3); color: rgba(255, 255, 255, .8);
    font-size: 11.5px; text-align: right;
}
.widget-stats .stats-link a:hover { background: rgba(0, 0, 0, .45); color: #fff; }

.badge { font-weight: 600; border-radius: 3px; }
.badge-status { font-size: 10.5px; padding: .38em .6em; letter-spacing: .1px; }
.priority { font-size: 12px; font-weight: 500; white-space: nowrap; }

.table { --bs-table-hover-bg: #f6f8fa; margin-bottom: 0; font-size: .8125rem; }
.table > thead > tr > th { font-weight: 600; color: #3a4550; border-bottom: 2px solid var(--ct-border); white-space: nowrap; background: #fff; padding: 10px 15px; }
.table > tbody > tr > td { padding: 10px 15px; vertical-align: middle; border-color: #eef1f3; }
.table-ticket .ticket-no { font-weight: 600; white-space: nowrap; }
.table-ticket .ticket-subject { font-weight: 500; color: var(--ct-text); }
.table-ticket td.col-subject { min-width: 260px; }
.table-ticket td.col-requester { min-width: 150px; }
.table-ticket tr[data-href] { cursor: pointer; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ct-muted); }
.empty-state .bi { font-size: 42px; color: #c3ccd3; display: block; margin-bottom: 10px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--ct-border); background: #fbfcfd; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 160px; max-width: 280px; }
.filter-bar input[type=search] { min-width: 250px; }
.nav-pills-view { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-pills-view .nav-link { padding: 5px 12px; border-radius: 15px; color: #5b6670; font-weight: 500; font-size: 12.5px; }
.nav-pills-view .nav-link.active { background: var(--ct-dark); color: #fff; }
.nav-pills-view .nav-link .count { background: rgba(0, 0, 0, .1); border-radius: 8px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.nav-pills-view .nav-link.active .count { background: rgba(255, 255, 255, .2); }

.pagination { --bs-pagination-font-size: .8125rem; --bs-pagination-active-bg: var(--ct-dark); --bs-pagination-active-border-color: var(--ct-dark); --bs-pagination-color: var(--ct-text); margin: 0; }

.info-list { margin: 0; }
.info-list dt { font-weight: 600; color: #7a858f; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; margin-top: 10px; }
.info-list dt:first-child { margin-top: 0; }
.info-list dd { margin: 2px 0 0; }

.note { border-left: 4px solid var(--ct-blue); background: #eef6fd; padding: 10px 14px; border-radius: 3px; margin-bottom: 15px; }
.note.note-teal { border-color: var(--ct-teal); background: #e6f7f7; }
.note.note-warning { border-color: var(--ct-orange); background: #fef5e7; }
.note.note-danger { border-color: var(--ct-red); background: #fff0ef; }
.note .note-title { font-weight: 600; margin-bottom: 3px; }
.note .fil { color: var(--ct-muted); font-style: italic; margin-top: 4px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 3px 0 3px 22px; position: relative; }
.checklist li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 3px; color: var(--ct-teal); }

/* ---------- attachments ---------- */
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--ct-border); border-radius: 4px; background: #fff; color: var(--ct-text); max-width: 100%; }
.att-item:hover { border-color: #b9c4cc; background: #f9fafb; color: var(--ct-text); }
.att-item .bi { font-size: 18px; }
.att-item .att-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.att-item .att-size { color: var(--ct-muted); font-size: 11px; }
.file-picker-list { margin-top: 6px; font-size: 12px; }
.file-picker-list .bad { color: var(--ct-red); }

/* ---------- conversation ---------- */
.convo { list-style: none; margin: 0; padding: 0; }
.convo-item { display: flex; gap: 12px; margin-bottom: 18px; }
.convo-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; background: var(--ct-blue); }
.convo-item.hr .convo-avatar { background: var(--ct-teal); }
.convo-item.internal .convo-avatar { background: var(--ct-orange); }
.convo-bubble { flex: 1; min-width: 0; background: #f4f6f8; border-radius: 4px; padding: 10px 14px; border: 1px solid #e9edf0; }
.convo-item.hr .convo-bubble { background: #eef9f9; border-color: #d3eeee; }
.convo-item.internal .convo-bubble { background: #fff8e6; border-color: #f7e2ad; }
.convo-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--ct-muted); margin-bottom: 4px; }
.convo-meta .who { font-weight: 600; color: var(--ct-text); }

/* ---------- timeline (status history) ---------- */
.timeline-mini { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline-mini::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: #e2e7eb; }
.timeline-mini li { position: relative; padding-bottom: 12px; }
.timeline-mini li::before { content: ""; position: absolute; left: -17px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--ct-teal); }
.timeline-mini .t-time { font-size: 11px; color: #9aa4ad; }
.timeline-mini .t-reason { font-size: 12px; color: var(--ct-muted); }

/* ---------- toasts (popup notifications) ---------- */
.toast-container { z-index: 1090; }
.toast { font-size: .8125rem; border: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.hrt-toast {
    --ht-accent: var(--ct-teal);
    position: relative; display: flex; align-items: flex-start; gap: 12px; width: 360px; max-width: calc(100vw - 2rem);
    padding: 14px 14px 16px; background: #fff; color: var(--ct-text); border-radius: 10px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(17, 24, 39, .18), 0 2px 6px rgba(17, 24, 39, .08);
    border-left: 4px solid var(--ht-accent);
}
.hrt-toast.showing, .hrt-toast.show { animation: ht-in .32s cubic-bezier(.21, 1.02, .73, 1) both; }
.hrt-toast-danger { --ht-accent: var(--ct-red); }
.hrt-toast-info { --ht-accent: var(--ct-blue); }
.hrt-toast-warning { --ht-accent: var(--ct-orange); }
.hrt-toast .ht-icon {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ht-accent); color: #fff; font-size: 17px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ht-accent) 16%, transparent);
}
.hrt-toast .ht-body { flex: 1; min-width: 0; padding-top: 1px; }
.hrt-toast .ht-title { font-weight: 700; font-size: 13px; line-height: 1.3; }
.hrt-toast .ht-msg { color: var(--ct-muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.hrt-toast .btn-close { font-size: 10px; margin-top: 3px; opacity: .45; }
.hrt-toast .btn-close:hover { opacity: .9; }
.hrt-toast .ht-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--ht-accent) 12%, transparent); }
.hrt-toast .ht-progress span { display: block; height: 100%; background: var(--ht-accent); transform-origin: left; animation: ht-progress linear forwards; }
.hrt-toast.paused .ht-progress span { animation-play-state: paused; }
@keyframes ht-in { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ht-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- modals ---------- */
.modal-content { border: 0; border-radius: 10px; box-shadow: 0 24px 60px rgba(17, 24, 39, .28); overflow: hidden; }
.modal-header { background: #f6f8fa; border-bottom: 1px solid var(--ct-border); padding: 14px 20px; }
.modal-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-title > .bi { color: var(--ct-teal); }
.modal-title small { font-size: 12px; }
.modal-body { padding: 20px; }
.modal-footer { background: #fbfcfd; border-top: 1px solid var(--ct-border); padding: 12px 20px; gap: 6px; }
.modal-footer > * { margin: 0; }
.modal-backdrop.show { opacity: .55; backdrop-filter: blur(2px); }
/* A form can wrap header/body/footer: keep the scrollable-dialog layout working. */
.modal-content > form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.modal-dialog-scrollable .modal-content > form { overflow: hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-body { overflow-y: auto; }
/* Confirmation above another modal (e.g. Disable inside the user modal). */
#confirmModal { z-index: 1070; }
.modal-backdrop ~ .modal-backdrop { z-index: 1065; }
.modal-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 220px; color: var(--ct-muted); font-size: 13px; }
.ml-spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #e3eaef; border-top-color: var(--ct-teal); animation: pl-spin .8s linear infinite; }
/* Full-page fallback for modal forms (direct links). */
.modal-inline { position: static; display: block; }
.modal-inline .modal-dialog { margin: 0; transform: none; }
.modal-inline .modal-content { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.form-section-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ct-muted); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--ct-border); }
.role-choice { display: flex; gap: 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--ct-border); border-radius: 8px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.role-choice:hover { border-color: var(--ct-gray-light); }
.role-choice:has(input:checked) { border-color: var(--ct-teal); background: rgba(0, 172, 172, .05); }
.user-status-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 18px; border-radius: 8px; background: #f6f8fa; border: 1px solid var(--ct-border); }
.btn-check + .btn-choice { border-radius: 8px; }
.btn-check:checked + .btn-choice { border-color: var(--ct-teal); background: rgba(0, 172, 172, .08); color: var(--ct-teal-dark); font-weight: 600; }

/* ---------- page loader ---------- */
.page-loader {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    background: rgba(246, 248, 250, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s;
}
.page-loader.is-active { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
.page-loader.is-initial { background: #f6f8fa; animation: pl-failsafe 0s linear 8s forwards; }   /* hides itself if scripts never run */
.pl-card { display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(6px); transition: transform .3s ease; }
.page-loader.is-active .pl-card { transform: none; }
.pl-mark { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.pl-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: pl-spin 1.4s linear infinite; }
.pl-track { fill: none; stroke: #e3eaef; stroke-width: 4; }
.pl-arc { fill: none; stroke: var(--ct-teal); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 60 214; animation: pl-dash 1.4s ease-in-out infinite; }
.pl-logo {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(135deg, var(--ct-teal) 0%, #2a7fd4 100%); color: #fff; font-size: 24px;
    box-shadow: 0 6px 18px rgba(0, 172, 172, .35); animation: pl-pulse 1.4s ease-in-out infinite;
}
.pl-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.pl-name { font-weight: 700; font-size: 15px; color: var(--ct-dark); letter-spacing: .01em; }
.pl-text { font-size: 12px; color: var(--ct-muted); margin-top: -6px; }
.pl-dots span { animation: pl-blink 1.2s infinite both; }
.pl-dots span:nth-child(2) { animation-delay: .2s; }
.pl-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-dash { 0% { stroke-dasharray: 20 214; stroke-dashoffset: 0; } 50% { stroke-dasharray: 120 214; stroke-dashoffset: -40; } 100% { stroke-dasharray: 20 214; stroke-dashoffset: -214; } }
@keyframes pl-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.94); } }
@keyframes pl-blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .pl-ring, .pl-arc, .pl-logo, .pl-dots span, .ml-spinner, .hrt-toast.show, .hrt-toast.showing { animation: none !important; }
    .hrt-toast .ht-progress { display: none; }
}

/* =====================================================================
   Public / auth pages
   ===================================================================== */

.auth-page { min-height: 100vh; display: flex; background: #fff; }
.auth-cover {
    flex: 1; position: relative; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 60px;
    background:
        radial-gradient(circle at 80% 20%, rgba(0, 201, 201, .55) 0, rgba(0, 201, 201, 0) 45%),
        radial-gradient(circle at 15% 85%, rgba(135, 83, 222, .45) 0, rgba(135, 83, 222, 0) 50%),
        radial-gradient(circle at 60% 70%, rgba(52, 143, 226, .35) 0, rgba(52, 143, 226, 0) 50%),
        linear-gradient(160deg, #10161b 0%, #1d262e 55%, #2d353c 100%);
    overflow: hidden;
}
.auth-cover::after {
    content: ""; position: absolute; inset: 0; opacity: .07;
    background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
    background-size: 42px 42px;
}
.auth-cover > * { position: relative; z-index: 1; }
.auth-cover .cover-brand { position: absolute; top: 40px; left: 60px; display: flex; align-items: center; gap: 12px; font-size: 18px; }
.auth-cover h1 { font-size: 34px; font-weight: 300; line-height: 1.25; margin-bottom: 14px; }
.auth-cover h1 b { font-weight: 700; }
.auth-cover p { color: rgba(255, 255, 255, .7); font-size: 14px; max-width: 520px; }
.auth-cover .cover-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.auth-cover .cover-points li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, .85); }
.auth-cover .cover-points .bi { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); }
.auth-panel { width: 520px; max-width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 50px 60px; background: #fff; }
.auth-panel.wide { width: 760px; }
.auth-panel .auth-header { margin-bottom: 26px; }
.auth-panel .auth-header h2 { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.auth-panel .auth-header p { color: var(--ct-muted); margin: 0; }
.auth-panel .form-control, .auth-panel .form-select { padding: .6rem .85rem; font-size: .875rem; }
.auth-panel .form-select { padding-right: 2.25rem; }
.auth-panel .btn-lg { font-size: .9375rem; padding: .65rem 1rem; }
.auth-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--ct-border); color: var(--ct-muted); font-size: 12px; }
.auth-mobile-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 12.5px; font-weight: 600; color: var(--ct-muted); }
.auth-mobile-back:hover { color: var(--ct-teal); }
.otp-input { letter-spacing: 10px; font-size: 24px !important; text-align: center; font-weight: 600; }
.public-shell { min-height: 100vh; background: var(--ct-body-bg); }
.public-header { background: var(--ct-dark); color: #fff; height: 56px; display: flex; align-items: center; padding: 0 24px; gap: 12px; }
.public-header a { color: rgba(255, 255, 255, .8); }
.public-header a:hover { color: #fff; }
.public-header { position: sticky; top: 0; z-index: 1020; padding: 0 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.public-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff !important; }
.public-brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.public-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.public-actions .pa-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 600;
    color: #fff; border: 1px solid rgba(255, 255, 255, .28); transition: background-color .15s, border-color .15s;
}
.public-actions .pa-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); color: #fff; }
.public-actions .pa-solid { background: var(--ct-teal); border-color: var(--ct-teal); }
.public-actions .pa-solid:hover { background: var(--ct-teal-dark); border-color: var(--ct-teal-dark); }
.public-main { max-width: 1140px; margin: 0 auto; padding: 26px 15px 40px; }

/* HERE Self Service Form banner (landing page) */
.form-hero {
    position: relative; display: flex; flex-wrap: wrap; gap: 20px 30px; align-items: center; justify-content: space-between;
    padding: 28px 30px; margin-bottom: 20px; border-radius: 10px; color: #fff; overflow: hidden;
    background:
        radial-gradient(circle at 88% 15%, rgba(0, 201, 201, .5) 0, rgba(0, 201, 201, 0) 45%),
        radial-gradient(circle at 10% 110%, rgba(135, 83, 222, .4) 0, rgba(135, 83, 222, 0) 50%),
        linear-gradient(150deg, #10161b 0%, #1d262e 60%, #2d353c 100%);
    box-shadow: 0 6px 20px rgba(17, 24, 39, .15);
}
.form-hero::after {
    content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
    background-size: 36px 36px;
}
.form-hero > * { position: relative; z-index: 1; }
.form-hero-text { flex: 1 1 420px; min-width: 0; }
.form-hero-kicker { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7fe3e3; }
.form-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: .02em; margin: 6px 0 8px; line-height: 1.15; }
.form-hero p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 13.5px; max-width: 620px; }
.form-hero .field-hint-fil { color: rgba(255, 255, 255, .6); }

@media (max-width: 575.98px) {
    .public-header { padding: 0 12px; }
    .public-actions { gap: 6px; }
    .public-actions .pa-btn { padding: 0 11px; font-size: 12.5px; }
    .public-brand b { max-width: 34vw; }
    .public-main { padding: 16px 10px 30px; }
    .form-hero { padding: 20px 18px; }
    .form-hero h1 { font-size: 23px; }
}
@media (max-width: 359.98px) {
    .public-actions .pa-btn span { display: none; }   /* very narrow phones: icons only (aria-label keeps the name) */
    .public-actions .pa-btn { width: 36px; padding: 0; justify-content: center; }
}

.landing-actions { display: grid; gap: 14px; }
.landing-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--ct-border); border-radius: 6px; color: var(--ct-text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.landing-card:hover { border-color: var(--ct-teal); box-shadow: 0 4px 14px rgba(0, 172, 172, .15); color: var(--ct-text); }
.landing-card .lc-icon { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.landing-card .lc-title { font-weight: 600; font-size: 14px; }
.landing-card .lc-desc { color: var(--ct-muted); font-size: 12.5px; }

@media (max-width: 991.98px) {
    .auth-cover { display: none; }
    .auth-panel, .auth-panel.wide { width: 100%; padding: 30px 20px; justify-content: flex-start; }
}

/* ---------- loader on submit ---------- */
.btn .spinner-border { width: 14px; height: 14px; border-width: 2px; margin-right: 6px; vertical-align: -2px; }

/* =====================================================================
   Release 1B: SLA, bulk actions, advanced search, ratings, reports, dashboard
   ===================================================================== */
.note.note-info { border-color: var(--ct-blue); background: #eaf3fc; }

/* SLA badges */
.sla-badge { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; margin-right: 4px; padding: 1px 7px; border-radius: 10px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.sla-overdue { background: #ffe3e2; color: #c9302c; }
.sla-soon { background: #fff1d9; color: #a8650a; }
.sla-paused { background: #eef1f4; color: var(--ct-muted); }
.sla-escalated { background: #f1e9fc; color: #6a35c2; }
.table-ticket tr.row-overdue > td:first-child { box-shadow: inset 3px 0 0 var(--ct-red); }

/* Bulk selection */
.col-check { width: 38px; padding-right: 0 !important; }
.check-cell { display: flex; align-items: center; justify-content: center; margin: -8px; padding: 8px; cursor: pointer; }
.check-cell .form-check-input, .bulk-all { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.bulk-bar { position: sticky; top: var(--ct-header-h); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 15px;
    background: #f1e9fc; border-bottom: 1px solid #dccdf5; }
.bulk-bar .form-select, .bulk-bar .form-control { width: auto; min-width: 180px; }
.bulk-bar .bulk-count { font-size: 13px; color: #4b2a85; margin-right: 6px; }
tr.row-selected > td { background: #f7f2fe !important; }

/* Advanced search */
.adv-search { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; padding: 12px 0 2px; }
.adv-search .form-label { font-size: 11px; font-weight: 600; color: var(--ct-muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px; }
.adv-search .adv-actions { display: flex; gap: 6px; align-items: flex-end; }
.adv-search > div { min-width: 0; }
.adv-search .form-select, .adv-search .form-control { width: 100% !important; max-width: 100%; }

/* Ratings */
.rating-stars { color: #f5b301; white-space: nowrap; letter-spacing: 1px; }
.rating-stars .bi-star { color: #c9d1d8; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; border: 0; padding: 0; margin: 0 0 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 34px; line-height: 1; color: #c9d1d8; cursor: pointer; padding: 2px; transition: transform .1s, color .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f5b301; }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid var(--ct-teal); outline-offset: 2px; border-radius: 4px; }
.rate-panel { border-top: 3px solid #f5b301; }
.rating-big { font-size: 30px; font-weight: 700; line-height: 1; }
.rating-list .rl-item { padding: 8px 0; border-bottom: 1px solid var(--ct-border); }
.rating-list .rl-item:last-child { border-bottom: 0; }

/* Reports */
.report-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.report-type { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--ct-border); border-radius: 8px; background: #fff; color: var(--ct-text); }
.report-type:hover { border-color: var(--ct-teal); color: var(--ct-text); }
.report-type.active { border-color: var(--ct-teal); background: #e6f7f7; box-shadow: inset 0 0 0 1px var(--ct-teal); }
.report-type i { font-size: 20px; color: var(--ct-teal); }
.report-type .rt-title { font-weight: 600; }
.report-type .rt-desc { font-size: 11.5px; color: var(--ct-muted); }
.report-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 15px; }
.report-highlights .rh { background: #fff; border-left: 3px solid var(--ct-teal); border-radius: 4px; padding: 10px 14px; }
.report-highlights .rh-label { font-size: 11px; color: var(--ct-muted); text-transform: uppercase; letter-spacing: .3px; }
.report-highlights .rh-value { font-size: 22px; font-weight: 700; }
.report-table > :not(caption) > * > * { padding: 8px 15px; }
.report-table td.num, .report-table th.num { text-align: right; white-space: nowrap; }
.report-table tfoot td { font-weight: 700; background: #e9f7f7; }

/* SLA admin */
.sla-defaults input { min-width: 80px; }

/* Dashboard personalisation */
.widget-choice { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ct-border); border-radius: 6px; margin-bottom: 6px; cursor: pointer; }
.widget-choice:hover { background: #f7f9fa; }

/* Permission overrides */
.perm-override .btn-group .btn { font-size: 11.5px; padding: 2px 9px; }
.perm-override td { vertical-align: middle; }
.perm-effective { font-size: 11px; font-weight: 600; }

@media (max-width: 575.98px) {
    .bulk-bar .form-select, .bulk-bar .form-control { width: 100%; min-width: 0; }
    .star-input label { font-size: 40px; }
}

/* ===================== Release 1C: monitoring ===================== */

/* Header global search */
.header-search { position: relative; align-items: center; margin-right: 8px; }
.header-search .bi { position: absolute; left: 10px; color: var(--ct-muted); font-size: 13px; pointer-events: none; }
.header-search .form-control { width: 240px; height: 32px; padding-left: 30px; font-size: 12.5px; border-radius: 16px; background: #f2f4f6; border-color: transparent; }
.header-search .form-control:focus { background: #fff; border-color: var(--ct-teal); box-shadow: 0 0 0 .15rem rgba(0, 172, 172, .15); }

/* Small figures */
.mini-stat { border: 1px solid var(--ct-border); border-radius: 6px; padding: 8px 6px; background: #fbfcfd; height: 100%; }
.mini-stat .mini-value { font-size: 22px; font-weight: 600; line-height: 1.2; }
.mini-stat .mini-label { font-size: 11px; color: var(--ct-muted); }

/* Column chart (single series: one hue, rounded data end, 2px gap, recessive grid, hover tip) */
.vbar-chart { display: flex; gap: 6px; height: 170px; padding-top: 6px; }
.vbar-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: var(--ct-muted); text-align: right; min-width: 24px; padding-bottom: 18px; }
.vbar-bars { position: relative; flex: 1; display: flex; align-items: stretch; gap: 2px;
    background: linear-gradient(to bottom, var(--ct-border) 1px, transparent 1px) 0 0 / 100% 50% repeat-y; border-bottom: 1px solid #c9d1d7; margin-bottom: 18px; }
.vbar { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.vbar:hover, .vbar:focus-visible { background: rgba(0, 0, 0, .035); }
.vbar-fill { width: min(70%, 28px); background: var(--ct-teal); border-radius: 4px 4px 0 0; }
.vbar:hover .vbar-fill, .vbar:focus-visible .vbar-fill { background: var(--ct-teal-dark); }
.vbar-label { position: absolute; bottom: -17px; font-size: 10px; color: var(--ct-muted); }
.vbar::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 3; display: none;
    width: max-content; max-width: 220px; padding: 5px 8px; border-radius: 4px; background: var(--ct-dark); color: #fff; font-size: 11px; line-height: 1.35; white-space: normal; }
.vbar:hover::after, .vbar:focus-visible::after { display: block; }
.vbar:first-child::after { left: 0; transform: none; }
.vbar:last-child::after { left: auto; right: 0; transform: none; }

/* Horizontal count bars */
.count-bars .cb-row { margin-bottom: 8px; }
.count-bars .cb-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.count-bars .cb-label { min-width: 0; }
.count-bars .cb-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.count-bars .cb-track { height: 6px; background: #eef1f4; border-radius: 3px; overflow: hidden; }
.count-bars .cb-fill { height: 100%; background: var(--ct-teal); border-radius: 0 3px 3px 0; }

/* Storage meter (status colors always come with an icon + label) */
.meter { position: relative; height: 12px; background: #eef1f4; border-radius: 6px; overflow: visible; }
.meter-fill { height: 100%; border-radius: 6px; }
.meter-normal .meter-fill { background: var(--ct-green); }
.meter-warning .meter-fill { background: var(--ct-orange); }
.meter-critical .meter-fill { background: var(--ct-red); }
.meter-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #9aa5ae; border-radius: 1px; }

/* Sessions, audit */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.status-dot.online { background: var(--ct-green); box-shadow: 0 0 0 2px rgba(50, 169, 50, .2); }
.audit-details { font-size: 12px; color: #5b6670; max-width: 420px; word-break: break-word; }
.audit-json { background: #f7f8fa; border: 1px solid var(--ct-border); border-radius: 4px; padding: 10px 12px; font-size: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.info-grid dt { font-weight: 600; color: #7a858f; font-size: 12px; }
.info-grid dd { margin-bottom: 4px; }
.att-item.att-purged { background: #f7f8fa; border-style: dashed; color: var(--ct-muted); cursor: default; }
.att-item.att-purged .att-name { text-decoration: line-through; }

@media (max-width: 1199.98px) {
    .header-search .form-control { width: 180px; }
}
