/* App font style */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-font-sans-serif: "Google Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
}

html, body {
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
}

#app {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

/* Bootsrap dark and lightmode color ovverides */
[data-bs-theme="dark"] {
    --bs-body-bg: #111827;
    --bs-body-color: #e5e7eb;
}

[data-bs-theme="light"] {
    --bs-body-bg: #E9EDF3; /*  Custom light background color */
    --bs-body-color: #0f172a; /* Optional: also change the text color for contrast */
}

/* Form controls */

.form-control,
.simple-dropdown {
    border: 1px solid #d8deea;
    background: #f8fafc;
}

.dark-mode .form-control,
.dark-mode .simple-dropdown {
    border: 1px solid #334155;
    background: #0f172a;
}

/*. form-control[readonly], */
.form-control:disabled {
    background-color: #f5f5f5; /* disabled bg */
    color: #6c757d; /* muted text */
    border-color: #dcdcdc;
    opacity: 1; /* override browser default fade if needed */
    cursor: not-allowed;
}

/*.dark-mode .form-control[readonly],*/
.dark-mode .form-control:disabled {
    background-color: #2b3035; /* dark surface */
    color: #9aa0a6; /* muted readable text */
    border-color: #495057;
    opacity: 1;
}


/* Error pages */
.error-page {
    min-height: calc(100dvh - 7rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* App main page dark and light mode styles */
.auth-page,
.app-page {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #0f172a;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

    .auth-page.dark-mode,
    .app-page.dark-mode {
        background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
        color: #e5e7eb;
    }

        .auth-page.dark-mode .auth-card {
            background-color: rgba(15, 23, 42, 0.9);
            border: 1px solid rgba(148, 163, 184, 0.28) !important;
        }


/* Auth pages */
.auth-card {
    max-width: 420px;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
}

.auth-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1d4ed8;
    color: #fff;
    font-size: 1.25rem;
}

    .auth-icon img {
        width: 60px;
        height: auto;
    }


/* App navbar styles */
.app-navbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-color: #d8deea !important;
    box-shadow: 0 0.55rem 1.4rem rgba(15, 23, 42, 0.08);
}

.app-page.dark-mode .app-navbar {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: 0 0.65rem 1.5rem rgba(2, 6, 23, 0.42);
}

.app-navbar-btn {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/*.app-navbar-avatar-btn {
    overflow: hidden;
}

.app-navbar-avatar-btn .app-avatar {
    width: 100%;
    height: 100%;
}*/

/* App main layout */
.app-main-layout {
    min-height: 0;
    padding-top: 4.75rem;
    padding-bottom: 1.25rem;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: hidden;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1040;
}

/* App avatar */
.app-avatar {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
}

.app-avatar-initials {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: currentColor;
}

.app-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

/* Modal */
.modal-body {
    background-color: #ffffff;
}

.dark-mode .modal-body {
    background-color: #1e293b;
}

body.change-user-modal-open .modal-backdrop.show {
    opacity: 0.85 !important;
}

body.end-shift-modal-open .modal-backdrop.show {
    opacity: 0.85 !important;
}

body.change-user-modal-open .modal .modal-header .btn-close {
    display: none !important;
}



/* Card Panel */
.card-panel {
    border: 1px solid #d8deea;
    /*    border-radius: 1.35rem;*/
    box-shadow: 0 0.55rem 1.4rem rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.dark-mode .card-panel {
    background: #1e293b;
    color: #e5e7eb;
    border: 1px solid #334155;
}

.card-panel-full-vh:not(.is-collapsed) {
    min-height: calc(100dvh - 10rem);
}

.card-panel-fixed-height:not(.is-collapsed) {
    min-height: calc(100dvh - 10rem);
    max-height: calc(100dvh - 10rem);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 991.98px) {
    .card-panel-fixed-height:not(.is-collapsed) {
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    .card-panel-full-vh:not(.is-collapsed) {
        min-height: 0;
    }
}

.card-panel-fixed-height.is-collapsed,
.card-panel-full-vh.is-collapsed {
    height: auto;
}

.mobile-list-items {
    min-height: 0;
    width: 100%;
}

.card-panel-icon {
    min-width: 3rem;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #1d4ed8;
    background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
}

.dark-mode .card-panel-icon {
    color: #bfdbfe;
    background: #1e293b;
}

.card-panel-text {
    min-width: 0;
    overflow: hidden;
}

.card-panel-title,
.card-panel-subtitle {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-panel-actions {
    flex-shrink: 0;
}

.card-panel-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

    .card-panel-button i {
        font-size: 0.85rem;
    }


/* Table overrides and  styles */
[data-bs-theme="dark"] tr:has(input[type=checkbox].bb-grid-form-check-input:checked),
[data-bs-theme="dark"] tr:has(input[type=checkbox].bb-grid-form-check-input:checked):hover > * {
    color: #e5e7eb !important;
}

.bb-table-sticky > thead > tr > th {
    z-index: 10;
}

.table-image-cell {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.list-sortable-shell {
    max-height: calc(100dvh - 15.5rem);
    min-height: 12rem;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.2rem;
}

.list-sortable-shell .mobile-list-items {
    min-width: 0;
    width: 100%;
}

.list-sortable-shell .list-group-item {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.list-sortable-shell .list-group-item > * {
    min-width: 0;
}

.list-sortable-item {
    min-width: 0;
}

    .list-sortable-item .table-image-cell {
        flex-wrap: nowrap;
    }

.list-sortable-action {
    flex-shrink: 0;
}

/* Custom scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

    *::-webkit-scrollbar {
        width: 0.6rem;
        height: 0.6rem;
    }

    *::-webkit-scrollbar-track {
        background: transparent;
    }

    *::-webkit-scrollbar-thumb {
        background-color: #94a3b8;
        border-radius: 999px;
        border: 2px solid transparent;
        background-clip: content-box;
    }

        *::-webkit-scrollbar-thumb:hover {
            background-color: #64748b;
        }

[data-bs-theme="dark"] * {
    scrollbar-color: #475569 transparent;
}

    [data-bs-theme="dark"] *::-webkit-scrollbar-thumb {
        background-color: #475569;
    }

        [data-bs-theme="dark"] *::-webkit-scrollbar-thumb:hover {
            background-color: #64748b;
        }

/* Tabs */
.tabbable .nav-tabs {
    overflow-x: auto; /* Enables horizontal scrolling */
    overflow-y: hidden; /* Hides vertical scrollbar */
    flex-wrap: nowrap; /* Prevents tabs from wrapping to the next line */
}

    .tabbable .nav-tabs .nav-link {
        white-space: nowrap; /* Ensures tab text stays on a single line */
    }


/* Home page and Menu Panel Heros */
.index-hero-wrap {
    min-height: calc(100dvh - 7rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
}

.index-hero {
    max-width: 52rem;
}

.hero-logo {
    font-size: clamp(3rem, 7vw, 5.8rem);
    color: #2563eb;
    line-height: 1;
    margin-bottom: 1rem;
}

    .hero-logo img {
        width: 220px;
        height: auto;
    }

.hero-title {
    font-size: clamp(2.05rem, 6.5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.hero-welcome {
    margin: 0 auto 2rem;
    max-width: 38rem;
    color: #475569;
    font-size: clamp(1rem, 2.6vw, 1.25rem);
}

.hero-start-btn {
    background: #2563eb;
    color: #fff;
    border: 0;
    font-weight: 700;
    font-size: 1.08rem;
    padding: 0.8rem 1.8rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.hero-join-btn {
    background: #ffc107;
    color: #fff;
    border: 0;
    font-weight: 700;
    font-size: 1.08rem;
    padding: 0.8rem 1.8rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.hero-start-btn:hover,
.hero-start-btn:focus {
    background: #1d4ed8;
    color: #fff;
}

.hero-hint {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: #64748b;
}

.hero-pointer {
    margin-top: 0.4rem;
    font-size: 1.5rem;
    color: #2563eb;
    animation: hero-pointer-bounce 1.15s ease-in-out infinite;
}

@keyframes hero-pointer-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

:global(.dark-mode) .hero-logo,
:global(.dark-mode) .hero-pointer {
    color: #60a5fa;
}

:global(.dark-mode) .hero-welcome {
    color: #cbd5e1;
}

:global(.dark-mode) .hero-hint {
    color: #94a3b8;
}

:global(.dark-mode) .hero-start-btn {
    background: #3b82f6;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.32);
}

    :global(.dark-mode) .hero-start-btn:hover,
    :global(.dark-mode) .hero-start-btn:focus {
        background: #2563eb;
    }

