/* =========================================================
   PMTAC HRMS - Theme tokens and color schemes
   Switch schemes via <html data-hrms-theme="blue|purple|teal|emerald|rose|slate">
   ========================================================= */

:root,
html[data-hrms-theme="blue"] {
    /* Brand palette aligned with PMTAC navy dashboard + login mockups */
    --hrms-primary: #1A337E;
    --hrms-primary-dark: #12265E;
    --hrms-primary-soft: #EEF2FB;
    --hrms-primary-rgb: 26, 51, 126;
    --hrms-accent: #3454B4;
    --hrms-success: #05CD99;
    --hrms-success-soft: #E6FBF4;
    --hrms-success-text: #047857;
    --hrms-warning: #F59E0B;
    --hrms-warning-soft: #FFF8E8;
    --hrms-warning-text: #B45309;
    --hrms-danger: #EF4444;
    --hrms-danger-soft: #FEF2F2;
    --hrms-info: #3454B4;
    --hrms-info-soft: #E8EEFB;
    --hrms-purple: #8B5CF6;
    --hrms-purple-soft: #F3EEFF;
    --hrms-bg: #F4F7FE;
    --hrms-bg-elevated: #FFFFFF;
    --hrms-card: #FFFFFF;
    --hrms-sidebar: #1A337E;
    --hrms-sidebar-active: #3454B4;
    --hrms-sidebar-text: #FFFFFF;
    --hrms-sidebar-muted: rgba(255, 255, 255, 0.72);
    --hrms-text: #1A337E;
    --hrms-text-secondary: #4A5A7A;
    --hrms-text-muted: #5B6B8C;
    --hrms-border: #E2E8F4;
    --hrms-input: #F0F4F9;
    --hrms-radius: 16px;
    --hrms-radius-sm: 12px;
    --hrms-shadow: 0 12px 40px rgba(26, 51, 126, 0.10);
    --hrms-shadow-sm: 0 4px 16px rgba(26, 51, 126, 0.06);
    --hrms-font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --hrms-sidebar-width: 248px;
    --hrms-sidebar-collapsed-width: 72px;
    --hrms-header-height: 68px;
}

html[data-hrms-theme="purple"] {
    --hrms-primary: #5A4EA3;
    --hrms-primary-dark: #3D3578;
    --hrms-primary-soft: #F1EFFA;
    --hrms-primary-rgb: 90, 78, 163;
    --hrms-accent: #7A6FBE;
    --hrms-info: #7A6FBE;
    --hrms-info-soft: #F1EFFA;
    --hrms-sidebar: #3D3578;
    --hrms-sidebar-active: #7A6FBE;
}

html[data-hrms-theme="teal"] {
    --hrms-primary: #0D9488;
    --hrms-primary-dark: #0F766E;
    --hrms-primary-soft: #F0FDFA;
    --hrms-primary-rgb: 13, 148, 136;
    --hrms-accent: #14B8A6;
    --hrms-info: #0891B2;
    --hrms-info-soft: #ECFEFF;
    --hrms-sidebar: #0B5C56;
    --hrms-sidebar-active: #14B8A6;
}

html[data-hrms-theme="emerald"] {
    --hrms-primary: #059669;
    --hrms-primary-dark: #047857;
    --hrms-primary-soft: #ECFDF5;
    --hrms-primary-rgb: 5, 150, 105;
    --hrms-accent: #10B981;
    --hrms-info: #0D9488;
    --hrms-info-soft: #F0FDFA;
    --hrms-sidebar: #065F46;
    --hrms-sidebar-active: #10B981;
}

html[data-hrms-theme="rose"] {
    --hrms-primary: #BE123C;
    --hrms-primary-dark: #9F1239;
    --hrms-primary-soft: #FFF1F2;
    --hrms-primary-rgb: 190, 18, 60;
    --hrms-accent: #E11D48;
    --hrms-info: #DB2777;
    --hrms-info-soft: #FDF2F8;
    --hrms-sidebar: #9F1239;
    --hrms-sidebar-active: #E11D48;
}

html[data-hrms-theme="slate"] {
    --hrms-primary: #334155;
    --hrms-primary-dark: #1E293B;
    --hrms-primary-soft: #F1F5F9;
    --hrms-primary-rgb: 51, 65, 85;
    --hrms-accent: #475569;
    --hrms-info: #475569;
    --hrms-info-soft: #F8FAFC;
    --hrms-sidebar: #1E293B;
    --hrms-sidebar-active: #475569;
}

/* Apply theme tokens to classic Lexa chrome */
.topnav {
    background: var(--hrms-primary) !important;
}

.megamenu-options {
    background: var(--hrms-primary-dark) !important;
    border-color: transparent !important;
    box-shadow: 0 14px 40px rgba(var(--hrms-primary-rgb), 0.28) !important;
}

.theme-background-color,
.bg-dymnamic {
    background: linear-gradient(135deg, var(--hrms-primary), var(--hrms-primary-dark)) !important;
    color: #fff !important;
}

.v2-theme-bg,
.v2-insights-head,
.v2-announcements-head,
.v2-tasks-head {
    background-color: var(--hrms-primary) !important;
    color: #fff !important;
}

.v2-theme-text {
    color: var(--hrms-primary) !important;
}

.v2-welcome {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 60%, var(--hrms-accent) 100%) !important;
}

/* Theme picker UI */
.hrms-theme-picker .dropdown-menu {
    min-width: 220px;
    border: 1px solid var(--hrms-border);
    border-radius: 12px;
    box-shadow: var(--hrms-shadow);
    padding: 10px;
}

.hrms-theme-picker .hrms-theme-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hrms-text-muted);
    padding: 4px 6px 8px;
}

.hrms-theme-swatches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.hrms-theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hrms-theme-swatch:hover,
.hrms-theme-swatch.is-active {
    background: var(--hrms-primary-soft);
    border-color: rgba(var(--hrms-primary-rgb), 0.25);
}

.hrms-theme-swatch .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.hrms-theme-swatch span {
    font-size: 11px;
    font-weight: 600;
    color: var(--hrms-text-secondary);
}

.hrms-theme-swatch[data-theme="blue"] .dot { background: #1A337E; }
.hrms-theme-swatch[data-theme="purple"] .dot { background: #7A6FBE; }
.hrms-theme-swatch[data-theme="teal"] .dot { background: #0D9488; }
.hrms-theme-swatch[data-theme="emerald"] .dot { background: #059669; }
.hrms-theme-swatch[data-theme="rose"] .dot { background: #E11D48; }
.hrms-theme-swatch[data-theme="slate"] .dot { background: #334155; }

.hrms-theme-picker-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hrms-theme-picker-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Classic Lexa header: keep palette icon readable on colored navbar */
.topnav .hrms-theme-picker .btn.header-item {
    color: #fff !important;
}

.topnav .hrms-theme-picker .dropdown-menu {
    z-index: 1050;
}

/* Shared form cards used by Change Password, Forgot/Reset Password, Verify, etc. */
.hrms-form-page {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 8px 0 24px;
}

.hrms-form-page.is-standalone {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hrms-bg, #F4F7FE);
    padding: 24px 16px;
}

.hrms-form-page.is-standalone .hrms-form-card {
    width: 100%;
    max-width: 520px;
}

.hrms-form-page.is-centered {
    max-width: none;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    width: 100%;
}

.hrms-form-page.is-centered .hrms-form-card {
    width: 100%;
    max-width: 520px;
}

.hrms-form-card {
    background: #fff;
    border: 1px solid var(--hrms-border, #E2E8F4);
    border-radius: 16px;
    box-shadow: var(--hrms-shadow, 0 12px 40px rgba(26, 51, 126, 0.10));
    overflow: hidden;
}

.hrms-form-card-head {
    background: linear-gradient(135deg, var(--hrms-primary, #1A337E) 0%, var(--hrms-accent, #3454B4) 100%);
    color: #fff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hrms-form-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.hrms-form-card-head h2,
.hrms-form-card-head .hrms-form-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.hrms-form-card-head p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.88);
}

.hrms-form-card-body {
    padding: 22px;
}

.hrms-form-label {
    display: block;
    font-weight: 700;
    color: var(--hrms-text-secondary, #4A5A7A);
    margin-bottom: 6px;
    font-size: 0.86rem;
}

.hrms-form-card .form-control,
.hrms-form-card .form-select,
.hrms-form-card select.form-control {
    border-radius: 12px;
    border: 1px solid var(--hrms-border, #E2E8F4);
    background: var(--hrms-input, #F0F4F9);
    min-height: 46px;
    box-shadow: none;
    color: var(--hrms-text, #1A337E);
}

.hrms-form-card .form-control:focus,
.hrms-form-card .form-select:focus {
    background: #fff;
    border-color: var(--hrms-primary, #1A337E);
    box-shadow: 0 0 0 3px rgba(var(--hrms-primary-rgb, 26, 51, 126), 0.14);
}

.hrms-form-card .input-group-text {
    border-radius: 12px 0 0 12px;
    border: 1px solid var(--hrms-border, #E2E8F4);
    background: var(--hrms-input, #F0F4F9);
    color: var(--hrms-primary, #1A337E);
}

.hrms-form-card .input-group .form-control {
    border-radius: 0;
}

.hrms-form-card .input-group .btn {
    border-radius: 0 12px 12px 0;
    border: 1px solid var(--hrms-border, #E2E8F4);
    color: var(--hrms-text-secondary, #4A5A7A);
    background: #fff;
    font-weight: 600;
}

.hrms-form-card .btn-primary,
.hrms-form-card input[type="submit"].btn-primary,
.hrms-form-card input[type="submit"].form-control {
    background: var(--hrms-primary, #1A337E) !important;
    border-color: var(--hrms-primary, #1A337E) !important;
    color: #fff !important;
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 700;
    min-height: 46px;
}

.hrms-form-card .btn-primary:hover,
.hrms-form-card input[type="submit"]:hover {
    background: var(--hrms-primary-dark, #12265E) !important;
    border-color: var(--hrms-primary-dark, #12265E) !important;
}

.hrms-form-card .btn-outline-secondary {
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 600;
    color: var(--hrms-text-secondary, #4A5A7A);
    border-color: var(--hrms-border, #E2E8F4);
}

.hrms-form-hint {
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--hrms-text-muted, #5B6B8C);
}

.hrms-form-card .remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.hrms-form-card .remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--hrms-primary, #1A337E);
}

.hrms-form-card .alert {
    border-radius: 12px;
}

/* FA6 Sharp is Pro-only; map it onto the free solid webfont so id-card etc. still render. */
.fa-sharp {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900;
}

body.hrms-dash-body .modal-header,
body.hrms-dash-body .modal-header.theme-background-color,
.hrms-force-pw-modal .modal-header,
.modal-header.theme-background-color {
    background: linear-gradient(135deg, var(--hrms-primary, #1A337E) 0%, var(--hrms-primary-dark, #152868) 100%) !important;
    color: #fff !important;
    border-bottom: 0 !important;
}

body.hrms-dash-body .modal-title,
.hrms-force-pw-modal .modal-title,
.modal-header.theme-background-color .modal-title {
    color: #fff !important;
    font-weight: 700;
}

body.hrms-dash-body .modal-header .btn-close,
.hrms-force-pw-modal .modal-header .btn-close,
.modal-header.theme-background-color .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.9;
}

.hrms-force-pw-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
}

/* One typeface for HRMS text. Icon fonts and code stay on their own families. */
body,
body :where(:not(i):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fad):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-sharp):not(.mdi):not(.glyphicon):not(.dx-icon):not(.material-icons):not(code):not(pre):not(kbd):not(samp)) {
    font-family: var(--hrms-font) !important;
}

/* DevExtreme draws the filter, sort, pager, and editor glyphs from DXIcons, not from a .dx-icon class. */
.dx-icon,
.dx-icon::before,
[class*="dx-icon-"],
[class*="dx-icon-"]::before,
.dx-header-filter,
.dx-header-filter::before,
.dx-sort-up,
.dx-sort-up::before,
.dx-sort-down,
.dx-sort-down::before,
.dx-pager .dx-prev-button,
.dx-pager .dx-next-button,
.dx-pager .dx-prev-button::before,
.dx-pager .dx-next-button::before,
.dx-dropdowneditor-icon,
.dx-dropdowneditor-icon::before,
.dx-checkbox-icon,
.dx-checkbox-icon::before,
.dx-datagrid-group-opened,
.dx-datagrid-group-opened::before,
.dx-datagrid-group-closed,
.dx-datagrid-group-closed::before,
.dx-datagrid-adaptive-more,
.dx-datagrid-adaptive-more::before,
.dx-treelist-adaptive-more,
.dx-treelist-adaptive-more::before,
.dx-numberbox-spin-up-icon,
.dx-numberbox-spin-up-icon::before,
.dx-numberbox-spin-down-icon,
.dx-numberbox-spin-down-icon::before,
.dx-list-item-chevron,
.dx-list-item-chevron::before,
.dx-list-reorder-handle,
.dx-list-reorder-handle::before,
.dx-lookup-arrow,
.dx-lookup-arrow::before,
.dx-closebutton,
.dx-closebutton::before,
.dx-expand,
.dx-expand::before,
.dx-expand-icon-container,
.dx-expand-icon-container::before {
    font-family: DXIcons !important;
}

.pmtac-logo-text,
.pmtac-logo-text * {
    font-family: "Arial Black", Impact, sans-serif !important;
}
