/*
 * CAREIBI back office. The visual theme is public/vendor/smarthr/css/style.css (SmartHR v3
 * template styles, Bootstrap 5.3); this file only holds the glue for what we render
 * differently: self-hosted font, text wordmark, sidebar without slimscroll, small fixes.
 */

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../vendor/fonts/roboto-latin-wght-normal.woff2") format("woff2");
}

/* Brand: association emblem + wordmark (colours sampled from the CIM logo) */
.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: "Roboto", sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .06em;
    color: #0B3A44;
    text-decoration: none;
    line-height: 1;
}

.brand-emblem {
    width: auto;
    height: 35px;
    display: inline-block;
}

.brand-logo {
    width: 200px;
    max-width: 70%;
    height: auto;
}

.brand-wordmark:hover {
    color: #0B3A44;
}

.sidebar .sidebar-logo .logo-small {
    padding-top: 0;
}

/* The template scrolls the sidebar with slimscroll; plain CSS does the same here. */
.sidebar .sidebar-inner {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar .sidebar-menu {
    padding-bottom: 16px;
}

.sidebar .sidebar-menu > ul > li ul li span.disabled-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px;
    font-size: 12px;
    cursor: not-allowed;
    opacity: .5;
}

.sidebar .sidebar-menu > ul > li ul li span.disabled-link i {
    font-size: 14px;
}

.sidebar .sidebar-menu > ul > li ul li span.disabled-link span {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 8px;
}

.sidebar .sidebar-menu > ul > li ul li.active > a {
    background: #FEF1EB;
}

.sidebar .sidebar-menu > ul > li ul li.active > a span,
.sidebar .sidebar-menu > ul > li ul li.active > a i {
    color: #F26522;
}

/* Forced password change: no menu at all */
.no-sidebar .page-wrapper {
    margin-left: 0;
}

.no-sidebar #toggle_btn,
.no-sidebar #mobile_btn {
    display: none;
}

/* Initials avatar in the header */
.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #FFF;
    background: #F26522;
    border-radius: 50%;
    text-transform: uppercase;
}

/* Password show/hide is a real button for keyboard users */
button.toggle-password {
    background: none;
    border: 0;
    padding: 0;
}

/* Sign-in page: centred box */
.guest-body {
    background: #F8F9FA;
}

.guest-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.guest-box {
    width: 100%;
    max-width: 440px;
}

/* Kendo notifications above the fixed header */
.k-notification-container {
    z-index: 1100 !important;
}

/* Right-to-left languages (config/locales.php dir=rtl): the template's .layout-mode-rtl rules
   flip its own layout; these mirror the few rules above that are ours. */
.layout-mode-rtl.no-sidebar .page-wrapper {
    margin-right: 0;
}

.layout-mode-rtl .sidebar .sidebar-menu > ul > li ul li span.disabled-link span {
    margin-left: 0;
    margin-right: 8px;
}

/* Roboto has no Arabic glyphs: use a system font that has them. */
[dir="rtl"] body {
    font-family: "Roboto", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", sans-serif;
}

/* Scrollable dialogs whose body and footer sit inside a <form>: Bootstrap only scrolls a
   .modal-body that is a direct child of .modal-content, so the form must pass the height on. */
.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form > .modal-body {
    overflow-y: auto;
}

/* Kendo drop-down lists replacing <select class="form-select"> (app.js): same size, border and
   colours as the SmartHR form fields, full width like Bootstrap fields. */
.k-dropdownlist.careibi-select {
    width: 100%;
    height: 38px;
    border: 1px solid #E5E7EB;
    border-radius: 5px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    box-shadow: none;
}

.k-dropdownlist.careibi-select .k-input-inner {
    padding: 0.5rem 0.625rem;
    line-height: 1.6;
}

.k-dropdownlist.careibi-select .k-input-button {
    background: transparent;
    border: 0;
    color: #6B7280;
}

.k-dropdownlist.careibi-select:hover,
.k-dropdownlist.careibi-select.k-focus {
    border-color: #F26522;
    box-shadow: none;
}

.k-dropdownlist.careibi-select.k-disabled {
    background: #E9ECEF;
    opacity: 1;
}

/* Validation: the hidden <select> carries .is-invalid; the visible widget shows it. */
.k-dropdownlist.careibi-select.is-invalid,
.k-dropdownlist.careibi-select:has(select.is-invalid) {
    border-color: #dc3545;
}

.k-dropdownlist.careibi-select:has(select.is-invalid) ~ .invalid-feedback {
    display: block;
}

/* Lists and their search box. */
.k-list-container .k-list-filter .k-searchbox {
    border-color: #E5E7EB;
    border-radius: 5px;
    box-shadow: none;
}

.k-list-container .k-list-item {
    font-size: 14px;
}

.k-list-container .k-list-item:hover,
.k-list-container .k-list-item.k-focus {
    background-color: #F8F9FA;
    box-shadow: none;
}

.k-list-container .k-list-item.k-selected,
.k-list-container .k-list-item.k-selected:hover {
    background-color: rgba(242, 101, 34, 0.12);
    color: #F26522;
}

/* A list opened inside a dialog sits above the dialog. */
.modal .k-animation-container {
    z-index: 1060 !important;
}

/* Charts (reports, dashboard): fixed categorical order, a year keeps its colour (year % 8 + 1). */
:root {
    --chart-surface: #ffffff;
    --chart-text-primary: #0b0b0b;
    --chart-text-secondary: #52514e;
    --chart-axis: #d6d5d0;
    --chart-grid: #ecebe7;
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --series-3: #1baf7a;
    --series-4: #eda100;
    --series-5: #e87ba4;
    --series-6: #008300;
    --series-7: #6250d6;
    --series-8: #e34948;
}

.report-chart {
    width: 100%;
    min-height: 300px;
}

.report-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-inline-end: 0.5rem;
    border-radius: 2px;
    background: var(--swatch);
    vertical-align: -1px;
}

.stat-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--chart-text-primary);
    line-height: 1.2;
}

/* Session lock (addendum v2.6.1 §4): the overlay covers the page, and everything else is hidden
   (not removed), so nothing sensitive shows and work in progress is kept. */
body.session-locked > *:not(#lock-screen):not(script) {
    visibility: hidden !important;
}

.lock-screen {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #F4F6F8;
}

.lock-screen.d-none {
    display: none !important;
}

.lock-box {
    width: 100%;
    max-width: 380px;
}
