:root,
[data-bs-theme=light] {
    /*--falcon-primary-rgb: 0, 51, 102;*/
    --cos-label-color-rgb: 51, 51, 51; /* #333333 for labels */
    --falcon-blue: #2c7be5;
    --falcon-indigo: #727cf5;
    --falcon-purple: #6b5eae;
    --falcon-pink: #ff679b;
    --falcon-red: #e63757;
    --falcon-orange: #fd7e14;
    --falcon-yellow: #f5803e;
    --falcon-green: #00d27a;
    --falcon-teal: #02a8b5;
    --falcon-cyan: #27bcfd;
    --falcon-black: #000;
    --falcon-white: #fff;
    --falcon-gray: #748194;
    --falcon-gray-dark: #4d5969;
    --falcon-gray-100: #f9fafd;
    --falcon-gray-200: #edf2f9;
    --falcon-gray-300: #d8e2ef;
    --falcon-gray-400: #b6c1d2;
    --falcon-gray-500: #9da9bb;
    --falcon-gray-600: #748194;
    --falcon-gray-700: #5e6e82;
    --falcon-gray-800: #4d5969;
    --falcon-gray-900: #344050;
    --falcon-gray-1000: #232e3c;
    --falcon-gray-1100: #0b1727;
    --falcon-primary: #004aad; /* Updated primary color */
    --falcon-primary-dark: #002d99;
    --falcon-secondary: #748194;
    --falcon-success: #228B22;
    --falcon-info: #27bcfd;
    --falcon-warning: #D64550;
    --falcon-danger: #e63757;
    --falcon-light: #f9fafd;
    --falcon-dark: #0b1727;
    --falcon-primary-rgb: 0, 48, 135;
    --falcon-secondary-rgb: 116, 129, 148;
    --falcon-primary-blue-dark: #002d99;
    --falcon-success-rgb: 0, 210, 122;
    --falcon-info-rgb: 39, 188, 253;
    --falcon-warning-rgb: 245, 128, 62;
    --falcon-danger-rgb: 230, 55, 87;
    --falcon-light-rgb: 249, 250, 253;
    --falcon-dark-rgb: 11, 23, 39;
    --falcon-body-color: #333;
    --falcon-body-color-rgb: 51, 51, 51;
    --falcon-body-bg: #eef5ff; /* Updated body background */
    --falcon-body-bg-rgb: 245, 245, 245;
    --falcon-link-color: #0049B3;
    --falcon-link-color-rgb: 0, 73, 179;
    --falcon-link-hover-color-rgb: 35, 98, 183;
    --falcon-sidebar-bg: #e9f0fb;
    --falcon-sidebar-border: #c4d1f0;
    --falcon-sidebar-scrollbar-bg: #b0c4f7;
    --falcon-sidebar-text-color: #1a1a1a;
    --falcon-sidebar-text-hover: #003d99;
    --falcon-sidebar-icon-bg: #ffffff;
    --falcon-sidebar-icon-border: #c4d1f0;
    --falcon-header-bg: #d7e4fc;
    --falcon-header-text-color: #002d99;
    --falcon-main-bg: #f9fbff;
    --falcon-main-text-color: #333;
    --falcon-footer-bg: #FFF;
    /*--falcon-footer-bg: #d7e4fc;*/
    --falcon-footer-text-color: #002d99;
    --falcon-notification-dot-color: #e60000;
    --falcon-primary-blue: #004aad;
}

.form-text {
    color: #495057 !important;
}

.cos-danger {
    color: rgb(131, 32, 50) !important;
}

.cos-red {
    color: #C50000 !important;
}

[data-bs-theme=dark] {
    /*--falcon-primary-rgb: 44, 123, 229;*/
    --falcon-primary-rgb: 242, 242, 242;
}

/* === Autofill Contrast Fix (WCAG Compliant) === */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important; /* Force white bg */
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #212529 !important; /* Proper dark text */
    caret-color: #212529 !important;
    transition: background-color 9999s ease-in-out 0s; /* Prevent flash */
}

    /* Optional: consistent focus appearance for autofilled inputs */
    input:-webkit-autofill:focus {
        border-color: #0d6efd !important;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3), 0 0 0 1000px #ffffff inset !important;
    }

/* === WCAG 2.2.2 Compliant Input Styles === */
.form-control {
    background-color: #ffffff !important; /* Force white box, not inherited */
    border: 2px solid #A8AEB3; /* medium contrast border */
    color: #212529 !important; /* high-contrast text */
    border-radius: 0.4rem;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    /* Focus state — highly visible */
    .form-control:focus {
        background-color: #ffffff !important;
        border-color: #0d6efd !important; /* Bootstrap blue */
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3); /* visible glow */
        outline: none;
    }

    /* Placeholder text more readable */
/*    .form-control::placeholder {
        color: #495057 !important;
        opacity: 1;
    }
*/
/*********************************************************************************/

/* Global Styles for Better Contrast and Readability */
body {
    background-color: #EEF5FF; /* Light gray background for page */
    font-size: 16px; /* Base font size for scalability */
    font-family: Roboto, Arial, sans-serif; /* Consistent with theme */
}

.form-container {
    background-color: #FFFFFF; /* White form background */
    /*border: 1px solid #E3E3E3;*/ /* Subtle gray border */
    /*border-radius: 0.4rem;*/
    padding: 20px;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/ /* Slight shadow for professionalism */
}

.form-label {
    color: #002e73 !important; /* Darker text for contrast */
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-input {
    border: 1px solid #CCCCCC; /* Light gray border for inputs */
    border-radius: 0.4rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
}

    .form-input:focus {
        outline: 2px solid #003087; /* Blue outline for focus */
        box-shadow: 0 0 5px rgba(0, 48, 135, 0.5);
    }

/* Ensure radio buttons and checkboxes have non-color cues */
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 48, 135, 0.25);
}

/* Style the "NEW" indicator */
.new-indicator {
    font-weight: bold;
    color: #e63757; /* Red for visibility */
    margin-left: 0.5rem;
}

/* Adjust button for professionalism */
.btn-primary {
    background-color: #003087;
    border-color: #003087;
    /*padding: 0.5rem 1rem;*/
    /*font-size: 1rem;*/
    font-weight: 500;
}

    .btn-primary:hover {
        background-color: #002766;
        border-color: #002766;
    }

/*********************************************************************************/

.menu-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    border: 2.0px solid var(--falcon-sidebar-icon-border);
    border-radius: 8px;
    font-size: 1.1rem;
    margin-left: 2px;
}

    .menu-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }



.cos-pinsix {
    --w: 1ch; /* control the width for each letter */
    --g: .15em; /* the gap between letters */
    --b: 2px; /* the border thickness */

    --c: #888;
    --_n: attr(maxlength type(<integer>));
    font-size: 60px;
    line-height: 1.4; /* control the height */
    letter-spacing: var(--w);
    font-family: monospace;
    width: calc(var(--_n)*(1.05ch + var(--w)));
}

#cos-spinner-div {
    position: fixed;
    display: none;
    /*width: 100%;
    height: 100%;
    top: 0;
    left: 0;*/
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.cos-text-primary {
    --cos-text-opacity: 1;
    color: rgba(var(--falcon-primary-rgb), var(--cos-text-opacity)) !important;
}

[data-bs-theme=dark] .dark__cos-text-primary {
    color: #2c7be5 !important;
}

.cos-heading {
    color: #002e73 !important;
    font-family: roboto, Arial;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.cos-sub-heading {
    color: #333 !important;
    font-family: roboto, Arial;
    font-size: 1rem;
    font-weight: bold;
}

.cos-tooltip-primary {
    --falcon-tooltip-bg: #2c7be5;
    --falcon-tooltip-color: var(--falcon-white);
}

.cos-tooltip-warning {
    --falcon-tooltip-bg: #f5803e;
    --falcon-tooltip-color: var(--falcon-white);
}

.cos-tooltip-danger {
    --falcon-tooltip-bg: #e63757;
    --falcon-tooltip-color: var(--falcon-white);
}

.cos-top-10 {
    top: 15% !important;
}

.cos-vw-90 {
    width: 90vw !important;
}
.cos-vw-100 {
    width: 99vw !important;
}

.cos-ul-hz {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(192px, 1fr));
}
.cos-ul-hz-wide {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px, 1fr));
}


/* Floating Form Required Element Label to have a red Asterisk */
input[required] + label:after, select[required] + label:after {
    content: ' *' !important;
    color: red !important;
}

.cos-navbar-solid {
    /*background-color: var(--falcon-navbar-vertical-card-bg-color);*/
    background-color: var(--falcon-navbar-vertical-default-bg-color);
}

.cos-header-min-height {
    min-height: var(--falcon-top-nav-height);
}

.cos-padding-small {
    padding: 0.125rem !important;
}

.cos-cursor-pointer {
    cursor: pointer;
}

.cos-sticky-top {
    position: sticky;
    top: 69px;
    z-index: 1015;
}

.cos-sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 1015;
}

/* FullCalendar Customization START. Used in HomeAdmins */
.fc .fc-button {
    color: #fff;
    background-color: #2c7be5;
    border-color: #2c7be5;
}

    .fc .fc-button:hover {
        color: #fff;
        background-color: rgb(37.4, 104.55, 194.65);
        border-color: rgb(35.2, 98.4, 183.2);
    }

.fc-event {
    font-size: 1rem !important;
    font-weight: 700 !important;
    min-height: 30px !important;
    padding-left: 5px !important;
    cursor: pointer !important;
}
/* FullCalendar Customization END. Used in HomeAdmins */

form {
    background-color: #f2f2f2;
}

.cos-bg-color {
    background-color: #EEF5FF;
}

.cos-bg-white {
    background-color: #fff;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
}

.cos-form-label {
    color: rgb(var(--cos-label-color-rgb));
}

/* Color Pallette Title on summernote rich text box */
.note-palette-title {
    color: #333 !important;
}

.popover {
    max-width: 100%; /* Max Width of the popover (depending on the container!) */
}

.cos-pre {
    white-space: pre !important;
}

table.table-fit {
    width: auto !important;
    table-layout: auto !important;
}

    table.table-fit thead th,
    table.table-fit tbody td,
    table.table-fit tfoot th,
    table.table-fit tfoot td {
        width: auto !important;
    }

.table {
    --falcon-table-color-type: #333;
    --falcon-table-bg: var(--falcon-card-bg);
    --falcon-table-border-color: var(--falcon-gray-300);
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    --falcon-table-color-type: #333;
}

.table-striped-columns > :not(caption) > tr > :nth-child(even) {
    --falcon-table-color-type: #333;
}

thead.clsDummy tr th {
    padding: 0.25rem !important;
    --falcon-text-opacity: 1;
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
}

tbody.clsDummyBody tr td, tfoot.clsDummyBody tr td {
    max-width: 250px;
    white-space: nowrap;
    padding: 0.25rem !important;
    align-content: center;
}

tbody.clsDummyBodyCut tr td {
    max-width: 250px;
    white-space: nowrap;
    padding: 0.25rem !important;
    align-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cos-low-tr td, .cos-low-tr td a {
    color: #f5803e !important;
}

.cos-inactive-tr td, .cos-inactive-tr td a {
    font-style: italic;
    color: var(--falcon-dark-text-emphasis) !important;
}

/* To avoid modal getting behind the backdrop if not directly attached to the <body> element */

.modal {
    background: rgba(0, 0, 0, 0.5);
}

.modal-backdrop {
    display: none;
}
/*---------------------------*/

/* Table Sort Customization */
.sort.asc, .sort.desc {
    background-color: #0000b0 !important; /*rgb(var(--falcon-gray-900-rgb)) */
    color: var(--falcon-gray-100) !important;
}

.sort[data-sort].asc::after {
    /*content: "\002B06" !important;*/
    content: '\25B2' !important;
    color: limegreen !important;
    /*padding-left: 3px;*/
}

.sort[data-sort].desc::after {
    /*content: "\002B07" !important;*/
    content: '\25BC' !important;
    color: orange !important;
    /*padding-left: 3px;*/
}
/*---------------------------*/

.cos-text-over-line {
    display: flex;
}

    .cos-text-over-line:before, .cos-text-over-line:after {
        content: "";
        flex: 1 1;
        border-bottom: 1px solid #000;
        margin: auto;
    }


.rotatePhoto90 {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}
.rotatePhoto180 {
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}
.rotatePhoto270 {
    -webkit-transform: rotate(270deg);
    -moz-transform: rotate(270deg);
    -ms-transform: rotate(270deg);
    -o-transform: rotate(270deg);
    transform: rotate(270deg);
}

/* ---------- Clock in TimeClock ------------ */

.clockdate-wrapper {
    background-color: #fff;
    padding: 15px;
    /*max-width: 350px;*/
    width: 100%;
    text-align: center;
    border:3px solid #000;
    border-radius: 5px;
    margin: 0 auto;
}

#clock {
    background-color: #fff;
    font-family: sans-serif;
    font-size: 4.29981696rem !important;
    /*text-shadow: 0px 0px 1px #fff;*/
    color: #000;
    font-weight: bold;
}

    #clock span.ampm {
        color: #111;
        /*text-shadow: 0px 0px 1px #333;*/
        font-size: 3.5831808rem !important;
        position: relative;
        top: -5px;
        left: 10px;
        font-weight: bold;
    }

    #clock span.sec {
        font-size: 4.29981696rem !important;
        color: #111;
        font-weight: bold;
    }

#date {
    letter-spacing: 3px;
    font-size: 1.44rem !important;
    font-family: arial,sans-serif;
    color: #000;
}
/* ------------------------------ */
/* Webcam in TimeClock */

.webcam-canvas {
    display: none;
}

/* Camera Container */
.camera-ctn {
    position: relative;
    background: #fff;
}

.camera-view video {
    object-fit: cover;
    transform: scaleX(-1);
}

/* VIEW & SAVE PHOTO */
.gallery-view {
    position: absolute;
    background: #fff;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.4s;
    transform: translateX(100vw);
}

    .gallery-view.show-gallery {
        transform: translateX(0);
    }

    .gallery-view img {
        height: 240px;
        object-fit: cover;
    }
/* ------------------------------ */

/* TimeClock Manual */
td.hover-img img {
    display: none;
}
td.hover-img:hover img:nth-of-type(1) {
    display: block !important;
    position: fixed !important;
    top: 70px;
    right: 330px;
    width: 320px;
    height: 240px;
    border: 2px solid gray;
    z-index: 1000;
}
td.hover-img:hover img:nth-of-type(2) {
    display: block !important;
    position: fixed !important;
    top: 70px;
    right: 10px;
    width: 320px;
    height: 240px;
    border: 2px solid gray;
    z-index: 1000;
}
/* ----------------------------- */

/* ALERTS */
.cos-alert-success {
    color: #0B0B0B;
    background-color: #CDE7C5;
    border: #0B0B0B 1px solid !important; 
}

.cos-alert-info {
    color: rgb(17, 90, 142);
    background-color: rgb(237, 251, 255);
    border: rgb(17, 90, 142) 1px solid !important;
}

.cos-alert-warning {
    color: rgb(94, 49, 23);
    background-color: rgb(255, 243, 235);
    border: rgb(94, 49, 23) 1px solid !important;
}

.cos-alert-danger {
    color: rgb(131, 32, 50);
    background-color: rgb(250, 235, 238);
    border: rgb(131, 32, 50) 1px solid !important;
}

/* Treeview */
/*----------*/

.tree {
    --spacing: 1.75rem;
    --radius: 10px;
    /*min-height: 300px;*/
    /*    max-height: 500px;*/
    overflow-y: auto;
    font-family: roboto,'Arial Narrow','Franklin Gothic Medium', Arial, sans-serif;
}

    .tree li {
        display: block;
        position: relative;
        padding-left: calc(2 * var(--spacing) - var(--radius) - 2px);
    }

    .tree ul {
        margin-left: calc(var(--radius) - var(--spacing));
        padding-left: 0;
    }

        .tree ul li {
            border-left: 2px solid #ddd;
        }

            .tree ul li:last-child {
                border-color: transparent;
            }

            .tree ul li::before {
                content: '';
                display: block;
                position: absolute;
                top: calc(var(--spacing) / -2);
                left: -2px;
                width: calc(var(--spacing) + 2px);
                height: calc(var(--spacing) + 1px);
                border: solid #ddd;
                border-width: 0 0 2px 2px;
            }

    .tree summary {
        display: block;
        cursor: pointer;
        font-weight: 600;
        margin-top: 8px;
        margin-bottom: 4px;
    }

    .tree summary::marker,
    .tree summary::-webkit-details-marker {
        display: none;
    }

    .tree summary:focus {
        outline: none;
    }

    .tree summary:focus-visible {
        outline: 1px dotted #000;
    }

    .tree li::after,
    .tree summary::before {
        content: '';
        display: block;
        position: absolute;
        top: calc(var(--spacing) / 2 - var(--radius));
        left: calc(var(--spacing) - var(--radius) - 1px);
        width: calc(2 * var(--radius));
        height: calc(2 * var(--radius));
        border-radius: 50%;
        background: #eee url('/img/doc.svg') 0 0;
    }

        .tree summary::before {
            z-index: 1;
            background: #2F5C9E url('../img/expand-collapse.svg') 0 0;
        }
        .tree summary[data-nochild]::before {
            background: #C8D7EF;
        }

    .tree details[open] > summary::before {
        background-position: calc(-2 * var(--radius)) 0;
    }

    .tree span {
        cursor: pointer
    }

.tree-itm-selected {
    padding: 4px;
    background-color: seagreen !important;
    color: white !important;
}
/* ==========================================
   COS – Submenu visual grouping 1/30/26
   ========================================== */

/* Soft panel behind expanded submenus */
.navbar-vertical .navbar-nav > .nav-item > .nav.collapse.show {
    margin: 6px 8px 10px 8px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(47, 111, 237, 0.06); /* very light blue */
}

/* Submenu links inside the panel */
.navbar-vertical .navbar-nav > .nav-item > .nav.collapse.show .nav-link {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 10px;
    color: #6b7280; /* soft gray */
}

/* Hover effect for submenu links */
.navbar-vertical .navbar-nav > .nav-item > .nav.collapse.show .nav-link:hover {
    background: rgba(47, 111, 237, 0.10);
    color: #111827;
}

/* If a submenu link already has .active, give it a thin blue indicator */
.navbar-vertical .navbar-nav .nav-link.active {
    position: relative;
    background: rgba(47, 111, 237, 0.14);
    color: #111827;
}

/* Thin blue indicator bar */
.navbar-vertical .navbar-nav .nav-link.active::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: #2F6FED;
}
