﻿html, body {
    position: relative;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-size: 14px;
    color: #1f2d24;
    background: #f7f6f2;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Flexbox layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

body.public-shell > .public-page-wrap {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

body.public-shell > .public-page-wrap > main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 0 !important;
}

.footer {
    margin-top: auto;
    padding: 0.8rem 0;
    /*background-color: #f8f9fa;*/
    text-align: center;
    width: 100%;
}

.public-shell {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin-bottom: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(168, 181, 162, 0.16), transparent 30rem),
        linear-gradient(135deg, #fbfaf7 0%, #f7f6f2 100%);
}

.public-header {
    position: relative;
    z-index: 10;
}

.public-navbar {
    padding: clamp(10px, 1.5vh, 16px) 0;
    background: rgba(247, 246, 242, 0.84);
    backdrop-filter: blur(16px);
}

.public-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.site-brand-logo {
    width: clamp(118px, 10vw, 168px);
    max-width: 42vw;
    max-height: clamp(40px, 6vh, 58px);
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

.public-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: min(430px, 48vw);
}

.public-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    max-width: 330px;
}

.public-search input {
    width: 100%;
    min-height: 38px;
    padding: 0 58px 0 38px;
    border: 1px solid rgba(216, 209, 199, 0.88);
    border-radius: 6px;
    background: rgba(255, 253, 248, 0.72);
    color: #1f2d24;
    font-size: 0.84rem;
    outline: none;
}

.public-search input:focus {
    border-color: rgba(168, 181, 162, 0.95);
    box-shadow: 0 0 0 3px rgba(168, 181, 162, 0.18);
}

.public-search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    background-image: url("../images/icons/cali-dashboard-line/search_olive.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.public-search:hover .public-search-icon {
    background-image: url("../images/icons/cali-dashboard-line/search_sage.svg");
}

.public-search:focus-within .public-search-icon {
    background-image: url("../images/icons/cali-dashboard-line/search_terracotta.svg");
}

.public-search-shortcut {
    position: absolute;
    right: 10px;
    color: rgba(116, 111, 103, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    pointer-events: none;
}

.public-login-button,
.public-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #1f2d24;
    border-radius: 6px;
    background: #1f2d24;
    color: #f7f6f2;
    font-weight: 700;
    text-decoration: none;
}

.public-login-button:hover,
.public-login-button:focus,
.public-hero-action:hover,
.public-hero-action:focus {
    color: #f7f6f2;
    background: #2f3a34;
}

.public-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 21px 21px;
}

.public-icon-button:hover,
.public-icon-button:focus {
    background-color: rgba(168, 181, 162, 0.12);
}

.public-notification-button {
    background-image: url("../images/icons/cali-dashboard-line/reminder_bell_olive.svg");
}

.public-notification-button:hover {
    background-image: url("../images/icons/cali-dashboard-line/reminder_bell_sage.svg");
}

.public-notification-button:focus {
    background-image: url("../images/icons/cali-dashboard-line/reminder_bell_terracotta.svg");
}

.public-notification-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    border: 1.5px solid #f7f6f2;
    border-radius: 999px;
    background: #c46a4a;
}

.public-profile-menu {
    position: relative;
}

.public-avatar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(31, 45, 36, 0.12);
    border-radius: 999px;
    background:
        radial-gradient(circle at 68% 24%, #f6dbc9 0 11%, transparent 12%),
        radial-gradient(circle at 50% 35%, #cdb49d 0 28%, transparent 29%),
        linear-gradient(145deg, #a8b5a2, #2f3a34);
    color: #f7f6f2;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(31, 45, 36, 0.12);
}

.public-avatar-button-large {
    width: 46px;
    height: 46px;
}

.public-profile-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    width: 280px;
    padding: 14px;
    border: 1px solid #e6dfd4;
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: 0 22px 55px rgba(31, 45, 36, 0.16);
}

.public-profile-popover-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 13px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e6dfd4;
}

.public-profile-popover h2 {
    margin: 0;
    color: #1f2d24;
    font-size: 0.95rem;
    font-weight: 800;
}

.public-profile-popover p {
    margin: 2px 0 0;
    color: #746f67;
    font-size: 0.78rem;
}

.public-profile-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f2d24;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.public-profile-link:hover,
.public-profile-link:focus {
    background: rgba(168, 181, 162, 0.14);
    color: #1f2d24;
}

.public-profile-button {
    color: #9b4d31;
}

.footer-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
}

.footer-brand-mark {
    width: 26px;
    height: 26px;
}

.public-hero {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(14px, 2.2vh, 28px) 28px clamp(18px, 3vh, 34px);
    text-align: center;
}

body.public-shell .footer {
    flex-shrink: 0;
    line-height: 1.5;
    position: static;
}

.public-hero-logo {
    width: min(31vh, 360px, 62vw);
    max-height: min(22vh, 260px);
    height: auto;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    border-radius: 6px;
    box-shadow: 0 18px 48px rgba(31, 45, 36, 0.08);
    object-fit: contain;
}

.public-hero-kicker {
    margin: 0 0 clamp(8px, 1.4vh, 14px);
    color: #9b4d31;
    font-size: clamp(0.68rem, min(0.9vw, 1.55vh), 0.82rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 760px;
    margin: 0 auto;
    color: #1f2d24;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.8rem, min(4.3vw, 5.2vh), 3.45rem);
    font-weight: 500;
    line-height: 1.02;
}

.public-hero-copy {
    max-width: 620px;
    margin: clamp(10px, 1.7vh, 18px) auto clamp(14px, 2.4vh, 24px);
    color: #5f665e;
    font-size: clamp(0.86rem, min(1.05vw, 1.85vh), 1.05rem);
    line-height: 1.55;
}

.public-hero-action {
    min-height: clamp(38px, 5.2vh, 46px);
    padding: 0 clamp(18px, 2.4vw, 24px);
    font-size: clamp(0.78rem, min(0.9vw, 1.55vh), 0.92rem);
}

@media (max-width: 820px) {
    .public-nav-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-top-actions {
        width: 100%;
        min-width: 0;
    }

    .public-search {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .public-top-actions {
        flex-wrap: wrap;
    }

    .public-search {
        flex-basis: 100%;
        order: 3;
    }

    .public-hero {
        padding-left: 8px;
        padding-right: 8px;
    }

    .public-hero-logo {
        width: min(36vh, 300px, 86vw);
        max-height: min(24vh, 230px);
    }
}

/* Button focus/active styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.nav-item {
    position: relative;
}

/* Modal General Styles */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

dialog {
    border: 0;
}

.modal {
    overflow-y: auto !important;
}

.modal-dialog {
    max-width: 500px;
    margin: 30px auto;
    display: flex; /* Ensure proper centering */
    align-items: center; /* Center vertically */
    min-height: 100vh; /* Full viewport height for vertical centering */
}

.zoneviewer-modal-box.wide {
    max-width: 960px;
    min-width: 700px;
    width: 90%;
}

.modal-content {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.modal-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    color: #343a40;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    font-size: 1em;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Backdrop Blur */
.modal-backdrop {
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1030;
}

/* Edit Modal Specific Styles */
.edit-modal-content {
    padding: 0;
}

.edit-modal-header {
    height: 70px;
}

.edit-modal-body {
    gap: 1.5rem;
}

.edit-modal-footer {
    flex-direction: column;
}

#resetPasswordBtn,
#resendConfirmationBtn {
    text-align: center;
    width: calc(50% - 0.5rem);
    margin: 0;
    flex: 1;
}

#resetPasswordBtn {
    background-color: #ffc107;
    color: #212529;
}

#resendConfirmationBtn {
    background-color: #17a2b8;
    color: #fff;
}

.edit-modal-footer .btn-secondary,
.edit-modal-footer .btn-primary {
    min-width: 120px;
}

.edit-modal-footer .btn-primary {
    background-color: #0d6efd;
}

.edit-modal-footer .btn:hover {
    opacity: 0.9;
    transition: all 0.2s ease-in-out;
}


/* Dashboard Modal Specific Styles */
.dashboard-modal .modal {
    position: absolute !important;
    height: auto !important;
    top: 0 !important;
    padding: 0 !important;
}

.dashboard-modal .modal-dialog {
    margin: 0 !important;
    transform: none !important;
}

.dashboard-modal .modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    width: 360px;
}

.dashboard-modal .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.dashboard-modal .card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.dashboard-modal .card-body {
    padding: 1rem;
}

.dashboard-modal .btn {
    margin-top: 0.5rem;
}



/* Confirmation Modal Specific Styles */
.confirm-status-modal {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

    .confirm-status-modal .modal-header {
        background-color: #fff3cd;
        color: #664d03;
        border-bottom: 1px solid #ffecb5;
        padding: 1rem 1.5rem;
    }

    .confirm-status-modal .modal-body {
        padding: 1.5rem;
    }

    .confirm-status-modal .modal-footer {
        padding: 1rem 1.5rem;
        border-top: 1px solid #dee2e6;
    }

    .confirm-status-modal .btn {
        height: 48px;
        padding: 0.75rem 1.5rem;
        border-radius: 6px;
        min-width: 120px;
    }

    .confirm-status-modal .btn-primary {
        background-color: #0d6efd;
        color: white;
    }

    .confirm-status-modal .btn-secondary {
        background-color: #6c757d;
        color: white;
    }

/* Ensure Confirmation Modal is always above Edit Modal */
#confirmationModal {
    z-index: 1060; /* Above Edit User Modal */
}

/* Blur the Edit User modal dynamically when Confirmation Modal is open */
#editUserModal.modal-blur {
    filter: blur(5px); /* Apply blur effect */
    pointer-events: none; /* Disable interaction with blurred modal */
    z-index: 1045; /* Lower than Confirmation Modal */
}


/* Icon Action Styles */
.icon-action {
    font-size: 1.1rem;
    margin: 3px 5px;
    text-decoration: none;
    display: inline-block;
    color: #6c757d;
    transition: color 0.3s ease;
}

    .icon-action.edit:hover {
        color: #0d6efd;
    }

    .icon-action.delete-user:hover {
        color: #dc3545;
    }

    .icon-action.block-user:hover {
        color: #ffc107;
    }

    .icon-action:focus {
        outline: none;
    }

/* Avatar Styles */
.avatar-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .avatar-button:hover {
        background-color: #0056b3;
    }

/* Persistent Alert Styles */
.alert-persistent {
    opacity: 1 !important;
    display: block !important;
    animation: none !important;
    transition: none !important;
}

#validationSummary {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Border to match the error message style */
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 10px; /* Add spacing below the validation summary */
    font-size: 0.9rem; /* Match the font size of field error messages */
}

    #validationSummary:empty {
        display: none; /* Hide when no errors are present */
    }

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

.navigation-link {
    /*color: #fff !important;*/
    color: color-mix(in hsl, var(--secondary-color), var(--darken)) !important;
}

body {
    margin-bottom: 0;
}

footer {
    line-height: 1.5;
}


/* Card styling */
.custom-card {
    font-size: 14px;
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 4%);
    border-radius: 8px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    border-radius: 8px;
    box-shadow: 0 2px 4px hsla(from var(--darken) h s l / .1);
}

    .custom-card:hover {
        box-shadow: 0 6px 14px hsla(from var(--darken) h s l / .16) /*rgba(0, 0, 0, 0.16)*/;
        transform: translateY(-2px);
        background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 8%);
    }


/*#region Modals*/

/* Base modal structure */
.zoneviewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.zoneviewer-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: .5;
    /*filter: blur(5px);*/
}

.zoneviewer-modal-box {
    --left: 50%;
    --top: 50%;
    position: absolute;
    top: var(--top);
    left: var(--left);
    transform: translate(-50%, -50%);
    background-color: var(--bs-body-bg);
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Modal header */
.zoneviewer-modal-header {
    position: relative;
    margin-bottom: 20px;
    padding-right: 24px;
}

.zoneviewer-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    color: #666;
    line-height: 1;
}

    .zoneviewer-modal-close:hover {
        color: #333;
    }

/* Logo handling */
.zoneviewer-modal-logo {
    text-align: center;
    margin-bottom: 20px;
}

    .zoneviewer-modal-logo img {
        max-width: 200px;
        max-height: 100px;
        object-fit: contain;
        padding: 4px;
        border-radius: 8px;
        background-color: var(--bs-light);
    }

/* Modal content */
.zoneviewer-modal-info {
    margin-bottom: 20px;
}

    .zoneviewer-modal-info p {
        margin: 8px 0;
    }

/* Provisional notice */
.zoneviewer-provisional-notice {
    background-color: var(--bs-warning) /*#fff3cd*/;
    /*border: 1px solid #ffeeba;*/
    border: none;
    /*color:*/ /*#856404*/ /*;*/
    color: oklch(from var(--bs-warning) var(--l) 0 h);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Modal footer */
.zoneviewer-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Button styles */
.zoneviewer-modal-book,
.zoneviewer-modal-provisional {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.zoneviewer-modal-book {
    background: var(--bs-primary) /*#007bff*/;
    color: white;
}

    .zoneviewer-modal-book:hover {
        background: color-mix(in hsl, var(--bs-primary), var(--bs-dark) 15%) /*#0056b3*/;
    }

.zoneviewer-modal-provisional {
    background: var(--bs-primary) /*#ffc107*/;
    color: oklch(from var(--bs-primary) var(--l) 0 h);
}

    .zoneviewer-modal-provisional:hover {
        /*background: #e0a800;*/
        background: color-mix(in hsl, var(--bs-primary), var(--bs-dark) 15%);
    }

.zoneviewer-modal-cancel {
    background: var(--bs-secondary);
    color: oklch(from var(--bs-primary) var(--l) 0 h);
    /*border: 1px solid #dee2e6;*/
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

    .zoneviewer-modal-cancel:hover {
        background: color-mix(in hsl, var(--bs-secondary), var(--bs-dark) 15%);
    }

/* Time inputs */
.zoneviewer-time-inputs {
    display: flex;
    gap: 20px;
    margin: 16px 0;
}

.zoneviewer-time-input-group {
    flex: 1;
}

    .zoneviewer-time-input-group label {
        display: block;
        margin-bottom: 4px;
        color: var(--bs-body) /*#666*/;
        font-size: 0.9em;
    }

.zoneviewer-time-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

/* Notes input */
.zoneviewer-notes-input {
    margin-top: 16px;
}

    .zoneviewer-notes-input label {
        display: block;
        margin-bottom: 4px;
        color: var(--bs-body) /*#666*/;
        font-size: 0.9em;
    }

    .zoneviewer-notes-input textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        resize: vertical;
        font-family: inherit;
        font-size: 0.9em;
    }

.modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 10%);
    background-clip: border-box;
    border-radius: .25rem;
}

/*#endregion*/

/*#region Generic tables*/

table {
    tr

{
    border-bottom-color: var(--darken);
}

tbody {
    border-top-color: var(--darken) !important;
    tr

{
    border-bottom-color: var(--darken);
}

}

th, td {
    color: var(--bs-body-color) !important;
}

}

/*#endregion*/

table.dataTable thead th, table.dataTable.no-footer {
    border-bottom-color: var(--bs-body-color) !important;
}

table.dataTable tr td {
    border-color: color-mix(in hsl, var(--bs-body-color), var(--lighten) 60%) !important;
}

.dataTable tbody tr {
    background-color: var(--bs-body-bg) !important;
    /*transition: background-color 0.3s ease-in-out;*/



    &.odd

{
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 3%) !important;
    & td.sorting_1, td.sorting_2, td.sorting_3

{
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 6%) !important;
}

}

&.even {
    & td.sorting_1, td.sorting_2, td.sorting_3

{
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 3%) !important;
}

}

&:hover {
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 5%) !important;
    & td.sorting_1, td.sorting_2, td.sorting_3

{
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 5%) !important;
}

}
}

.dataTables_wrapper {
    color: var(--bs-body-color) !important;
    & .dataTables_length

{
    color: var(--bs-body-color) !important;
    & select

{
    color: var(--bs-body-color) !important;
    & option

{
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 10%);
}

}
}

& .dataTables_info {
    color: var(--bs-body-color) !important;
}

& .dataTables_paginate span a.paginate_button,
.dataTables_paginate span a.paginate_button.current,
.dataTables_paginate a.paginate_button.next,
.dataTables_paginate a.paginate_button.previous {
    background: none;
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 3%) !important;
    color: var(--bs-body-color) !important;
    &:hover

{
    background: none;
    background-color: color-mix(in hsl, var(--bs-body-bg), var(--darken) 5%) !important;
    border-color: var(--darken);
    color: var(--bs-body-color) !important;
}

}
}

.dataTables_filter {
    color: var(--bs-body-color) !important;
    & input

{
    color: var(--bs-body-color) !important;
}

}

/* Group Switcher Dropdown styles */
/* Ensure the dropdown matches button styling */
.group-switcher-select {
    background-color: #0d6efd;
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    padding: 0 0.75rem;
    height: 38px; /* back to .btn height */
    line-height: 38px;
    display: inline-block;
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    appearance: none;
    outline: none;
    box-sizing: border-box;
    vertical-align: middle;
    margin-top: 0; /* back to default */
}

input {
    color-scheme: var(--color-scheme);
}

/* Browser-specific workaround*/
form {
    label

{
    color: var(--bs-body-color);
}

.form-control,
.form-control:focus {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

input.form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bs-body-bg) inset !important;
    -webkit-text-fill-color: var(--bs-body-color) !important;
    /*transition: background-color 5000s ease-in-out 0s;*/
}

    input.form-control:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px var(--bs-body-bg) inset !important;
        -webkit-text-fill-color: var(--bs-body-color) !important;
    }

/* File inputs */
input[type="file"].form-control {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

    /*  Chromium (Webkit) */
    input[type="file"].form-control::-webkit-file-upload-button {
        background-color: var(--bs-body-bg) !important;
        color: var(--bs-body-color) !important;
    }

    /* Firefoxt */
    input[type="file"].form-control::file-selector-button {
        background-color: var(--bs-body-bg) !important;
        color: var(--bs-body-color) !important;
    }

}

form {
    & label

{
    color: var(--bs-body-color);
}

}

& .form-control, & form-control:focus {
    background-color: color-mix(var(--bs-body-bg), var(--darken) 80%) !important;
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    &:autofill

{
    background-color: var(--bs-body-bg) !important;
}

}

select.form-select,
select.form-select:focus {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

    select.form-select option {
        background-color: var(--bs-body-bg) !important;
        color: var(--bs-body-color) !important;
    }


.list-group {
    background-color: transparent !important;
    color: var(--bs-body-color) !important;
}

.list-group-item {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color, #ced4da) !important;
}

/* Scrollbar fallback for browsers that don't support ::-webkit-scrollbar */
@supports (not selector(::-webkit-scrollbar)) {
    #timeslots-container {
        scrollbar-width: thin;
        scrollbar-color: var(--bs-gray-200) var(--bs-gray-500);
    }
}

/* Webkit scrollbar styles */

/* Set the width of the scrollbar */
*::-webkit-scrollbar {
    width: 7px !important;
}

/* Track styles */
*::-webkit-scrollbar-track {
    background: color-mix(in hsl, var(--darken) 20%, var(--bs-body-bg)) !important;
    border-radius: 10px;
}

/* Thumb styles */
*::-webkit-scrollbar-thumb {
    background: color-mix(in hsl, var(--darken) 60%, var(--bs-body-bg)) !important;
    border-radius: 10px;
    transition: background 0.2s ease-in-out; /* Smooth transition for background changes */
}

    /* Handle on hover */
    *::-webkit-scrollbar-thumb:hover {
        background: color-mix(in hsl, var(--bs-body-bg), var(--darken) 70%) !important;
    }

.group-switcher-select::-ms-expand {
    display: none;
}

.group-switcher-select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%204%205'%3E%3Cpath%20fill%3D'white'%20d%3D'M2%200L0%202h4L2%200zM0%203l2%202%202-2H0z'/%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.65rem auto;
    padding-right: 1.5rem;
}

    .group-switcher-select:hover,
    .group-switcher-select:focus {
        background-color: #0b5ed7;
        outline: none;
    }

.btn-group.align-items-center {
    align-items: stretch !important;
}


.group-switcher-select option {
    color: black;
    font-weight: 400;
}

/* Ensure spacing is right when placed next to other nav items */
.group-switcher-container {
    margin-top: -2px; /* Just enough to align with adjacent buttons */
    margin-right: 0.5rem;
}


    .group-switcher-container .input-group-text {
        height: 32px;
        font-size: 0.875rem;
        padding: 0 0.6rem;
        display: flex;
        align-items: center;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

/* centred, max‑600 dialog for conflict preview */
.preview-conflict {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 6%;
    background: rgba(0,0,0,.55);
    z-index: 1060;
}

    .preview-conflict .modal-content {
        max-width: 600px;
        width: 100%;
        background: #26282c;
        border-radius: .5rem;
        color: #fff;
        padding: 1rem;
    }


/* conflictModal.css */

/* Modal backdrop (dimmed background) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* semi-transparent black */
    z-index: 1000; /* backdrop behind modal content */
}

/* Conflict modal container */
.modal.preview-conflict {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* center horizontally & vertically :contentReference[oaicite:0]{index=0} */
    width: 600px;
    max-width: 100%; /* limit width on smaller screens :contentReference[oaicite:1]{index=1} */
    max-height: 90vh;
    overflow-y: auto; /* enable scroll if content is tall */
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001; /* above the overlay */
}

/* Modal header styling */
.preview-conflict .modal-header {
    position: relative;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

    .preview-conflict .modal-header .close-modal {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 1.5em;
        background: none;
        border: none;
        cursor: pointer;
    }

/* Modal body content */
.preview-conflict .modal-body {
    margin-bottom: 1em;
}

.preview-conflict .conflict-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .preview-conflict .conflict-list li {
        margin: 0.25em 0;
        padding-left: 0;
    }

/* Modal footer (buttons) */
.preview-conflict .modal-footer {
    text-align: right;
}

    .preview-conflict .modal-footer .btn-cancel,
    .preview-conflict .modal-footer .btn-confirm {
        min-width: 80px;
        padding: 6px 12px;
        margin-left: 5px;
        cursor: pointer;
    }
    /* (Optional) distinguish the confirm button style */
    .preview-conflict .modal-footer .btn-confirm {
        background: #007bff;
        color: #fff;
        border: none;
    }

    .preview-conflict .modal-footer .btn-cancel {
        background: #ccc;
        border: none;
    }

.committed-contract {
    background-color: rgba(13, 110, 253, 0.05); /* subtle light-blue background */
}

/* Compact flatpickr calendar popup */
.flatpickr-calendar {
    font-size: 0.85rem !important;
    min-width: 200px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    border-radius: 6px !important;
    z-index: 1050 !important; /* Make sure it's above the modal overlay */
}

/* Dark theme styles */
body.dark-mode .flatpickr-calendar {
    background-color: #2b2b2b !important;
    color: #eee !important;
    border: 1px solid #444 !important;
}

body.dark-mode .flatpickr-time input {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .flatpickr-time .flatpickr-time-separator,
body.dark-mode .flatpickr-am-pm {
    color: #ccc !important;
}

body.dark-mode .flatpickr-time .numInputWrapper span {
    color: #aaa !important;
}

/* Optional: reduce padding for a tighter look */
.flatpickr-time {
    padding: 4px 8px !important;
}


.expand-icon {
    color: inherit; /* Default theme color */
}

    .expand-icon.archived-contract {
        opacity: 0.5; /* Slightly faded look */
        cursor: pointer; /* Keep it looking clickable */
    }

.archived-contract {
    opacity: 0.4;
    filter: grayscale(100%);
}


/* role-permissions-table */
.role-permissions-table th,
.role-permissions-table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.role-permissions-table {
    border-collapse: collapse;
    width: 100%;
}

    .role-permissions-table th {
        background-color: var(--bs-primary);
        color: #fff;
        border: 1px solid var(--bs-border-color, #dee2e6);
    }

    .role-permissions-table td {
        border: 1px solid var(--bs-border-color, #444); /* darker border in dark mode */
    }

/* Adjust text color for light mode */
body[data-bs-theme="light"] .role-permissions-table td,
body[data-bs-theme="light"] .role-permissions-table th {
    --bs-body-color: #212529 !important;
    --bs-body-bg: #ffffff !important;
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}

body[data-bs-theme="light"] .role-permissions-table {
    background-color: #ffffff !important;
    color: #212529 !important;
}

    /* Optional: improve header contrast */
    body[data-bs-theme="light"] .role-permissions-table thead th {
        background-color: #e9ecef !important;
        font-weight: bold;
    }

/* Improve hover contrast */
.role-permissions-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
/* Adjust text color for dark mode */
body[data-bs-theme="dark"] .role-permissions-table td {
    background-color: #1e1e2f;
    color: #fff;
}

.role-permissions-table input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

.role-permissions-table .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}


/* Group badges styling */
.group-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0.35em 0.65em;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

    .group-badge.confirmed {
        background-color: #198754;
        color: #fff;
    }

    .group-badge.pending {
        background-color: #ffc107;
        color: #212529;
    }

    .group-badge i {
        margin-right: 0.35rem;
    }

/* Info icon styling */
#info-icon {
    cursor: pointer;
    color: #0d6efd;
    position: relative; /* Ensure it's positioned */
    z-index: 1; /* Lower than modal but higher than other content */
}

/* Custom tooltip styling */
.custom-tooltip {
    position: fixed !important; /* Fixed position relative to viewport */
    background: white;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    z-index: 99999 !important; /* Even higher z-index */
    font-size: 14px;
    color: #333;
    max-width: 200px;
    pointer-events: auto;
}

    .custom-tooltip a {
        color: #0d6efd;
        text-decoration: none;
    }

        .custom-tooltip a:hover {
            text-decoration: underline;
        }

/* Info popover styling */
.info-popover {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 9999;
    width: max-content;
    max-width: 200px;
    bottom: 30px;
    right: 0px;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

    .info-popover a {
        color: #0d6efd;
        text-decoration: none;
    }

        .info-popover a:hover {
            text-decoration: underline;
        }

    /* State classes for JavaScript to toggle */
    .info-popover.visible {
        opacity: 1;
        visibility: visible;
    }

/* CALI identity modal theme */
dialog:has(.zoneviewer-modal) {
    background: transparent;
    border: 0;
    max-width: min(94vw, 560px);
    padding: 0;
}

.zoneviewer-modal-overlay:has(#loginForm),
.zoneviewer-modal-overlay:has(#registerForm),
.zoneviewer-modal-overlay:has(#forgotPasswordForm),
.zoneviewer-modal-overlay:has(#resendEmailForm),
.zoneviewer-modal-overlay:has(#resetPasswordForm) {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(31, 45, 36, 0.42);
    padding: 32px 18px;
}

.zoneviewer-modal-box:has(#loginForm),
.zoneviewer-modal-box:has(#registerForm),
.zoneviewer-modal-box:has(#forgotPasswordForm),
.zoneviewer-modal-box:has(#resendEmailForm),
.zoneviewer-modal-box:has(#resetPasswordForm) {
    --identity-forest: #1f2d24;
    --identity-forest-soft: #2f3a34;
    --identity-sage: #a8b5a2;
    --identity-rust: #a85d4d;
    --identity-sand: #d8d1c7;
    --identity-ivory: #f7f6f2;
    --identity-panel: #fffdf8;
    --identity-muted: #756f66;
    background:
        radial-gradient(circle at 20% 0%, rgba(168, 181, 162, 0.18), transparent 30%),
        linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(247, 246, 242, 0.96));
    border: 1px solid rgba(216, 209, 199, 0.9);
    border-radius: 14px;
    box-shadow: 0 28px 70px rgba(31, 45, 36, 0.28);
    color: var(--identity-forest);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-height: min(88vh, 900px);
    max-width: min(92vw, 520px);
    min-width: min(92vw, 420px);
    overflow: auto;
    padding: 0;
}

.zoneviewer-modal-brand {
    display: none;
}

.zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-brand,
.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-brand,
.zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-brand,
.zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-brand,
.zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-brand {
    align-items: center;
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    padding-top: 6px;
}

.zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-brand img,
.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-brand img,
.zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-brand img,
.zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-brand img,
.zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-brand img {
    height: auto;
    max-width: 176px;
    width: 46%;
}

.zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-header,
.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-header,
.zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-header,
.zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-header,
.zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-header {
    border-bottom: 1px solid rgba(216, 209, 199, 0.72);
    display: block;
    margin: 0;
    padding: 28px 32px 18px;
    position: relative;
    text-align: center;
}

.zoneviewer-modal-box:has(#loginForm) .modal-header-title,
.zoneviewer-modal-box:has(#registerForm) .modal-header-title,
.zoneviewer-modal-box:has(#forgotPasswordForm) .modal-header-title,
.zoneviewer-modal-box:has(#resendEmailForm) .modal-header-title,
.zoneviewer-modal-box:has(#resetPasswordForm) .modal-header-title {
    color: var(--identity-forest);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

.zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-close,
.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-close,
.zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-close,
.zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-close,
.zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-close {
    align-items: center;
    background: rgba(255, 253, 248, 0.72);
    border: 1px solid rgba(216, 209, 199, 0.88);
    border-radius: 999px;
    color: var(--identity-forest-soft);
    display: inline-flex;
    font-size: 1.25rem;
    height: 36px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 18px;
    top: 18px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    width: 36px;
}

.zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-close:hover,
.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-close:hover,
.zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-close:hover,
.zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-close:hover,
.zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-close:hover {
    background: var(--identity-forest);
    border-color: var(--identity-forest);
    color: var(--identity-ivory);
    transform: translateY(-1px);
}

.zoneviewer-modal-box:has(#loginForm) .modal-body,
.zoneviewer-modal-box:has(#registerForm) .modal-body,
.zoneviewer-modal-box:has(#forgotPasswordForm) .modal-body,
.zoneviewer-modal-box:has(#resendEmailForm) .modal-body,
.zoneviewer-modal-box:has(#resetPasswordForm) .modal-body {
    padding: 28px 42px 38px;
}

.zoneviewer-modal-box:has(#loginForm) form,
.zoneviewer-modal-box:has(#registerForm) form,
.zoneviewer-modal-box:has(#forgotPasswordForm) form,
.zoneviewer-modal-box:has(#resendEmailForm) form,
.zoneviewer-modal-box:has(#resetPasswordForm) form {
    display: grid;
    gap: 16px;
}

.zoneviewer-modal-box:has(#registerForm) {
    max-width: min(92vw, 560px);
}

.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-header {
    padding-bottom: 14px;
    padding-top: 20px;
}

.zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-brand {
    margin-bottom: 12px;
}

.zoneviewer-modal-box:has(#registerForm) .modal-header-title {
    font-size: clamp(1.85rem, 4.4vw, 2.55rem);
}

.zoneviewer-modal-box:has(#registerForm) .modal-body {
    padding-bottom: 28px;
    padding-top: 24px;
}

.zoneviewer-modal-box:has(#registerForm) #registerForm {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zoneviewer-modal-box:has(#registerForm) .form-control {
    min-height: 52px;
}

.zoneviewer-modal-box:has(#registerForm) #registerForm > * {
    grid-column: 1 / -1;
}

.zoneviewer-modal-box:has(#registerForm) #registerForm > .form-floating:nth-of-type(5),
.zoneviewer-modal-box:has(#registerForm) #registerForm > .form-floating:nth-of-type(6) {
    grid-column: span 1;
}

.zoneviewer-modal-box:has(#loginForm) .form-floating,
.zoneviewer-modal-box:has(#registerForm) .form-floating,
.zoneviewer-modal-box:has(#forgotPasswordForm) .form-floating,
.zoneviewer-modal-box:has(#resendEmailForm) .form-floating,
.zoneviewer-modal-box:has(#resetPasswordForm) .form-floating {
    margin-bottom: 0 !important;
}

.zoneviewer-modal-box:has(#loginForm) .form-control,
.zoneviewer-modal-box:has(#registerForm) .form-control,
.zoneviewer-modal-box:has(#forgotPasswordForm) .form-control,
.zoneviewer-modal-box:has(#resendEmailForm) .form-control,
.zoneviewer-modal-box:has(#resetPasswordForm) .form-control {
    background: rgba(255, 253, 248, 0.88);
    border: 1px solid rgba(216, 209, 199, 0.95);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--identity-forest);
    font-size: 0.95rem;
    min-height: 58px;
    padding-inline: 16px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.zoneviewer-modal-box:has(#loginForm) .form-control:focus,
.zoneviewer-modal-box:has(#registerForm) .form-control:focus,
.zoneviewer-modal-box:has(#forgotPasswordForm) .form-control:focus,
.zoneviewer-modal-box:has(#resendEmailForm) .form-control:focus,
.zoneviewer-modal-box:has(#resetPasswordForm) .form-control:focus {
    background: #ffffff;
    border-color: var(--identity-sage);
    box-shadow: 0 0 0 4px rgba(168, 181, 162, 0.22);
    outline: 0;
}

.zoneviewer-modal-box:has(#loginForm) .form-floating > label,
.zoneviewer-modal-box:has(#registerForm) .form-floating > label,
.zoneviewer-modal-box:has(#forgotPasswordForm) .form-floating > label,
.zoneviewer-modal-box:has(#resendEmailForm) .form-floating > label,
.zoneviewer-modal-box:has(#resetPasswordForm) .form-floating > label {
    color: var(--identity-muted);
    font-size: 0.9rem;
    padding-left: 16px;
}

.zoneviewer-modal-box:has(#loginForm) .checkbox,
.zoneviewer-modal-box:has(#loginForm) .form-check {
    align-items: center;
    color: var(--identity-muted);
    display: flex;
    gap: 10px;
    margin: 0 !important;
}

.zoneviewer-modal-box:has(#loginForm) .form-check-input,
.zoneviewer-modal-box:has(#registerForm) .form-check-input {
    border-color: rgba(117, 111, 102, 0.42);
    height: 18px;
    margin: 0 !important;
    width: 18px;
}

.zoneviewer-modal-box:has(#loginForm) .form-check-input:checked,
.zoneviewer-modal-box:has(#registerForm) .form-check-input:checked {
    background-color: var(--identity-forest);
    border-color: var(--identity-forest);
}

.zoneviewer-modal-box:has(#loginForm) .form-check-input:focus,
.zoneviewer-modal-box:has(#registerForm) .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(168, 181, 162, 0.22);
}

.zoneviewer-modal-box:has(#loginForm) .form-label,
.zoneviewer-modal-box:has(#registerForm) .form-label {
    color: var(--identity-muted);
    font-size: 0.92rem;
    margin: 0 !important;
}

.zoneviewer-modal-box:has(#loginForm) .btn-primary,
.zoneviewer-modal-box:has(#registerForm) .btn-primary,
.zoneviewer-modal-box:has(#forgotPasswordForm) .btn-primary,
.zoneviewer-modal-box:has(#resendEmailForm) .btn-primary,
.zoneviewer-modal-box:has(#resetPasswordForm) .btn-primary {
    background: var(--identity-forest);
    border: 1px solid var(--identity-forest);
    border-radius: 9px;
    box-shadow: 0 14px 26px rgba(31, 45, 36, 0.18);
    color: var(--identity-ivory);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    min-height: 52px;
    text-transform: uppercase;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.zoneviewer-modal-box:has(#loginForm) .btn-primary:hover,
.zoneviewer-modal-box:has(#registerForm) .btn-primary:hover,
.zoneviewer-modal-box:has(#forgotPasswordForm) .btn-primary:hover,
.zoneviewer-modal-box:has(#resendEmailForm) .btn-primary:hover,
.zoneviewer-modal-box:has(#resetPasswordForm) .btn-primary:hover {
    background: #2f3a34;
    border-color: #2f3a34;
    box-shadow: 0 18px 34px rgba(31, 45, 36, 0.22);
    transform: translateY(-1px);
}

.zoneviewer-modal-box:has(#loginForm) .btn-primary:focus-visible,
.zoneviewer-modal-box:has(#registerForm) .btn-primary:focus-visible,
.zoneviewer-modal-box:has(#forgotPasswordForm) .btn-primary:focus-visible,
.zoneviewer-modal-box:has(#resendEmailForm) .btn-primary:focus-visible,
.zoneviewer-modal-box:has(#resetPasswordForm) .btn-primary:focus-visible {
    box-shadow: 0 0 0 4px rgba(168, 181, 162, 0.34), 0 14px 26px rgba(31, 45, 36, 0.18);
}

.zoneviewer-modal-box:has(#loginForm) .btn-primary:active,
.zoneviewer-modal-box:has(#registerForm) .btn-primary:active,
.zoneviewer-modal-box:has(#forgotPasswordForm) .btn-primary:active,
.zoneviewer-modal-box:has(#resendEmailForm) .btn-primary:active,
.zoneviewer-modal-box:has(#resetPasswordForm) .btn-primary:active {
    transform: translateY(0);
}

.zoneviewer-modal-box:has(#loginForm) a,
.zoneviewer-modal-box:has(#registerForm) a,
.zoneviewer-modal-box:has(#forgotPasswordForm) a,
.zoneviewer-modal-box:has(#resendEmailForm) a,
.zoneviewer-modal-box:has(#resetPasswordForm) a {
    color: var(--identity-rust);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 4px;
}

.zoneviewer-modal-box:has(#loginForm) a:hover,
.zoneviewer-modal-box:has(#registerForm) a:hover,
.zoneviewer-modal-box:has(#forgotPasswordForm) a:hover,
.zoneviewer-modal-box:has(#resendEmailForm) a:hover,
.zoneviewer-modal-box:has(#resetPasswordForm) a:hover {
    color: var(--identity-forest);
    text-decoration: underline;
}

.zoneviewer-modal-box:has(#loginForm) form > div:has(a),
.zoneviewer-modal-box:has(#registerForm) form > div:has(a),
.zoneviewer-modal-box:has(#forgotPasswordForm) form > div:has(a),
.zoneviewer-modal-box:has(#resendEmailForm) form > div:has(a),
.zoneviewer-modal-box:has(#resetPasswordForm) form > div:has(a) {
    margin: 0 !important;
}

.zoneviewer-modal-box:has(#loginForm) .text-danger,
.zoneviewer-modal-box:has(#registerForm) .text-danger,
.zoneviewer-modal-box:has(#forgotPasswordForm) .text-danger,
.zoneviewer-modal-box:has(#resendEmailForm) .text-danger,
.zoneviewer-modal-box:has(#resetPasswordForm) .text-danger {
    color: #9a4639 !important;
    font-size: 0.84rem;
}

.zoneviewer-modal-box:has(#loginForm) .validation-summary-errors,
.zoneviewer-modal-box:has(#registerForm) .validation-summary-errors,
.zoneviewer-modal-box:has(#forgotPasswordForm) .validation-summary-errors,
.zoneviewer-modal-box:has(#resendEmailForm) .validation-summary-errors,
.zoneviewer-modal-box:has(#resetPasswordForm) .validation-summary-errors {
    background: rgba(168, 93, 77, 0.1);
    border: 1px solid rgba(168, 93, 77, 0.22);
    border-radius: 9px;
    color: #9a4639 !important;
    padding: 12px 14px;
}

@media (max-width: 520px) {
    .zoneviewer-modal-box:has(#loginForm),
    .zoneviewer-modal-box:has(#registerForm),
    .zoneviewer-modal-box:has(#forgotPasswordForm),
    .zoneviewer-modal-box:has(#resendEmailForm),
    .zoneviewer-modal-box:has(#resetPasswordForm) {
        min-width: 0;
        width: min(94vw, 420px);
    }

    .zoneviewer-modal-box:has(#loginForm) .zoneviewer-modal-header,
    .zoneviewer-modal-box:has(#registerForm) .zoneviewer-modal-header,
    .zoneviewer-modal-box:has(#forgotPasswordForm) .zoneviewer-modal-header,
    .zoneviewer-modal-box:has(#resendEmailForm) .zoneviewer-modal-header,
    .zoneviewer-modal-box:has(#resetPasswordForm) .zoneviewer-modal-header {
        padding: 24px 24px 16px;
    }

    .zoneviewer-modal-box:has(#loginForm) .modal-body,
    .zoneviewer-modal-box:has(#registerForm) .modal-body,
    .zoneviewer-modal-box:has(#forgotPasswordForm) .modal-body,
    .zoneviewer-modal-box:has(#resendEmailForm) .modal-body,
    .zoneviewer-modal-box:has(#resetPasswordForm) .modal-body {
        padding: 24px;
    }

    .zoneviewer-modal-box:has(#registerForm) #registerForm {
        grid-template-columns: 1fr;
    }

    .zoneviewer-modal-box:has(#registerForm) #registerForm > .form-floating:nth-of-type(5),
    .zoneviewer-modal-box:has(#registerForm) #registerForm > .form-floating:nth-of-type(6) {
        grid-column: 1 / -1;
    }
}

/* --- Global link default ---------------------------------------------------------
   Bootstrap 5.1 hard-codes plain <a> to #0d6efd (blue). site.css loads after
   bootstrap, and this :where() rule matches Bootstrap's (0,0,1) `a` specificity, so
   it wins the tie for un-themed links while losing to every component class. Keeps
   the public site on the CALI palette instead of Bootstrap blue. */
:where(body.public-shell) a {
    color: #a85d4d;
    text-underline-offset: 2px;
}
:where(body.public-shell) a:hover,
:where(body.public-shell) a:focus {
    color: #1f2d24;
}
