/* Base */
html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a,
.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Form validation */
.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;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Error boundary */
.blazor-error-boundary {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23ffe500' d='M32 4 2 58h60L32 4Zm0 17c2.2 0 4 1.8 4 4v14a4 4 0 1 1-8 0V25c0-2.2 1.8-4 4-4Zm0 30a5 5 0 1 1 0-10 5 5 0 0 1 0 10Z'/%3E%3C/svg%3E") no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Calendar */
.office-calendar .office-calendar-disabled-slot,
.office-calendar .office-calendar-disabled-slot .mud-cal-week-link,
.office-calendar .office-calendar-disabled-slot .mud-cal-month-link {
    background-color: rgba(128, 128, 128, 0.16);
}

.office-calendar .office-calendar-disabled-slot .mud-cal-week-link,
.office-calendar .office-calendar-disabled-slot .mud-cal-month-link {
    pointer-events: none;
}

/* Reconnect modal */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

#components-reconnect-modal button:hover {
    background-color: #3b6ea2;
}

#components-reconnect-modal button:active {
    background-color: #6b9ed2;
}

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid #0087ff;
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes components-reconnect-modal-slideUp {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes components-rejoining-animation {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0;
        left: 0;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

/* Office Management layout */
.office-layout-page {
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.office-layout-main {
    flex: 1 1 auto;
    min-width: 0;
}

.office-layout-sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    min-width: 280px;
    min-height: 100vh;
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    transition: width 0.2s ease, min-width 0.2s ease, opacity 0.2s ease;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.office-appbar {
    padding-left: 0.5rem;
}

.office-appbar-content {
    gap: 0.75rem;
}

.office-appbar-brand {
    flex: 1 1 20rem;
    min-width: 0;
}

.office-appbar-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-appbar-actions {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
    row-gap: 0.35rem;
}

.office-appbar-role,
.office-appbar-signout {
    flex: 0 0 auto;
}

.office-appbar-name {
    flex: 1 1 10rem;
    min-width: 0;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-message-badge {
    display: inline-flex;
}

.office-message-badge .mud-badge-root {
    overflow: visible;
}

.office-message-badge .mud-badge {
    inset: auto -0.15rem -0.1rem auto;
    transform: none;
}

.app-nav-toggle {
    margin-left: 0;
    margin-right: 0.35rem;
    flex: 0 0 auto;
    display: inline-flex !important;
}

.office-layout-sidebar.sidebar-collapsed {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0;
}

/* Office Management nav */
.office-nav-top {
    min-height: 3.5rem;
    background-color: rgba(0, 0, 0, 0.4);
}

.nav-menu-shell {
    flex: 1 1 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #f8fafc;
}

.office-nav-list {
    display: flex;
    flex-direction: column;
}

.office-nav-brand {
    font-size: 1.1rem;
}

.office-nav-icon {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-journal-text {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-journal-text' viewBox='0 0 16 16'%3E%3Cpath d='M5 8.5A.5.5 0 0 1 5.5 8h5a.5.5 0 0 1 0 1h-5A.5.5 0 0 1 5 8.5m0-2A.5.5 0 0 1 5.5 6h5a.5.5 0 0 1 0 1h-5A.5.5 0 0 1 5 6.5m0 4A.5.5 0 0 1 5.5 10h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5"/%3E%3Cpath d='M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2m10 1H3a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1'/%3E%3C/svg%3E");
}

.bi-receipt {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-receipt' viewBox='0 0 16 16'%3E%3Cpath d='M1.92.506A.5.5 0 0 1 2.5 0h11a.5.5 0 0 1 .39.812L12.61 2.43l1.28 1.618a.5.5 0 0 1 .02.602L12.61 6.43l1.28 1.618a.5.5 0 0 1 .02.602L12.61 10.43l1.28 1.618a.5.5 0 0 1 .02.602l-1.4 1.769A.5.5 0 0 1 12.11 15H3.89a.5.5 0 0 1-.39-.188L2.1 13.043a.5.5 0 0 1 .02-.602L3.39 10.82 2.11 9.201a.5.5 0 0 1-.02-.602L3.39 6.98 2.11 5.361a.5.5 0 0 1-.02-.602L3.39 3.14 2.11 1.52a.5.5 0 0 1-.19-.416M3.04 1l1.05 1.329a.5.5 0 0 1 .02.602L2.81 4.55l1.3 1.618a.5.5 0 0 1 .02.602L2.81 8.389l1.3 1.618a.5.5 0 0 1 .02.602L2.81 12.228 4.13 14h7.74l1.32-1.772-1.3-1.619a.5.5 0 0 1-.02-.602l1.3-1.618-1.3-1.619a.5.5 0 0 1-.02-.602l1.3-1.618-1.3-1.619A.5.5 0 0 1 11.87 1z"/%3E%3Cpath d='M8.5 4.5A.5.5 0 0 1 9 4h1a.5.5 0 0 1 0 1H9a.5.5 0 0 1-.5-.5m0 2A.5.5 0 0 1 9 6h1a.5.5 0 0 1 0 1H9a.5.5 0 0 1-.5-.5m0 2A.5.5 0 0 1 9 8h1a.5.5 0 0 1 0 1H9a.5.5 0 0 1-.5-.5m0 2A.5.5 0 0 1 9 10h1a.5.5 0 0 1 0 1H9a.5.5 0 0 1-.5-.5M5 4a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1zm0 2a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1zm0 2a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1zm0 2a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1z'/%3E%3C/svg%3E");
}

.bi-calendar-event {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-calendar-event' viewBox='0 0 16 16'%3E%3Cpath d='M11 6.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 0 1H12v.5a.5.5 0 0 1-1 0z'/%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v1H0V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M15 5H1v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2zm-3.5 2A1.5 1.5 0 1 1 10 8.5 1.5 1.5 0 0 1 11.5 7'/%3E%3C/svg%3E");
}

.bi-person-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person-lock' viewBox='0 0 16 16'%3E%3Cpath d='M11 8a2 2 0 1 0-4 0 2 2 0 0 0 4 0'/%3E%3Cpath d='M8 9a3 3 0 0 0-3 3v1h6v-1a3 3 0 0 0-3-3M5 5a3 3 0 1 1 6 0A3 3 0 0 1 5 5m8.5 3a1.5 1.5 0 0 1 1.5 1.5V10h.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5h.5v-.5A1.5 1.5 0 0 1 13.5 8m-.5 2h1v-.5a.5.5 0 0 0-1 0z'/%3E%3C/svg%3E");
}

.bi-gear-wide-connected {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-gear-wide-connected' viewBox='0 0 16 16'%3E%3Cpath d='M7.068.727c.243-.97 1.621-.97 1.864 0l.05.204a1.98 1.98 0 0 0 1.622 1.472l.208.03c.987.14 1.28 1.376.493 1.93l-.165.116a1.98 1.98 0 0 0-.72 2.02l.05.205c.243.969-.802 1.7-1.65 1.14l-.175-.11a1.98 1.98 0 0 0-2.088 0l-.175.11c-.848.56-1.893-.171-1.65-1.14l.05-.204a1.98 1.98 0 0 0-.72-2.021l-.165-.116c-.787-.554-.494-1.79.493-1.93l.208-.03A1.98 1.98 0 0 0 7.018.93zM8 5.5A2.5 2.5 0 1 0 8 10.5 2.5 2.5 0 0 0 8 5.5'/%3E%3Cpath d='M5.5 11A1.5 1.5 0 0 0 4 12.5v.5h8v-.5A1.5 1.5 0 0 0 10.5 11z'/%3E%3C/svg%3E");
}

.office-nav-item {
    padding: 0.35rem 0.85rem 0 !important;
}

.office-nav-item:first-of-type {
    padding-top: 1rem !important;
}

.office-nav-item:last-of-type {
    padding-bottom: 1rem !important;
}

.office-layout-sidebar .office-nav-link {
    min-height: 3.25rem;
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-radius: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.office-layout-sidebar .office-nav-link:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
    color: #fff !important;
}

.office-layout-sidebar .office-nav-link.active {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(168, 85, 247, 0.9)) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}

.office-layout-sidebar button.office-nav-link {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 0.75rem 1rem;
}

.office-nav-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.office-nav-scrollable {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.office-nav-utilities {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.12);
}

.office-nav-utility-item {
    padding-top: 0 !important;
}

.office-nav-utility-item:last-child {
    padding-bottom: 0 !important;
}

.office-nav-utility-link,
.office-nav-utility-status {
    width: 100%;
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.office-nav-utility-link {
    appearance: none;
    padding: 0.75rem 1rem;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
}

.office-nav-utility-link:focus-visible {
    outline: 2px solid rgba(191, 219, 254, 0.95);
    outline-offset: 2px;
}

.office-nav-utility-status-wrap {
    padding-top: 0 !important;
}

.office-nav-utility-status {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    text-align: center;
}

.office-nav-utility-status-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(248, 250, 252, 0.82);
}

.office-nav-utility-status-value {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive layout */
@media (max-width: 640.98px) {
    .office-layout-page {
        flex-direction: column;
        min-height: auto;
    }

    .office-layout-sidebar {
        display: block;
        width: 100%;
        min-width: 100%;
        min-height: auto;
        box-shadow: none;
    }

    .nav-menu-shell {
        min-height: auto;
    }

    .office-nav-top {
        justify-content: space-between;
    }

    .office-nav-body,
    .office-nav-scrollable {
        min-height: auto;
    }

    .office-nav-utilities {
        padding-top: 0.85rem;
    }

    .office-appbar {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .office-appbar-content {
        align-items: stretch;
        gap: 0.5rem;
    }

    .office-appbar-brand,
    .office-appbar-actions {
        flex: 1 1 100%;
        width: 100%;
    }

    .office-appbar-actions {
        margin-left: 0;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .office-appbar-name {
        flex: 1 1 8rem;
        max-width: none;
    }

    .office-appbar-title {
        font-size: 1rem;
    }
}

@media (min-width: 641px) {
    .office-nav-top,
    .office-layout-content {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}