/*
 * HRMS ⇄ INSPINIA theme bridge.
 *
 * Load order (see _Layout.cshtml / _AuthLayout.cshtml):
 *   1. Bootstrap 5
 *   2. css/style.css               (INSPINIA theme, written for Bootstrap 4)
 *   3. css/site.css                 (existing HRMS module styles)
 *   4. css/hrms-theme.css           (this file)
 *
 * This file:
 *   - keeps the INSPINIA look where site.css or Bootstrap 5 would override it,
 *   - maps existing HRMS view markup (cards, page headers, KPI tiles, auth pages)
 *     onto the theme's visual language, so views did not need to be rewritten,
 *   - fixes the few Bootstrap 4 → 5 differences the theme depends on.
 */

/* ---------------------------------------------------------------- Theme tokens */

:root {
    --theme-navy: #1B1740;
    --theme-navy-dark: #14112F;
    --theme-green: #0E9F6E;
    --theme-green-dark: #0B8A5F;
    --theme-text: #676a6c;
    --theme-border: #e7eaec;
    --theme-gray-bg: #f3f3f4;

    /* site.css colours follow the theme. */
    --hrms-primary: #0E9F6E;
    --hrms-text: #676a6c;
    --hrms-muted: #888888;
    --hrms-font-body: "Inter", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --hrms-font-display: "Inter", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* Bootstrap 5 primary follows the theme as well. */
    --bs-primary: #0E9F6E;
    --bs-primary-rgb: 14, 159, 110;
    --bs-link-color: #0E9F6E;
    --bs-link-color-rgb: 14, 159, 110;
    --bs-link-hover-color: #0B8A5F;
    --bs-body-font-family: var(--hrms-font-body);
    --bs-body-font-size: 13px;
    --bs-body-color: #676a6c;
}

body {
    font-family: var(--hrms-font-body);
    font-size: 13px;
    color: var(--theme-text);
    letter-spacing: normal;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--hrms-font-display);
    font-weight: 600 !important;
    letter-spacing: normal;
}

a {
    color: var(--theme-green);
}

a:hover {
    color: var(--theme-green-dark);
}

.text-primary {
    color: var(--theme-green) !important;
}

.bg-primary,
.text-bg-primary {
    background-color: var(--theme-green) !important;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
    border-radius: 3px;
    font-family: var(--hrms-font-body);
    font-weight: 600;
    letter-spacing: normal;
}

.btn-primary {
    --bs-btn-bg: #0E9F6E;
    --bs-btn-border-color: #0E9F6E;
    --bs-btn-hover-bg: #0B8A5F;
    --bs-btn-hover-border-color: #0B8A5F;
    --bs-btn-active-bg: #0B8A5F;
    --bs-btn-active-border-color: #0B8A5F;
    --bs-btn-disabled-bg: #0E9F6E;
    --bs-btn-disabled-border-color: #0E9F6E;
}

.btn-outline-primary {
    --bs-btn-color: #0E9F6E;
    --bs-btn-border-color: #0E9F6E;
    --bs-btn-hover-bg: #0E9F6E;
    --bs-btn-hover-border-color: #0E9F6E;
    --bs-btn-active-bg: #0B8A5F;
    --bs-btn-active-border-color: #0B8A5F;
}

.btn-light {
    border: 1px solid var(--theme-border);
    background: #fff;
    color: inherit;
}

/* ---------------------------------------------------------------- Bootstrap 4 → 5 helpers used by the theme */

.float-right { float: right !important; }
.float-left { float: left !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

/* INSPINIA's side menu is a vertical list; Bootstrap 5 .nav is a wrapping flex row. */
#side-menu.nav {
    display: block;
}

/* ---------------------------------------------------------------- Application shell */

#page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page-wrapper > .wrapper-content {
    flex: 1;
}

.navbar-static-side .nav-header {
    padding: 28px 25px 22px;
}

.hrms-brand {
    display: block;
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hrms-brand:hover,
.hrms-brand:focus {
    color: #fff;
}

.hrms-brand small {
    display: block;
    color: #B9B4E6;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hrms-organization-name {
    display: block;
    margin-top: 8px;
    color: #B9B4E6;
    font-size: 12px;
}

.nav-section {
    padding: 14px 25px 4px;
    color: #8E88C9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.mini-navbar .nav-section {
    display: none;
}

.navbar-static-side .nav > li > a i.bi {
    display: inline-block;
    width: 18px;
    margin-right: 6px;
    font-size: 14px;
    text-align: center;
}

.navbar-static-side .nav > li > a {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Top bar */
.navbar-static-top {
    min-height: 60px;
    padding: 0;
}

.navbar-static-top .navbar-header {
    display: flex;
    align-items: center;
}

.workspace-context {
    margin-left: 6px;
    color: #999;
}

.navbar-top-links {
    display: flex;
    align-items: center;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}

.navbar-top-links .count-info {
    position: relative;
}

.navbar-top-links .top-account {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 18px !important;
    color: var(--theme-text) !important;
    background: none;
    border: 0;
}

.top-account .avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--theme-green);
    color: #fff;
}

.top-account .account-copy {
    text-align: left;
    line-height: 1.15;
}

.top-account strong {
    display: block;
    color: var(--theme-navy);
}

.top-account small {
    color: #999;
}

.account-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}

.account-menu .account-heading {
    padding: 8px 16px;
}

.account-menu .account-heading small {
    display: block;
    color: #999;
}

.footer {
    position: relative;
    margin-top: auto;
}

/* ---------------------------------------------------------------- Page content */

/* Page headings rendered by module views (.page-header) take the theme's heading-bar look. */
.wrapper-content .page-header {
    margin: -20px -15px 20px;
    padding: 15px 25px;
    border-bottom: 1px solid var(--theme-border);
    background: #fff;
}

.wrapper-content .page-title {
    font-size: 24px;
    font-weight: 100 !important;
}

.wrapper-content .page-eyebrow {
    color: var(--theme-green);
}

/* Cards in module views look like INSPINIA ibox panels. */
.wrapper-content .card {
    border: 0;
    border-top: 3px solid var(--theme-border);
    border-radius: 0;
    box-shadow: none !important;
    background: #fff;
}

.wrapper-content .card-header {
    border-bottom: 1px solid var(--theme-border);
    background: #fff;
}

.wrapper-content .table > thead > tr > th {
    border-bottom: 1px solid #dddddd;
    color: var(--theme-navy);
    font-weight: 600;
}

.badge.text-bg-success {
    background-color: var(--theme-green) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--theme-green);
    box-shadow: none;
}

.nav-pills .nav-link.active {
    background-color: var(--theme-green);
}

/* Dashboard tiles and panels from Views/Home/Index.cshtml */
.wrapper-content .kpi-card,
.wrapper-content .dashboard-panel,
.wrapper-content .subscription-preview {
    border: 0;
    border-top: 3px solid var(--theme-border);
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.wrapper-content .dashboard-welcome {
    border-radius: 0;
    background: linear-gradient(120deg, var(--theme-green) 0%, var(--theme-navy) 100%);
}

/* DataTables in the theme */
/* Paging buttons are styled on .page-link (see "table paging" below); the list item itself stays transparent. */
div.dt-container .dt-paging .dt-paging-button,
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button:hover {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.spa-progress {
    background: var(--theme-green);
}

/* ---------------------------------------------------------------- Sign-in and account pages (_AuthLayout) */

body.auth-shell {
    background: var(--theme-gray-bg);
}

.auth-page {
    max-width: 460px;
    margin: 0 auto;
    padding: 60px 15px 30px;
    text-align: center;
}

.auth-brand {
    display: inline-block;
    margin-bottom: 18px;
    color: #e6e6e6;
    font-size: 110px;
    font-weight: 800;
    letter-spacing: -10px;
    line-height: 1;
    text-decoration: none;
}

.auth-brand:hover {
    color: #dcdcdc;
}

.auth-tagline {
    margin-bottom: 25px;
}

/* The illustrated side panel is replaced by the theme's centred sign-in box. */
.auth-showcase {
    display: none !important;
}

.auth-grid,
.auth-single-wrap {
    display: block;
}

.auth-card,
.auth-single-card,
.auth-result-card {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    text-align: left;
}

.auth-card h2,
.auth-single-card h2,
.auth-result-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
    text-align: center;
}

.auth-subtitle,
.auth-kicker,
.auth-icon,
.auth-hero-icon,
.auth-result-icon {
    display: block;
    text-align: center;
}

.auth-kicker {
    color: var(--theme-green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-icon,
.auth-hero-icon,
.auth-result-icon {
    margin-bottom: 8px;
    color: var(--theme-green);
    font-size: 28px;
}

.auth-field {
    margin-bottom: 15px;
}

.auth-field label {
    margin-bottom: 4px;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #aaa;
}

.auth-input-wrap > .form-control {
    padding-left: 34px;
    border-radius: 1px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #999;
}

.btn-auth-primary {
    display: block;
    width: 100%;
    margin: 10px 0 15px;
    padding: 8px 12px;
    border: 1px solid var(--theme-green);
    border-radius: 3px;
    background: var(--theme-green);
    color: #fff;
    font-weight: 600;
}

.btn-auth-primary:hover {
    border-color: var(--theme-green-dark);
    background: var(--theme-green-dark);
}

.field-error {
    display: block;
    color: #ed5565;
    font-size: 12px;
}

.auth-validation-summary.validation-summary-errors {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-left: 3px solid #ed5565;
    background: #fff;
    color: #ed5565;
}

.auth-bottom-link,
.auth-back-link,
.auth-hint {
    display: block;
    margin-top: 12px;
    color: #999;
    text-align: center;
}

.auth-footer {
    margin-top: 30px;
    color: #999;
    font-size: 12px;
}

/* ---------------------------------------------------------------- Public landing page */

.landing-page .navbar-brand {
    margin-top: 0;
}

.landing-page .navbar-wrapper .navbar {
    padding: 10px 0;
}

.landing-page .navbar-nav {
    flex-direction: row;
}

.landing-hero {
    padding: 170px 0 110px;
    background: linear-gradient(120deg, var(--theme-green) 0%, var(--theme-navy) 100%);
    color: #fff;
}

.landing-hero h1 {
    color: #fff;
    font-size: 46px;
    font-weight: 700 !important;
    line-height: 1.15;
}

.landing-hero p.lead {
    font-size: 18px;
    opacity: 0.92;
}

.landing-hero .btn-light {
    border-color: #fff;
    color: var(--theme-green);
}

.landing-hero .btn-outline-light:hover {
    color: var(--theme-green);
}

.landing-hero-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.landing-page .features-icon {
    color: var(--theme-green);
    font-size: 40px;
}

.landing-page .faq-item {
    margin-bottom: 10px;
    padding: 15px 20px;
    border-top: 3px solid var(--theme-border);
    background: #fff;
    text-align: left;
}

@media (max-width: 767.98px) {
    .landing-hero {
        padding: 120px 0 70px;
    }

    .landing-hero h1 {
        font-size: 32px;
    }

    .landing-page .navbar-nav {
        flex-direction: column;
    }

    .navbar-top-links .top-account .account-copy,
    .workspace-context {
        display: none;
    }
}

/* Registration has more fields than the other account pages. */
.auth-page:has(.auth-card-wide) {
    max-width: 680px;
}

/* site.css styled the previous shell through body.app-shell; the theme owns the page frame now. */
body.app-shell {
    display: block;
    min-height: 100vh;
    background: var(--theme-navy);
    color: var(--theme-text);
    font-family: var(--hrms-font-body);
}

.landing-hero p.lead,
.landing-hero p {
    color: #fff;
}

.landing-hero-card,
.landing-hero-card p {
    color: var(--theme-text);
}

.landing-hero-card h5,
.landing-hero-card strong {
    color: var(--theme-navy);
}

.auth-page a,
.landing-page .navbar a {
    text-decoration: none;
}

/* ---------------------------------------------------------------- Sidebar menu groups */

/* A group opens with li.expanded (not "open": the theme paints .nav .open > a white) (set by the server for the current page and by hrms-ui.js on click).
   In the collapsed sidebar the theme shows the group as a flyout on hover instead. */
body:not(.mini-navbar) #side-menu .nav-group:not(.expanded) > .nav-second-level {
    display: none;
}

#side-menu .nav-group.expanded > a > .fa.arrow:before {
    content: "\f107";
}

#side-menu .nav-second-level .sidebar-link {
    padding-left: 52px;
}

#side-menu .nav-group-toggle,
#side-menu .nav-group-toggle:hover,
#side-menu .nav-group-toggle:focus {
    text-decoration: none;
    background: transparent;
}

#side-menu .nav-group-toggle:hover,
#side-menu .nav-group.active > .nav-group-toggle {
    color: #fff;
}

/* ---------------------------------------------------------------- Organization dashboard (dashboard_4_1 layout) */

.dashboard-heading {
    margin: 0 0 20px;
    padding-bottom: 10px;
}

.dashboard-theme .dashboard-stat {
    height: 100%;
    border: 1px solid #e7eaec;
    padding: 15px 20px 18px;
}

.dashboard-theme .dashboard-stat h1 {
    font-weight: 300;
}

.dashboard-theme .dashboard-panel {
    border: 1px solid #e7eaec;
    padding: 20px 25px;
}

.dashboard-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dashboard-chart {
    position: relative;
}

.dashboard-chart-lg { height: 260px; }
.dashboard-chart-md { height: 220px; }
.dashboard-chart-sm { height: 170px; }

.dashboard-theme .stat-list li {
    margin-top: 20px;
}

.dashboard-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f4;
}

.dashboard-activity > i { font-size: 18px; }
.dashboard-activity-green { color: #0E9F6E; }
.dashboard-activity-blue { color: #1c84c6; }
.dashboard-activity-purple { color: #7f6ad8; }
.dashboard-activity-orange { color: #f8ac59; }

/* Dashboard iboxes in one row share the same height; the title bar keeps its label on the right. */
.dashboard-theme .dashboard-card {
    display: flex;
    flex-direction: column;
}

.dashboard-theme .dashboard-card > .ibox-content {
    flex: 1;
}

.dashboard-theme .ibox-title {
    display: flex;
    align-items: center;
    gap: 8px;
    /* The theme keeps 90px on the right for ibox-tools icons, which the dashboard does not use. */
    padding-right: 15px;
}

.dashboard-theme .ibox-title h5 {
    float: none;
    margin: 0;
}

/* ---------------------------------------------------------------- Collapsed sidebar (body.mini-navbar), as in the theme */

/* Section captions do not fit the 70px menu. */
body.mini-navbar #side-menu .nav-section {
    display: none;
}

/* Theme header in the collapsed menu: green bar with the short logo. */
body.mini-navbar .navbar-static-side .nav-header {
    padding: 0;
    background-color: #0E9F6E;
}

body.mini-navbar .navbar-static-side .logo-element {
    padding: 18px 0;
}

/* The flyout (theme: position absolute; top 0) opens beside the item that was hovered. */
#side-menu > li {
    position: relative;
}

body.mini-navbar #side-menu .nav-second-level .sidebar-link {
    min-height: 0;
    padding: 10px 10px 10px 15px;
    white-space: nowrap;
    transform: none;
}

/* ---------------------------------------------------------------- Employee list */

.employee-widgets .dashboard-stat {
    height: 100%;
    border: 1px solid #e7eaec;
    padding: 15px 20px 18px;
}

.employee-widgets .dashboard-stat h1 {
    font-weight: 300;
}

.employee-list .ibox-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
}

.employee-list .ibox-title h5 {
    float: none;
    margin: 0;
}

.employee-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.employee-avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- Shared page layout: stat cards + ibox with a flex title bar */

.page-stat-cards .dashboard-stat {
    height: 100%;
    border: 1px solid #e7eaec;
    padding: 15px 20px 18px;
}

.page-stat-cards .dashboard-stat h1 {
    font-weight: 300;
}

.page-ibox .ibox-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
}

.page-ibox .ibox-title h5 {
    float: none;
    margin: 0;
}

.attendance-date {
    width: 170px;
}

/* ---------------------------------------------------------------- Sidebar: open group and current sub-item */

/* An open group gets the theme's darker background; the green bar marks the group holding the current page. */
#side-menu .nav-group.expanded {
    background: #14112F;
}

#side-menu .nav-group.active {
    border-left: 4px solid #0E9F6E;
}

#side-menu .nav-second-level > li > .sidebar-link {
    font-size: 13px;
    color: #B9B4E6;
}

#side-menu .nav-second-level > li.active > .sidebar-link {
    color: #fff;
    font-weight: 600;
}

/* Small green dot before the current page in an open group (expanded menu only).
   Positioned absolutely so the active item's text stays aligned with the others. */
#side-menu .nav-second-level > li {
    position: relative;
}

body:not(.mini-navbar) #side-menu .nav-second-level > li.active > .sidebar-link::before {
    content: "";
    position: absolute;
    left: 38px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #0E9F6E;
}

.leave-reason {
    max-width: 240px;
}

/* ---------------------------------------------------------------- Form validation (Bootstrap style, theme red) */

.form-control.is-invalid,
.form-select.is-invalid,
.input-validation-error {
    border-color: #ed5565;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #ed5565;
    box-shadow: 0 0 0 0.2rem rgba(237, 85, 101, 0.2);
}

.invalid-feedback {
    color: #ed5565;
}

/* Select2 boxes and input groups (date picker) */
.select2.is-invalid .select2-selection,
.input-group.is-invalid .input-group-text {
    border-color: #ed5565;
}

/* Server-side messages from asp-validation-for / ModelState use the same look. */
.field-validation-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #ed5565;
}

/* ---------------------------------------------------------------- Subscription override (Super Admin) */

.override-facts dt {
    font-weight: 400;
    color: #999c9e;
}

.override-facts dd {
    margin-bottom: 8px;
}

.override-choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    height: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e6e7;
    border-radius: 3px;
    cursor: pointer;
}

.override-choice:has(input:checked) {
    border-color: #0E9F6E;
    background: #f5fbf9;
}

.override-choice small {
    display: block;
    color: #999c9e;
}

/* ---------------------------------------------------------------- Payslip (theme invoice layout) */

.payslip-sheet { position: relative; overflow: hidden; max-width: 980px; margin: 0 auto; padding: 36px 40px; background: #fff; border: 1px solid #e7eaec; }
.payslip-watermark { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 120px; font-weight: 700; letter-spacing: 12px; color: rgba(248, 172, 89, 0.13); pointer-events: none; }
.payslip-header { display: flex; justify-content: space-between; align-items: flex-start; }
.payslip-org { display: flex; align-items: center; gap: 14px; }
.payslip-logo { width: 52px; height: 52px; border-radius: 8px; background: #0E9F6E; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; }
.payslip-org-name { font-size: 20px; font-weight: 600; color: #1B1740; }
.payslip-title { font-size: 26px; font-weight: 300; letter-spacing: 2px; color: #1B1740; }
.payslip-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 26px 0; padding: 16px 18px; background: #f9f9f9; border: 1px solid #f0f0f0; }
.payslip-facts > div { display: flex; flex-direction: column; }
.payslip-caption { font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: #999c9e; }
.payslip-table thead th { border-bottom: 2px solid #e7eaec; font-weight: 600; }
.payslip-table tfoot td { font-weight: 600; border-bottom: 0; }
.payslip-net { display: flex; gap: 24px; align-items: center; margin-top: 10px; }
.payslip-net-box { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 3px; background: #0E9F6E; color: #fff; }
.payslip-net-box small { display: block; opacity: 0.9; }
.payslip-net-caption { font-size: 12px; letter-spacing: 1px; }
.payslip-net-amount { font-size: 28px; font-weight: 300; white-space: nowrap; }
.payslip-qr { width: 104px; text-align: center; }
.payslip-qr svg { display: block; width: 104px; height: 104px; }
.payslip-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.payslip-signatures > div { padding-top: 6px; border-top: 1px solid #d1dade; font-size: 12px; color: #999c9e; }
.payslip-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 11px; color: #999c9e; }
.payslip-verify { max-width: 460px; margin: 0 auto; padding: 32px; border: 1px solid #e7eaec; }
.payslip-verify-icon { font-size: 54px; margin-bottom: 10px; }

@media (max-width: 767px) {
    .payslip-sheet { padding: 20px; }
    .payslip-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payslip-net { flex-direction: column; align-items: stretch; }
    .payslip-qr { margin: 0 auto; }
}

/* ---------------------------------------------------------------- Print: only the page content */

/* One A4 portrait page with normal margins. */
@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    .navbar-static-side,
    #page-wrapper > .row.border-bottom,
    .footer,
    .no-print,
    [data-print] { display: none !important; }

    /* The screen layout stretches to the window height (min-height: 100vh / flex), which
       spills onto an empty second page when printed; print only the content's own height. */
    html, body, #wrapper, #page-wrapper, .wrapper-content {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    #page-wrapper { display: block !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
    .wrapper-content { padding: 0 !important; }
    .payslip-sheet { border: 0; max-width: none; padding: 0; page-break-inside: avoid; break-inside: avoid; }
    .payslip-watermark { font-size: 96px; }

    /* Keep the coloured net pay box, logo and labels when printing. */
    .payslip-net-box, .payslip-logo, .payslip-facts, .label { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Small selects in an ibox title (month, year) are sized to their longest option. */
.page-ibox .ibox-title .form-select-sm {
    width: auto;
    min-width: 92px;
}

.report-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex: none;
}

/* ---------------------------------------------------------------- My HR Portal */

.my-profile { padding: 26px 22px; }
.my-profile-avatar { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; background: #0E9F6E; color: #fff; font-size: 26px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.my-profile-facts { margin: 16px 0; padding-top: 14px; border-top: 1px solid #f3f3f4; }
.my-profile-facts li { padding: 4px 0; word-break: break-word; }
.my-profile-facts .fa { width: 18px; color: #999c9e; }
.my-stat { height: 100%; border: 1px solid #e7eaec; padding: 14px 18px; }
.my-stat h2 { font-weight: 300; }
.my-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #e7eaec; }
.my-timeline li { position: relative; padding: 0 0 14px 6px; }
.my-timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #0E9F6E; border: 2px solid #fff; }
.my-profile-empty { padding: 48px 32px; border: 1px solid #e7eaec; }
.my-profile-empty > .fa { font-size: 56px; margin-bottom: 14px; }

/* ---------------------------------------------------------------- Notifications */

.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid #f3f3f4; }
.notification-list li:last-child { border-bottom: 0; }
.notification-list li.is-unread { background: #f5fbf9; }
.notification-list li.is-unread .notification-title { font-weight: 600; }
.notification-title { color: #1B1740; }
.notification-icon { width: 36px; height: 36px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.notification-icon.tone-navy { background: #e3f6f1; color: #0E9F6E; }
.notification-icon.tone-blue { background: #e4f2fd; color: #1c84c6; }
.notification-icon.tone-yellow { background: #fdf2e3; color: #f8ac59; }
.notification-icon.tone-lazur { background: #e2f7f7; color: #23c6c8; }
.notification-icon.tone-gray { background: #f3f3f4; color: #999c9e; }
.notification-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #0E9F6E; vertical-align: middle; }

/* ---------------------------------------------------------------- HR setup: section tabs in the ibox title */

.setup-tabs-bar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.setup-tabs {
    display: flex;
    gap: 2px;
    margin: 0;
}

.setup-tabs .nav-link {
    padding: 14px 16px 12px;
    border-bottom: 3px solid transparent;
    color: #676a6c;
    font-weight: 600;
}

.setup-tabs .nav-link:hover {
    color: #0E9F6E;
}

.setup-tabs .nav-link.active {
    color: #1B1740;
    border-bottom-color: #0E9F6E;
    background: transparent;
}

.org-avatar {
    width: 84px;
    height: 84px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: #0E9F6E;
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plan-name {
    font-size: 26px;
    font-weight: 300;
    color: #1B1740;
}

/* Leave apply: calculated working days */
.leave-days-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f9f9f9;
    border: 1px solid #f0f0f0;
}

.leave-days-number {
    font-size: 26px;
    font-weight: 300;
    color: #0E9F6E;
    margin-right: 4px;
}

/* Section headings inside long forms (employee record) */
.form-section {
    margin: 26px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    color: #1B1740;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.form-section:first-child {
    margin-top: 0;
}


/* ---------- Add employee wizard (Views/Employees/Edit.cshtml, pages/employee-wizard.js) ---------- */
.wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: -15px -20px 20px;
    padding: 0;
    border-bottom: 1px solid #e7eaec;
}

.wizard-steps button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #676a6c;
    font-size: 13px;
    text-align: left;
}

.wizard-steps button:disabled {
    color: #b0b3b5;
    cursor: default;
}

.wizard-number {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #d1dade;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.wizard-steps li.active button {
    color: #1B1740;
    font-weight: 600;
    border-bottom-color: #0E9F6E;
}

.wizard-steps li.active .wizard-number {
    border-color: #0E9F6E;
    color: #0E9F6E;
}

.wizard-steps li.done .wizard-number {
    background: #0E9F6E;
    border-color: #0E9F6E;
    color: #fff;
}

.wizard-active .wizard-pane > [data-wizard-heading] {
    display: none;
}

.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid #e7eaec;
    background: #f9f9f9;
}

.wizard-footer [hidden] {
    display: none !important;
}

.wizard-review {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.wizard-review-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 12px;
    margin: 0;
    font-size: 12px;
}

.wizard-review-list dt {
    font-weight: normal;
    color: #888;
}

.wizard-review-list dd {
    margin: 0;
    word-break: break-word;
}

@media (max-width: 767.98px) {
    .wizard-steps,
    .wizard-review {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Countries (platform admin) ---------- */
.country-form .form-section {
    margin-top: 22px;
}

.country-form .form-section.mt-0 {
    margin-top: 0;
}

.day-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.day-toggles .btn {
    min-width: 46px;
}

.day-toggles .btn-check:checked + .btn {
    background: #0E9F6E;
    border-color: #0E9F6E;
    color: #fff;
}

.eos-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.eos-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #676a6c;
}

.eos-step .form-control {
    width: 80px;
}

[data-eos-rule][hidden] {
    display: none !important;
}

/* Arabic labels on payslips and letters (country setting). */
.doc-ar {
    display: block;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 0.85em;
    font-weight: normal;
    color: #888;
    letter-spacing: 0;
    text-transform: none;
}

.letter-ar {
    direction: rtl;
    text-align: right;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    border-top: 1px dashed #e7eaec;
    margin-top: 24px;
    padding-top: 16px;
}

/* Dashboard: today view */
.dashboard-greeting { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.dashboard-greeting h2 { font-size: 20px; font-weight: 600; margin: 0 0 2px; color: #1B1740; }
.dashboard-greeting small { color: #8a9099; }
.dashboard-quick { display: flex; gap: 8px; }
.dashboard-theme .dashboard-stat > small:first-child { display: block; color: #8a9099; margin-bottom: 4px; }
.dashboard-of { font-size: 14px; color: #B9B4E6; font-weight: 400; }
.dashboard-action, .dashboard-event { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f0f1f3; }
.dashboard-action:first-child, .dashboard-event:first-child { border-top: 0; padding-top: 0; }
.dashboard-action-icon { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.tone-teal { background: #e1f5ee; color: #0f6e56; }
.tone-amber { background: #fdf1de; color: #a0620b; }
.tone-red { background: #fcebeb; color: #a32d2d; }
.tone-purple { background: #eeedfe; color: #534ab7; }
.dashboard-event i { width: 18px; text-align: center; color: #8a9099; }
.dashboard-empty { display: flex; align-items: center; gap: 10px; color: #676a6c; padding: 18px 0; }
.dashboard-empty i { font-size: 22px; color: #0E9F6E; }
.payroll-steps { display: flex; gap: 6px; }
.payroll-step { flex: 1; text-align: center; }
.payroll-step span { display: block; height: 6px; border-radius: 3px; background: #eceef1; margin-bottom: 6px; }
.payroll-step.done span { background: #0E9F6E; }
.payroll-step.current span { background: #f8ac59; }
.payroll-step small { color: #8a9099; }
.payroll-step.done small, .payroll-step.current small { color: #1B1740; font-weight: 600; }

/* Mark attendance (modal and page) */
.attendance-page { max-width: 640px; }
.attendance-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; background: #f7f8fa; border-radius: 8px; }
.attendance-person strong { display: block; color: #1B1740; font-size: 14px; }
.attendance-person small { color: #8a9099; }
.attendance-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e1f5ee; color: #0f6e56; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.attendance-date input { width: 150px; }
.attendance-status { display: flex; flex-wrap: wrap; gap: 8px; }
.attendance-status-option { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #e7eaec; border-radius: 20px; font-size: 13px; color: #676a6c; cursor: pointer; margin: 0; transition: all .15s; }
.attendance-status-option:hover { border-color: #0E9F6E; color: #0E9F6E; }
.btn-check:checked + .attendance-status-option { background: #0E9F6E; border-color: #0E9F6E; color: #fff; }
.btn-check:focus-visible + .attendance-status-option { box-shadow: 0 0 0 3px rgba(14, 159, 110,.25); }

/* Employee profile */
.employee-link { color: #1B1740; }
.employee-link:hover { color: #0E9F6E; }
.profile-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-header h2 { font-size: 20px; font-weight: 600; color: #1B1740; margin: 0 0 4px; }
.profile-header h2 .label { font-size: 11px; vertical-align: 3px; margin-left: 6px; }
.profile-header small { color: #8a9099; }
.profile-avatar { width: 58px; height: 58px; border-radius: 50%; background: #e1f5ee; color: #0f6e56; font-size: 20px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-actions { display: flex; gap: 6px; }
.min-w-0 { min-width: 0; }
.profile-tabs-wrap { padding-top: 6px; }
.profile-tabs { gap: 2px; border-bottom: 1px solid #e7eaec; flex-wrap: wrap; }
.profile-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; color: #8a9099; font-weight: 600; font-size: 13px; margin-bottom: -1px; }
.profile-tabs button:hover { color: #1B1740; }
.profile-tabs button.active { color: #0E9F6E; border-bottom-color: #0E9F6E; }
.profile-count { background: #f3f3f4; color: #676a6c; border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.profile-section { font-size: 13px; font-weight: 600; color: #1B1740; text-transform: none; margin-bottom: 10px; }
.profile-dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.profile-dl dt { color: #8a9099; font-weight: 400; }
.profile-dl dd { margin: 0; color: #3a3f44; word-break: break-word; }
.profile-timeline-item { border-left: 2px solid #e7eaec; padding: 0 0 14px 14px; position: relative; font-size: 13px; }
.profile-timeline-item::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: #0E9F6E; border: 2px solid #fff; }
.profile-balance { border: 1px solid #e7eaec; border-radius: 8px; padding: 12px 14px; }
.profile-balance small { color: #8a9099; display: block; }
.profile-balance strong { font-size: 20px; color: #1B1740; display: block; margin: 2px 0 6px; }
.profile-balance strong span { font-size: 13px; color: #B9B4E6; font-weight: 400; }
.profile-document { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e7eaec; border-radius: 8px; color: #3a3f44; }
.profile-document:hover { border-color: #0E9F6E; color: #3a3f44; }
.profile-document > .fa-file-o { font-size: 20px; color: #8a9099; }
@media (max-width: 575.98px) { .profile-dl { grid-template-columns: 1fr; gap: 2px; } .profile-dl dd { margin-bottom: 8px; } }

/* Setup tiles */
.setup-tile { display: flex; flex-direction: column; gap: 6px; height: 100%; color: #3a3f44; border: 1px solid transparent; transition: border-color .15s; }
.setup-tile:hover { border-color: #0E9F6E; color: #3a3f44; }
.setup-tile strong { color: #1B1740; margin-top: 6px; }

/* White stat cards on any page (profile, payments, billing) */
.dashboard-stat { height: 100%; border: 1px solid #e7eaec; padding: 15px 20px 18px; }
.dashboard-stat h1 { font-weight: 300; margin: 2px 0 2px; }
.dashboard-stat > small:first-child, .dashboard-stat > div > small:first-child { display: block; color: #8a9099; margin-bottom: 4px; }

/* Guided payroll run */
.payroll-stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.payroll-stepper-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #B9B4E6; }
.payroll-stepper-step.done, .payroll-stepper-step.current { color: #1B1740; font-weight: 600; }
.payroll-stepper-dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f3f3f4; font-size: 12px; font-weight: 600; }
.payroll-stepper-step.done .payroll-stepper-dot { background: #0E9F6E; color: #fff; }
.payroll-stepper-step.current .payroll-stepper-dot { background: #fdf1de; color: #a0620b; border: 2px solid #f8ac59; }
.payroll-stepper-line { flex: 1; min-width: 24px; height: 2px; background: #e7eaec; }
.payroll-stepper-line.done { background: #0E9F6E; }
.payroll-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #f0f1f3; font-size: 13px; }
.payroll-check:first-child { border-top: 0; padding-top: 0; }
.payroll-check > i { margin-top: 2px; font-size: 15px; }
.payroll-check.error > i { color: #ed5565; }
.payroll-check.warning > i { color: #f8ac59; }
.payroll-check.ok > i { color: #0E9F6E; }
.payroll-check.ok strong { font-weight: 400; color: #8a9099; }
tr.payroll-flagged > td { background: #fff8ec !important; }

/* My HR portal on phones */
.me-today .ibox-content { border-left: 4px solid #0E9F6E; }
.me-today-clock { font-size: 26px; font-weight: 300; color: #1B1740; min-width: 78px; }
.me-today-button { padding: 8px 22px; font-weight: 600; }
.me-quickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; background: #fff; border-top: 1px solid #e7eaec; box-shadow: 0 -2px 8px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom); }
.me-quickbar a, .me-quickbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 11px; color: #676a6c; background: none; border: 0; }
.me-quickbar .fa { font-size: 18px; color: #0E9F6E; }
@media (max-width: 991.98px) {
    body:has(.me-quickbar) #page-wrapper, body:has(.me-quickbar) .wrapper-content { padding-bottom: 72px; }
}
@media (max-width: 575.98px) {
    .me-today .ibox-content { flex-direction: column; align-items: stretch !important; text-align: center; }
    .me-today-action { margin-left: 0 !important; }
    .me-today-button { width: 100%; padding: 12px; font-size: 16px; }
    .me-today-clock { font-size: 34px; }
    .my-profile { display: grid; grid-template-columns: 56px 1fr; gap: 0 14px; text-align: left !important; padding: 16px; }
    .my-profile-avatar { width: 56px; height: 56px; font-size: 20px; margin: 0; grid-row: span 3; }
    .my-profile-facts, .my-profile .btn { grid-column: 1 / -1; }
    .my-stat { padding: 12px 14px; }
    .my-stat h2 { font-size: 22px; }
    .ibox-title { flex-wrap: wrap; gap: 6px; }
}

/* Two-factor recovery codes */
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.recovery-codes code { background: #fff; border: 1px solid #e7eaec; border-radius: 4px; padding: 6px 8px; text-align: center; font-size: 13px; color: #1B1740; }

/* ================================================================ Indigo and mint brand (matches the sign-in and public pages)
   Indigo #1B1740 for structure and primary actions, mint #34D399 / #0E9F6E for active and positive,
   apricot for warnings, periwinkle for info. Loaded after style.css, so these win over INSPINIA. */
:root {
    --brand-ink: #1B1740; --brand-ink-2: #262055; --brand-ink-3: #3A3373; --brand-ink-deep: #14112F;
    --brand-mint: #34D399; --brand-mint-dark: #0E9F6E; --brand-apricot: #FDBA74; --brand-peri: #A5B4FC;
    --brand-page: #F6F5FD; --brand-line: #E4E2F2; --brand-muted: #6E6A93; --brand-lav: #C7C2F2;
    --theme-navy: #1B1740; --theme-navy-dark: #14112F; --theme-text: #3F3A64; --theme-border: #E4E2F2; --theme-gray-bg: #F6F5FD;
    --hrms-primary: #1B1740; --hrms-text: #3F3A64; --hrms-muted: #6E6A93;
    --bs-primary: #1B1740; --bs-primary-rgb: 27, 23, 64;
    --bs-link-color: #4F46E5; --bs-link-color-rgb: 79, 70, 229; --bs-link-hover-color: #1B1740;
    --bs-body-color: #3F3A64; --bs-border-color: #E4E2F2;
    --bs-success: #0E9F6E; --bs-success-rgb: 14, 159, 110;
    --bs-info: #6366F1; --bs-info-rgb: 99, 102, 241;
    --bs-warning: #F59E0B; --bs-warning-rgb: 245, 158, 11;
}
body.app-shell { color: var(--theme-text); }
.app-shell h1, .app-shell h2, .app-shell h3, .app-shell h4, .app-shell h5 { color: var(--brand-ink); }
.app-shell a { color: #4F46E5; }
.app-shell a:hover { color: var(--brand-ink); }

/* Page background */
.app-shell #page-wrapper, .app-shell .gray-bg, .app-shell .wrapper-content { background-color: var(--brand-page); }

/* Sidebar */
.app-shell .navbar-default.navbar-static-side, .app-shell .navbar-static-side, .app-shell #wrapper { background-color: var(--brand-ink); }
.app-shell .nav-header { background: var(--brand-ink) !important; background-image: none !important; border-bottom: 1px solid rgba(255,255,255,.06); }
.app-shell .navbar-default .nav > li > a { color: var(--brand-lav); font-weight: 500; }
.app-shell .navbar-default .nav > li > a:hover, .app-shell .navbar-default .nav > li > a:focus { background-color: var(--brand-ink-2); color: #fff; }
.app-shell .nav > li.active { background: var(--brand-ink-2); border-left: 4px solid var(--brand-mint); }
.app-shell .nav > li.active > a { color: #fff; }
.app-shell .nav > li.active > a i { color: var(--brand-mint); }
.app-shell .nav-second-level, .app-shell #side-menu .nav-group.expanded { background: var(--brand-ink-deep); }
.app-shell #side-menu .nav-group.active { border-left-color: var(--brand-mint); }
.app-shell #side-menu .nav-second-level > li.active > .sidebar-link { color: #fff; }
body.app-shell:not(.mini-navbar) #side-menu .nav-second-level > li.active > .sidebar-link::before { background: var(--brand-mint); }
.app-shell .nav-section { color: #8E88C9; }
.app-shell .hrms-brand { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #fff; font-size: 18px; }
.hrms-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-mint); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.hrms-platform-badge { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--brand-peri); color: var(--brand-ink); }
.app-shell .logo-element { background: var(--brand-ink); color: #fff; padding: 18px 0; text-align: center; }
.app-shell .hrms-organization-name { color: var(--brand-lav); }

/* Top bar */
.app-shell .navbar-static-top { background: #fff !important; border-bottom: 1px solid var(--brand-line); }
.app-shell .navbar-minimalize.btn-primary { background: var(--brand-ink); border-color: var(--brand-ink); }
.app-shell .top-account .avatar { background: var(--brand-apricot); color: #7C2D12; font-weight: 600; }

/* Buttons */
.app-shell .btn-primary, .btn-primary {
    --bs-btn-bg: #1B1740; --bs-btn-border-color: #1B1740; --bs-btn-color: #fff;
    --bs-btn-hover-bg: #2A2460; --bs-btn-hover-border-color: #2A2460; --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #14112F; --bs-btn-active-border-color: #14112F;
    --bs-btn-disabled-bg: #1B1740; --bs-btn-disabled-border-color: #1B1740;
    background-color: var(--bs-btn-bg); border-color: var(--bs-btn-border-color); color: #fff;
}
.app-shell .btn-primary:hover, .app-shell .btn-primary:focus { background-color: #2A2460; border-color: #2A2460; color: #fff; }
.app-shell .btn-outline-primary { --bs-btn-color: #1B1740; --bs-btn-border-color: #1B1740; --bs-btn-hover-bg: #1B1740; --bs-btn-hover-border-color: #1B1740; --bs-btn-hover-color: #fff; color: #1B1740; border-color: #1B1740; }
.app-shell .btn-outline-primary:hover { background: #1B1740; color: #fff; }
.app-shell .btn-success, .btn-success { --bs-btn-bg: #34D399; --bs-btn-border-color: #34D399; --bs-btn-color: #1B1740; --bs-btn-hover-bg: #6EE7B7; --bs-btn-hover-border-color: #6EE7B7; --bs-btn-hover-color: #1B1740;
    background-color: #34D399; border-color: #34D399; color: #1B1740; font-weight: 600; }
.app-shell .btn-success:hover { background-color: #6EE7B7; border-color: #6EE7B7; color: #1B1740; }
.app-shell .btn-warning { background-color: var(--brand-apricot); border-color: var(--brand-apricot); color: #7C2D12; }
.app-shell .btn-info { background-color: #6366F1; border-color: #6366F1; color: #fff; }
.app-shell .btn-white, .app-shell .btn-default { border-color: var(--brand-line); color: var(--brand-ink); }
.app-shell .btn-white:hover, .app-shell .btn-default:hover { border-color: var(--brand-ink); color: var(--brand-ink); }
.app-shell .btn { border-radius: 8px; }

/* Text and background helpers */
.app-shell .text-navy, .app-shell .text-success { color: var(--brand-mint-dark) !important; }
.app-shell .text-primary { color: var(--brand-ink) !important; }
.app-shell .text-info { color: #4F46E5 !important; }
.app-shell .text-warning { color: #B45309 !important; }
.app-shell .navy-bg, .app-shell .bg-primary { background-color: var(--brand-ink) !important; color: #fff; }
.app-shell .bg-success { background-color: var(--brand-mint-dark) !important; }

/* Badges and labels: soft tints */
.app-shell .label-primary, .app-shell .badge-primary, .app-shell .badge.bg-primary { background: #EEF0FF !important; color: var(--brand-ink) !important; }
.app-shell .label-success, .app-shell .badge-success, .app-shell .badge.bg-success { background: #DCFCE9 !important; color: var(--brand-mint-dark) !important; }
.app-shell .label-warning, .app-shell .badge-warning, .app-shell .badge.bg-warning { background: #FFF1E0 !important; color: #B45309 !important; }
.app-shell .label-info, .app-shell .badge-info, .app-shell .badge.bg-info { background: #EEF0FF !important; color: #4F46E5 !important; }
.app-shell .label-danger, .app-shell .badge-danger, .app-shell .badge.bg-danger { background: #FFE4E8 !important; color: #BE123C !important; }

/* Cards (ibox) */
.app-shell .ibox, .app-shell .ibox-content, .app-shell .ibox-title { border-color: var(--brand-line); }
.app-shell .ibox { border-radius: 14px; overflow: hidden; border: 1px solid var(--brand-line); background: #fff; }
.app-shell .ibox-title { border-top: 0; border-width: 0 0 1px; }
.app-shell .ibox-title h5 { color: var(--brand-ink); font-weight: 600; }

/* Forms */
.app-shell .form-control:focus, .app-shell .form-select:focus { border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(27,23,64,.08); }
.app-shell .form-check-input:checked { background-color: var(--brand-mint-dark); border-color: var(--brand-mint-dark); }
.app-shell .select2-container--default .select2-results__option--highlighted[aria-selected],
.app-shell .select2-container--default .select2-results__option--highlighted { background-color: var(--brand-ink); }

/* Tables, tabs, pagination, progress */
.app-shell .table > thead > tr > th { color: var(--brand-muted); }
.app-shell .nav-tabs .nav-link.active, .app-shell .nav-tabs > li.active > a { color: var(--brand-ink); border-bottom-color: var(--brand-mint); }
.app-shell .page-item.active .page-link { background: var(--brand-ink) !important; border-color: var(--brand-ink) !important; color: #fff !important; }
.app-shell .page-link { color: var(--brand-ink); }
.app-shell .progress-bar { background-color: var(--brand-mint); }
.app-shell .progress-bar.bg-warning { background-color: var(--brand-apricot) !important; }
.app-shell .modal-header { border-bottom-color: var(--brand-line); }
.app-shell .modal-title { color: var(--brand-ink); }
.app-shell .footer { background: #fff; border-top: 1px solid var(--brand-line); color: var(--brand-muted); }

/* ---- Brand: data tables and stat cards */
.app-shell table.dataTable thead th, .app-shell .table > thead > tr > th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-muted); background: #FAFAFE; border-bottom: 1px solid var(--brand-line) !important; }
.app-shell table.dataTable > tbody > tr > td, .app-shell .table > tbody > tr > td { border-color: #EEEDF7; vertical-align: middle; }
.app-shell table.dataTable > tbody > tr:hover > *, .app-shell .table-hover > tbody > tr:hover > * { box-shadow: inset 0 0 0 9999px #F6F5FD; }
.app-shell table.dataTable td.dt-empty { background: #fff !important; box-shadow: none !important; color: var(--brand-muted); padding: 40px 0 !important; }
.app-shell .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #FAFAFE; }
.app-shell div.dt-container .dt-input, .app-shell div.dt-container .dt-search input { border: 1px solid var(--brand-line); border-radius: 8px; padding: 6px 12px; }
.app-shell div.dt-container .dt-search input:focus { border-color: var(--brand-ink); outline: 0; box-shadow: 0 0 0 3px rgba(27,23,64,.08); }
.app-shell .pagination { gap: 4px; }
.app-shell .pagination .page-link { border-radius: 8px !important; border-color: var(--brand-line); }
.app-shell .dt-info { color: var(--brand-muted); }
.app-shell .dashboard-stat, .app-shell .widget, .app-shell .stat-card { border: 1px solid var(--brand-line); border-radius: 14px; background: #fff; }
.app-shell .dashboard-stat i, .app-shell .stat-card i { width: 36px; height: 36px; border-radius: 10px; background: #EEF0FF; color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }

/* ---- Subscription & Billing page (Views/Subscriptions/Index.cshtml) */
.bl-hero { background: var(--brand-ink); color: var(--brand-lav); border-radius: 14px; padding: 22px 24px; }
.bl-plan-name { font-size: 28px; font-weight: 700; color: #fff; margin: 6px 0 2px; letter-spacing: -.4px; }
.bl-btn-ghost { background: transparent; border: 1px solid var(--brand-ink-3); color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.bl-btn-ghost:hover { border-color: var(--brand-peri); }
.bl-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #EEF0FF; color: var(--brand-ink); }
.bl-pill.ok { background: #DCFCE9; color: var(--brand-mint-dark); }
.bl-hero .bl-pill.ok { background: var(--brand-mint); color: var(--brand-ink); }
.bl-pill.info { background: #EEF0FF; color: #4F46E5; }
.bl-pill.warn { background: #FFF1E0; color: #B45309; }
.bl-pill.bad { background: #FFE4E8; color: #BE123C; }
.bl-usage { display: flex; justify-content: space-between; font-size: 13px; color: var(--brand-muted); }
.bl-usage span:last-child { color: var(--brand-ink); font-weight: 500; }
.bl-bar { height: 6px; border-radius: 3px; background: #EEEDF7; margin: 6px 0 14px; overflow: hidden; }
.bl-bar > div { height: 100%; border-radius: 3px; background: var(--brand-mint); }
.bl-bar > div.warn { background: var(--brand-apricot); }
.bl-bar > div.bad { background: #F43F5E; }
.bl-notice { display: flex; align-items: center; gap: 12px; background: #FFF1E0; color: #92400E; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.bl-section-title { font-size: 15px; font-weight: 600; color: var(--brand-ink); margin: 6px 0 10px; }
.bl-option { background: #fff; border: 1px solid var(--brand-line); border-radius: 14px; padding: 20px; height: 100%; }
.bl-option.featured { border: 2px solid var(--brand-mint); }
.bl-option-head { display: flex; align-items: center; gap: 12px; }
.bl-option-head strong { display: block; color: var(--brand-ink); font-size: 15px; }
.bl-option-head small { color: var(--brand-muted); }
.bl-icon { width: 40px; height: 40px; border-radius: 11px; background: #EEF0FF; color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.bl-icon.mint { background: #DCFCE9; color: var(--brand-mint-dark); }
.bl-cycle { display: inline-flex; border: 1px solid var(--brand-line); border-radius: 9px; padding: 3px; gap: 3px; }
.bl-cycle button { border: 0; background: none; border-radius: 7px; padding: 5px 14px; color: var(--brand-muted); font-weight: 500; }
.bl-cycle button.active { background: var(--brand-ink); color: #fff; }
.bl-price { margin: 12px 0 4px; }
.bl-price span { font-size: 26px; font-weight: 700; color: var(--brand-ink); }
.bl-price small { color: var(--brand-muted); }
.bl-fine { font-size: 12px; color: var(--brand-muted); margin-top: 8px; }
.bl-fine i { color: var(--brand-mint-dark); }
.bl-bank { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; background: #FAFAFE; border: 1px solid #EEEDF7; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.bl-bank dt { color: var(--brand-muted); font-weight: 500; }
.bl-bank dd { margin: 0; color: var(--brand-ink); font-weight: 500; word-break: break-all; }
.list-group-item.active-transfer { background: #F4F3FF; border-left: 3px solid var(--brand-ink); }
.transfer-receipt { border: 1px solid var(--brand-line); border-radius: 12px; overflow: hidden; background: #FAFAFE; text-align: center; }
.transfer-receipt img { max-width: 100%; max-height: 420px; display: block; margin: 0 auto; }
.transfer-receipt iframe { width: 100%; height: 420px; border: 0; }

/* ---- Brand: sidebar name and Platform dashboard */
.app-shell .nav-header .hrms-brand, .app-shell .nav-header .hrms-brand:hover { color: #fff !important; flex-wrap: nowrap; }
.app-shell .nav-header .hrms-brand-text { color: #fff !important; font-size: 18px; font-weight: 700; }
.app-shell .platform-stat-card, .app-shell .platform-stat-card.stat-blue, .app-shell .platform-stat-card.stat-green,
.app-shell .platform-stat-card.stat-orange, .app-shell .platform-stat-card.stat-purple { background: #fff; border: 1px solid var(--brand-line); box-shadow: none; border-radius: 14px; }
.app-shell .platform-stat-icon { background: #EEF0FF; color: var(--brand-ink); border-radius: 11px; }
.app-shell .stat-green .platform-stat-icon { background: #DCFCE9; color: var(--brand-mint-dark); }
.app-shell .stat-orange .platform-stat-icon { background: #FFF1E0; color: #B45309; }
.app-shell .stat-purple .platform-stat-icon { background: #EEF0FF; color: #4F46E5; }
.app-shell .platform-stat-value { font-family: inherit; font-weight: 700; color: var(--brand-ink) !important; }
.app-shell .platform-stat-label { color: var(--brand-ink) !important; font-weight: 600; }
.app-shell .platform-stat-note { color: var(--brand-muted); }
.app-shell .platform-panel { border: 1px solid var(--brand-line); box-shadow: none; border-radius: 14px; }
.app-shell .platform-panel h2 { color: var(--brand-ink); font-family: inherit; font-weight: 600; }
.app-shell .platform-panel h2 i { color: var(--brand-mint-dark); }
.app-shell .platform-chart-period { border-color: var(--brand-line); color: var(--brand-muted); }
.app-shell .legend-total { background: var(--brand-ink) !important; }
.app-shell .legend-active { background: var(--brand-mint) !important; }
.app-shell .legend-suspended { background: var(--brand-apricot) !important; }
.app-shell .chart-series-total { stroke: var(--brand-ink); }
.app-shell .chart-series-active { stroke: var(--brand-mint); }
.app-shell .chart-series-suspended { stroke: var(--brand-apricot); }
.app-shell .platform-chart-point.chart-series-total { fill: var(--brand-ink); }
.app-shell .platform-chart-point.chart-series-active { fill: var(--brand-mint); }
.app-shell .platform-chart-point.chart-series-suspended { fill: var(--brand-apricot); }
.app-shell .platform-legend-item { color: var(--brand-muted); }
.app-shell .platform-legend-item.is-active { color: var(--brand-ink); }

/* ---- Brand: DataTables sort arrows (one quiet pair, darker on the sorted column) and platform table */
.app-shell table.dataTable thead > tr > th::before, .app-shell table.dataTable thead > tr > th::after { display: none !important; }
.app-shell table.dataTable thead .dt-column-order ~ .dt-column-order { display: none !important; }
.app-shell table.dataTable thead .dt-column-order { opacity: .35; }
.app-shell table.dataTable thead th:hover .dt-column-order,
.app-shell table.dataTable thead th.dt-ordering-asc .dt-column-order,
.app-shell table.dataTable thead th.dt-ordering-desc .dt-column-order { opacity: 1; color: var(--brand-ink); }
.app-shell .platform-result-count { background: #F4F3FF !important; color: var(--brand-ink) !important; border: 1px solid var(--brand-line) !important; border-radius: 999px !important; font-weight: 500; font-size: 13px; padding: 5px 12px !important; }
.app-shell .platform-table thead th { color: var(--brand-muted); background: #FAFAFE; }
.app-shell .platform-table tbody td { color: var(--theme-text); }
.app-shell .platform-organization-name strong, .app-shell .platform-organization-name a { color: var(--brand-ink); }
.app-shell .platform-organization-icon, .app-shell .platform-org-icon { background: #EEF0FF !important; color: var(--brand-ink) !important; border-radius: 10px; }
.app-shell .platform-panel-heading p { color: var(--brand-muted); }
.app-shell .organization-row-icon { background: #EEF0FF !important; color: var(--brand-ink) !important; border-radius: 10px; }
.app-shell .platform-status.status-active { background: #DCFCE9; color: var(--brand-mint-dark); }
.app-shell .platform-status.status-suspended { background: #FFF1E0; color: #B45309; }
.app-shell .platform-table td.text-muted { color: var(--brand-muted) !important; }

/* ---- Brand: table paging (Bootstrap markup: ul.pagination > li.page-item > .page-link) */
.app-shell div.dt-container .dt-paging .pagination { margin: 0; gap: 6px; }
.app-shell .pagination .page-item .page-link { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--brand-line); border-radius: 8px !important; background: #fff; color: var(--brand-ink); box-shadow: none; font-size: 13px; }
.app-shell .pagination .page-item .page-link:hover { border-color: var(--brand-ink); background: #fff; color: var(--brand-ink); }
.app-shell .pagination .page-item.active .page-link { background: var(--brand-ink) !important; border-color: var(--brand-ink) !important; color: #fff !important; }
.app-shell .pagination .page-item.disabled .page-link { opacity: .45; background: #fff; }
.app-shell div.dt-container div.dt-layout-row { margin: 10px 0; }

/* ---- Brand: one sort indicator per sortable column */
.app-shell table.dataTable thead .dt-column-order::before { display: none !important; }
.app-shell table.dataTable thead th.dt-orderable-asc .dt-column-order::after,
.app-shell table.dataTable thead th.dt-orderable-desc .dt-column-order::after { content: "\2195" !important; opacity: 1 !important; top: 50% !important; bottom: auto !important; transform: translateY(-50%); font-size: 12px; line-height: 1; }
.app-shell table.dataTable thead th.dt-ordering-asc .dt-column-order::after { content: "\2191" !important; }
.app-shell table.dataTable thead th.dt-ordering-desc .dt-column-order::after { content: "\2193" !important; }

/* ---- Sort indicator v2: drawn after the column title, so there is exactly one whatever DataTables renders */
.app-shell table.dataTable thead .dt-column-order { display: none !important; }
.app-shell table.dataTable thead th.dt-orderable-asc .dt-column-title::after,
.app-shell table.dataTable thead th.dt-orderable-desc .dt-column-title::after { content: "\2195"; margin-left: 6px; font-size: 11px; opacity: .35; }
.app-shell table.dataTable thead th:hover .dt-column-title::after { opacity: .7; }
.app-shell table.dataTable thead th.dt-ordering-asc .dt-column-title::after { content: "\2191"; opacity: 1; color: var(--brand-ink); }
.app-shell table.dataTable thead th.dt-ordering-desc .dt-column-title::after { content: "\2193"; opacity: 1; color: var(--brand-ink); }
.app-shell .dropdown-menu { border: 1px solid var(--brand-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(27,23,64,.14); padding: 6px; }
.app-shell .dropdown-menu .dropdown-item { border-radius: 8px; padding: 8px 12px; color: var(--brand-ink); }
.app-shell .dropdown-menu .dropdown-item:hover { background: #F4F3FF; }

/* ---- Card headers: title on the left, actions pushed right */
.app-shell .ibox-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 14px 20px; }
.app-shell .ibox-title h5 { margin: 0; float: none; }
.app-shell .ibox-title .ibox-tools { margin-left: auto; float: none; }
.app-shell a.stat-link { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.app-shell a.stat-link:hover { border-color: var(--brand-ink); transform: translateY(-1px); }
.app-shell a.stat-link.stat-attention { border-color: var(--brand-apricot); background: #FFF8EE; }
.app-shell a.stat-link.stat-attention h1 { color: #B45309; }
.app-shell .stat-link-text { font-size: 12px; color: #4F46E5; font-weight: 600; }
.app-shell .badge.text-bg-success { background: #DCFCE9 !important; color: var(--brand-mint-dark) !important; }
.app-shell .badge.text-bg-secondary { background: #EEEDF7 !important; color: var(--brand-muted) !important; }
.app-shell .platform-stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-shell a.platform-stat-card.stat-attention { border-color: var(--brand-apricot); background: #FFF8EE; }
.app-shell a.platform-stat-card.stat-attention .platform-stat-value { color: #B45309 !important; }
.app-shell .platform-stat-note.stat-link-text { color: #4F46E5; font-weight: 600; }
@media (max-width: 991.98px) { .app-shell .platform-stat-grid, .app-shell .platform-stat-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .app-shell .platform-stat-grid, .app-shell .platform-stat-grid-3 { grid-template-columns: 1fr; } }
