html {
    font-size: 14px;
    min-height: 100%;
}

:root {
    --app-primary: #8ac442;
    --app-primary-dark: #6fa832;
    --app-primary-rgb: 138, 196, 66;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fb;
}

body.app-layout {
    background: #f4f4f4;
    display: block;
    overflow-x: hidden;
}

main {
    flex: 1;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--app-primary-rgb);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
    --bs-btn-disabled-bg: var(--app-primary);
    --bs-btn-disabled-border-color: var(--app-primary);
}

.btn-outline-primary,
.btn-outline-info {
    --bs-btn-color: var(--app-primary-dark);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-focus-shadow-rgb: var(--app-primary-rgb);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
    --bs-btn-disabled-color: var(--app-primary);
    --bs-btn-disabled-border-color: var(--app-primary);
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--app-primary-rgb), var(--bs-bg-opacity)) !important;
}

.text-primary {
    color: var(--app-primary-dark) !important;
}

.border-primary {
    border-color: var(--app-primary) !important;
}

.auth-layout main {
    flex: 0 0 auto;
    max-width: none;
    padding: 0 !important;
    width: 100%;
}

.auth-layout header,
.auth-layout footer {
    display: none;
}

.auth-layout footer {
    margin-top: 0 !important;
}

.app-logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.app-frame {
    min-height: 100vh;
}

.app-topbar {
    align-items: center;
    background: #0d2638;
    border-top: .5rem solid #087579;
    box-shadow: 0 .15rem .4rem rgba(15, 23, 42, .22);
    display: flex;
    height: 2.75rem;
    left: 0;
    padding: 0 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1040;
}

.app-topbar-brand {
    align-items: center;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    margin-left: 3rem;
    width: 10rem;
}

.app-topbar-brand img {
    height: 1.7rem;
    max-width: 9rem;
    object-fit: contain;
}

.app-menu-toggle {
    align-items: center;
    background: #8ac442;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 .1rem .35rem rgba(15, 23, 42, .24);
    color: #fff;
    display: inline-flex;
    font-size: 1.2rem;
    height: 1.75rem;
    justify-content: center;
    left: 14rem;
    line-height: 1;
    padding: 0;
    position: fixed;
    top: .8rem;
    width: 1.75rem;
    z-index: 1050;
}

.app-sidebar {
    background:
        linear-gradient(rgba(13, 38, 56, .9), rgba(13, 38, 56, .9)),
        url("../image/car-service-business-logo.png") center 65% / 11rem auto no-repeat,
        #0d2638;
    bottom: 0;
    box-shadow: .2rem 0 .5rem rgba(15, 23, 42, .16);
    color: #f7fbff;
    left: 0;
    position: fixed;
    top: 2.75rem;
    transition: transform .2s ease;
    width: 15.5rem;
    z-index: 1030;
}

.sidebar-profile {
    align-items: center;
    background:
        linear-gradient(rgba(140, 198, 63, .85), rgba(140, 198, 63, .85)),
        url("../image/AppLogo.png") center/80% no-repeat;
    border-bottom: .45rem solid #0d2638;
    display: flex;
    flex-direction: column;
    min-height: 7.9rem;
    padding: .8rem 1rem .7rem;
    text-align: center;
}

.sidebar-profile-logo {
    background: #fff;
    border: .18rem solid #3f7f31;
    border-radius: 50%;
    height: 3.8rem;
    object-fit: contain;
    padding: .18rem;
    width: 3.8rem;
}

.sidebar-profile-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: .35rem;
}

.sidebar-company {
    background: #0d2638;
    border-radius: .18rem;
    color: #8ac442;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: .35rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: .35rem .45rem;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    padding-top: .35rem;
}

.sidebar-link {
    align-items: center;
    color: #f3f7fb;
    display: grid;
    font-size: .92rem;
    font-weight: 400;
    gap: .55rem;
    grid-template-columns: 1rem 1fr;
    min-height: 2.35rem;
    padding: .55rem .75rem;
    text-decoration: none;
}

.sidebar-link i {
    font-size: .98rem;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(138, 196, 66, .16);
    color: #fff;
}

.sidebar-link.active {
    background: #8ac442;
    color: #fff;
}

.app-sidebar-backdrop {
    background: rgba(15, 23, 42, .45);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 1020;
}

.app-main {
    margin-left: 15.5rem;
    min-height: 100vh;
    padding-top: 2.75rem;
    transition: margin-left .2s ease;
}

.app-content {
    background: #fff;
    min-height: calc(100vh - 2.75rem);
    padding: 1.5rem;
}

.app-toast-container {
    display: grid;
    gap: .75rem;
    max-width: min(24rem, calc(100vw - 2rem));
    position: fixed;
    right: 1.25rem;
    top: 3.75rem;
    width: 24rem;
    z-index: 1080;
}

.app-toast {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .14);
    border-left: .35rem solid var(--app-primary);
    border-radius: .65rem;
    box-shadow: 0 .55rem 1.5rem rgba(15, 23, 42, .18);
    overflow: hidden;
    width: 100%;
}

.app-toast .toast-body {
    align-items: center;
    color: #0d2638;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto 1fr auto;
    padding: .9rem 1rem;
}

.app-toast-success i {
    color: var(--app-primary-dark);
}

.app-toast-error {
    border-left-color: #dc3545;
}

.app-toast-error i {
    color: #dc3545;
}

body.session-locked {
    overflow: hidden;
}

body.session-locked .app-frame {
    filter: blur(.16rem);
    pointer-events: none;
    user-select: none;
}

.session-timeout-overlay {
    align-items: center;
    background: rgba(210, 210, 210, .78);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1090;
}

.session-timeout-overlay[hidden] {
    display: none;
}

.session-timeout-dialog {
    background: #fff;
    border-radius: .2rem;
    box-shadow: 0 .3rem .9rem rgba(15, 23, 42, .34);
    color: #000;
    max-width: min(37.5rem, 100%);
    overflow: hidden;
    width: 37.5rem;
}

.session-timeout-header {
    background: var(--app-primary);
    color: #fff;
    padding: .55rem .9rem;
}

.session-timeout-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.session-timeout-body {
    padding: 1rem 1.1rem 1.45rem;
}

.session-timeout-body p {
    font-size: 1rem;
    line-height: 1.45;
    margin: 0 0 1rem;
}

.session-password-field {
    margin: 0 auto 1.8rem;
    max-width: 11rem;
}

.session-password-field label {
    color: var(--app-primary-dark);
    display: block;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.session-password-control {
    align-items: center;
    border-bottom: 1px solid #b8c2cc;
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 1.45rem;
}

.session-password-control input {
    border: 0;
    font-size: .85rem;
    min-width: 0;
    outline: 0;
    padding: 0 0 .2rem;
}

.session-password-control input.is-invalid {
    background-image: none;
}

.session-password-error-icon {
    color: #dc3545;
    display: none;
    font-size: .95rem;
}

.session-password-control input.is-invalid + .session-password-error-icon {
    display: inline-block;
}

.session-password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #607589;
    display: inline-flex;
    height: 1.3rem;
    justify-content: center;
    padding: 0;
    width: 1.3rem;
}

.session-unlock-error {
    color: #dc3545;
    font-size: .76rem;
    line-height: 1.2;
    margin-top: .35rem;
    min-height: .92rem;
}

.session-timeout-actions {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.session-timeout-button {
    align-items: center;
    background: var(--app-primary);
    border: 0;
    border-radius: .2rem;
    box-shadow: 0 .15rem .3rem rgba(15, 23, 42, .34);
    color: #fff;
    display: inline-flex;
    font-size: .85rem;
    font-weight: 800;
    gap: .45rem;
    justify-content: center;
    min-height: 1.9rem;
    min-width: 7.2rem;
    padding: .3rem .65rem;
}

.session-timeout-button:hover,
.session-timeout-button:focus {
    background: var(--app-primary-dark);
    color: #fff;
}

.session-timeout-button:disabled {
    opacity: .72;
}

.session-timeout-button i {
    font-size: 1.05rem;
    line-height: 1;
}

.sidebar-collapsed .app-menu-toggle {
    left: .75rem;
}

.sidebar-collapsed .app-sidebar {
    transform: translateX(-100%);
}

.sidebar-collapsed .app-main {
    margin-left: 0;
}

.branch-image-thumb {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: .5rem;
}

.branch-image-preview {
    max-width: 10rem;
    max-height: 10rem;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: .25rem;
    background: #fff;
}

.workshop-logo {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.hero {
    font-family: 'Arial';
    color: white;
    background: linear-gradient(135deg, var(--app-primary), #3f7f31);
}

.card {
    border: 0;
    border-radius: 1rem;
}

.content-panel {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 .25rem 1rem rgba(15, 23, 42, .08);
    margin: 0 auto;
    max-width: 58rem;
    padding: 2rem;
}

.stat-card {
    border-left: .35rem solid var(--app-primary);
}

.table > :not(caption) > * > * {
    line-height: 1.25;
    padding: .45rem .75rem;
}

.table-notes {
    max-width: 24rem;
    min-width: 14rem;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
}

.booking-actions .btn:not(.grid-action-btn) {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 2rem;
    min-width: 5.9rem;
    white-space: nowrap;
}

.grid-actions,
.booking-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: .35rem;
    justify-content: flex-end;
}

.grid-actions form,
.booking-actions form {
    margin: 0;
}

.grid-action-btn {
    align-items: center;
    display: inline-flex;
    height: 2.15rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 2.15rem;
}

.grid-action-btn i {
    font-size: 1rem;
}

.grid-row-highlight > * {
    background-color: #fff8e1 !important;
}

.grid-row-highlight > td:first-child {
    box-shadow: inset .25rem 0 0 var(--app-primary);
}

.labour-hours-input {
    font-size: inherit;
    font-weight: 400;
    max-width: 4.4rem;
    min-height: 2.4rem;
    padding-left: .75rem;
    padding-right: .45rem;
    text-align: left;
}

.table-pagination {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .65rem .25rem 0;
}

.table-pagination .page-link {
    color: var(--app-primary-dark);
}

.table-pagination .page-item.active .page-link {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.form-control, .form-select, .btn {
    border-radius: .65rem;
}

.auth-page {
    align-items: stretch;
    background: #171717;
    color: #fff;
    display: grid;
    grid-template-columns: minmax(28rem, 49.5vw) minmax(26rem, 1fr);
    min-height: 100vh;
    overflow: hidden;
}

.auth-content {
    align-items: center;
    background: #1b1b1b;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    position: relative;
}

.auth-panel {
    max-width: 24.5rem;
    text-align: center;
    width: 100%;
}

.auth-panel h1 {
    font-size: clamp(1.8rem, 5vw, 2rem);
    font-weight: 500;
    margin-bottom: 4.25rem;
}

.auth-options {
    display: grid;
    gap: 1rem;
}

.auth-alert {
    background: #242424;
    border: 1px solid #3b3b3b;
    color: #f5f5f5;
    margin-bottom: 1.25rem;
    text-align: left;
}

.auth-option-btn {
    align-items: center;
    background: transparent;
    border: 1px solid #3b3b3b;
    border-radius: 999px;
    color: #fff;
    display: grid;
    font-weight: 700;
    gap: .6rem;
    grid-template-columns: 1.5rem 1fr 1.5rem;
    min-height: 2.5rem;
    padding: .45rem 1.2rem;
    width: 100%;
}

.auth-option-btn:hover,
.auth-option-btn:focus {
    background: #232323;
    border-color: #555;
    color: #fff;
}

.auth-provider-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 0;
}

.auth-provider-icon svg {
    height: 1rem;
    width: 1rem;
}

.auth-option-btn:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.auth-email-form {
    border-top: 1px solid #333;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    text-align: left;
}

.auth-email-form .form-control {
    background: #202020;
    border-color: #3b3b3b;
    color: #fff;
}

.auth-email-form .form-control:focus {
    background: #202020;
    border-color: #777;
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .12);
    color: #fff;
}

.auth-email-form .form-floating > label {
    color: #a8a8a8;
}

.auth-email-form a,
.auth-signup a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.auth-email-form a:hover,
.auth-signup a:hover {
    text-decoration: underline;
}

.auth-signup {
    color: #b8b8b8;
    margin: 1.5rem 0 0;
}

.auth-terms {
    bottom: 1rem;
    color: #c9d0da;
    font-size: .78rem;
    left: 2rem;
    margin: 0;
    position: absolute;
    right: 2rem;
}

.auth-terms a {
    color: #fff;
    font-weight: 700;
}

.auth-visual {
    background:
        linear-gradient(90deg, #050607 0%, rgba(5, 6, 7, .52) 38%, rgba(5, 6, 7, .12) 62%, rgba(5, 6, 7, .48) 100%),
        radial-gradient(circle at 85% 45%, #c9d5e8 0, #72809a 24%, #111821 54%, #020303 100%);
    min-height: 100vh;
    position: relative;
}

.auth-visual::before {
    background: rgba(5, 6, 7, .12);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 2;
}

.auth-visual::after {
    background: linear-gradient(90deg, #1b1b1b 0, rgba(27, 27, 27, .74) 7%, rgba(27, 27, 27, 0) 18%);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 3;
}

.auth-visual-logo {
    /*height: min(80vh, 48rem);*/
    object-fit: contain;
    object-position: center left;
    /*opacity: .9;*/
    opacity: .5;
    position: absolute;
    /*right: 0;*/
    top: 50%;
    transform: translateY(-50%);
    /*width: min(62vw, 60rem);*/
    z-index: 1;
}

@media (max-width: 576px) {
    .display-5 {
        font-size: 2.2rem;
    }

    .table {
        font-size: .9rem;
    }
}

@media (max-width: 900px) {
    .app-topbar {
        padding-left: .75rem;
    }

    .app-topbar-brand {
        justify-content: flex-start;
        margin-left: 3rem;
        width: auto;
    }

    .app-menu-toggle {
        left: .75rem;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .app-sidebar-backdrop {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 1rem;
    }

    .session-timeout-overlay {
        justify-content: center;
        padding: 4rem 1rem 1rem;
    }

    .session-timeout-dialog {
        width: 100%;
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-content {
        padding: 3rem 1.25rem 4.5rem;
    }

    .auth-visual {
        display: none;
    }

    .auth-terms {
        left: 1.25rem;
        right: 1.25rem;
        text-align: center;
    }
}
