/* Shared app shell  used by MainLayout, DoctorLayout, and ReceptionistLayout */

.mf-shell {
    --mf-sidebar-w-expanded: 300px;
    --mf-sidebar-w-minimal: 72px;
    --mf-topbar-h: 5.25rem;
    --mf-data-grid-scroll-min: 28rem;
    --mf-data-grid-scroll-max: 48rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    background: var(--mf-bg);
}

.mf-sidebar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #0e2a38;
    color: #fff;
    min-height: 100vh;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 20;
    transition: width 0.28s ease;
}

.mf-sidebar--expanded {
    width: var(--mf-sidebar-w-expanded);
}

.mf-sidebar--minimal {
    width: var(--mf-sidebar-w-minimal);
    overflow-x: visible;
    overflow-y: auto;
    z-index: 25;
}

.mf-main-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--mf-bg);
}

.mf-content {
    flex: 1;
    padding: 1.5rem 1.5rem 2rem;
    overflow: auto;
}
.mf-shell-boot {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--mf-bg, #f4f7f9);
}



/* App top bar (global  was scoped AppTopBar.razor.css) */
/* App shell top bar  main column only */
.mf-topbar {
    display: flex;
    align-items: center;
    gap: 1rem 1.25rem;
    min-height: var(--mf-topbar-h, 5.25rem);
    padding: 0.85rem 1.5rem;
    background: #f8fafb;
    border-bottom: 1px solid #e8eef2;
    flex-wrap: nowrap;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    box-shadow: 0 1px 0 rgba(14, 42, 56, 0.04);
}

@media (min-width: 992px) {
    .mf-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto auto;
        align-items: center;
        column-gap: 1rem;
    }

    .mf-topbar-start {
        grid-column: 1;
    }

    .mf-topbar-search-wrap {
        grid-column: 2;
    }

    .mf-topbar-lang {
        grid-column: 3;
    }

    .mf-topbar-end {
        grid-column: 4;
        margin-inline-start: 0;
    }
}

@media (max-width: 991.98px) {
    .mf-topbar {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .mf-topbar-search-wrap {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
    }

    .mf-topbar-end {
        margin-inline-start: auto;
    }
}

@media (max-width: 767.98px) {
    .mf-topbar {
        align-items: flex-start;
    }
}

.mf-topbar-start {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
}

.mf-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #0e2a38;
    background: #fff;
    box-shadow: 0 4px 14px rgba(14, 42, 56, 0.12), 0 1px 2px rgba(14, 42, 56, 0.06);
    transition: box-shadow 0.15s ease, transform  0.15s ease;
}

.mf-menu-btn:hover {
    box-shadow: 0 6px 18px rgba(14, 42, 56, 0.14);
}

.mf-menu-btn:active {
    transform: scale(0.98);
}

.mf-page-heading {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

/* Title row: back link beside page title (never stacked above the title). */
.mf-page-heading-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    min-width: 0;
}

.mf-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0d9488;
    text-decoration: none;
    line-height: 1.2;
    max-width: min(12rem, 40vw);
}

.mf-topbar-back span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mf-topbar-back:hover {
    text-decoration: none;
    color: #0f766e;
}

.mf-topbar-back:hover span:last-child {
    text-decoration: underline;
}

.mf-topbar-back-icon {
    font-size: 1rem;
    line-height: 1;
}

.mf-shell--rtl .mf-topbar-back-icon {
    transform: scaleX(-1);
}

.mf-page-heading-row .mf-page-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.mf-page-title {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #0e2a38;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.mf-page-kicker {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mf-topbar-search-wrap {
    flex: 0 1 14rem;
    min-width: 9rem;
    max-width: 14rem;
}

.mf-topbar-lang {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.mf-lang {
    position: relative;
}

.mf-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0 0.85rem 0 0.95rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0e2a38;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(14, 42, 56, 0.05);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.mf-lang-trigger:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(14, 42, 56, 0.08);
}

.mf-lang-trigger-text {
    max-width: 7.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-lang-chevron {
    flex-shrink: 0;
    color: #64748b;
}

.mf-lang-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    inset-inline-end: 0;
    min-width: 11rem;
    padding: 0.35rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8eef2;
    box-shadow: 0 12px 40px rgba(14, 42, 56, 0.12);
    z-index: 420;
}

.mf-lang-item {
    display: block;
    width: 100%;
    text-align: inherit;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0e2a38;
    cursor: pointer;
    transition: background 0.12s ease;
}

.mf-lang-item:hover {
    background: #f8fafb;
}

.mf-lang-item--active {
    background: #f0fdfa;
    color: #0d9488;
    font-weight: 600;
}

.mf-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(14, 42, 56, 0.04);
}

.mf-search-ico {
    flex-shrink: 0;
    color: #94a3b8;
}

.mf-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    color: #0e2a38;
    min-width: 0;
}

.mf-search-input::placeholder {
    color: #94a3b8;
}

.mf-search-input:focus {
    outline: none;
}

.mf-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-inline-start: auto;
}

.mf-icon-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #0e2a38;
    box-shadow: 0 4px 14px rgba(14, 42, 56, 0.1), 0 1px 2px rgba(14, 42, 56, 0.05);
    transition: box-shadow 0.15s ease;
    position: relative;
    padding: 0;
}

.mf-icon-round:hover {
    box-shadow: 0 6px 18px rgba(14, 42, 56, 0.12);
}

.mf-bell-btn {
    border: 1px solid #eef2f5;
}

.mf-bell-dot {
    position: absolute;
    top: 7px;
    inset-inline-end: 7px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

.mf-user {
    position: relative;
}

.mf-avatar-btn {
    border: 1px solid rgba(43, 187, 173, 0.45);
    background: linear-gradient(160deg, #fff 0%, #f0fdfa 100%);
    color: #0d9488;
}

.mf-dropdown {
    position: absolute;
    inset-inline-end: 0;
    inset-inline-start: auto;
    top: calc(100% + 0.5rem);
    min-width: 240px;
    max-width: min(20rem, calc(100vw - 1.5rem));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(14, 42, 56, 0.15);
    border: 1px solid #e8eef2;
    padding: 0.75rem 0;
    z-index: 400;
}

.mf-dropdown-user {
    padding: 0 1rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.mf-dropdown-name {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0e2a38;
}

.mf-dropdown-email {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.mf-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 0;
}

.mf-dropdown-list li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #0e2a38;
    text-decoration: none;
    font-size: 0.9rem;
}

.mf-dropdown-list li a:hover {
    background: #f8fafb;
}

.mf-dropdown-logout a {
    color: #c2410c !important;
    font-weight: 500;
}


/* Nav sidebar chrome (global  was scoped NavSidebarChrome.razor.css) */
.mf-nav-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 1.35rem 0 1.1rem;
}

.mf-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0 1.1rem 1.35rem;
    margin: 0 0.65rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mf-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #2bbbad 0%, #229e92 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.mf-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mf-brand-title {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.mf-brand-sub {
    font-size: 0.78rem;
    color: #7dd3c0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.mf-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.65rem 1rem;
    overflow-y: auto;
}

.mf-nav a.mf-nav-link {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    margin: 0;
    border-radius: 14px;
    color: #9cb4c3;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, color 0.18s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.25;
}

.mf-nav-label {
    flex: 1;
    min-width: 0;
    text-align: start;
    white-space: normal;
    line-height: 1.25;
}

.mf-nav a.mf-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2eef3;
}

.mf-nav a.mf-nav-link.active {
    background: #1a4d5a;
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mf-nav-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 0.12rem;
}

.mf-nav a.mf-nav-link .mf-nav-ico {
    color: #8aa8b8;
}

.mf-nav a.mf-nav-link:hover .mf-nav-ico {
    color: #dce8ee;
}

.mf-nav a.mf-nav-link.active .mf-nav-ico {
    color: #fff;
}

.mf-sidebar-foot {
    padding: 1.1rem 1.35rem 0.25rem;
    margin: 0 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.mf-sync {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: #9cb4c3;
    font-weight: 500;
}

.mf-sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
    flex-shrink: 0;
}

.mf-version {
    margin: 0.55rem 0 0;
    font-size: 0.68rem;
    color: rgba(156, 180, 195, 0.55);
    letter-spacing: 0.02em;
}

.mf-nav-inner--minimal {
    padding: 0.85rem 0 1rem;
    overflow: visible;
}

.mf-nav-inner--minimal .mf-brand {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.65rem 0.35rem 1rem;
    margin: 0 0.35rem 0.5rem;
    gap: 0;
}

.mf-nav-inner--minimal .mf-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 0 auto;
}

.mf-nav-inner--minimal .mf-brand-text {
    display: none;
}

.mf-nav-inner--minimal .mf-nav {
    padding: 0.35rem 0.35rem 0.75rem;
    gap: 0.2rem;
    align-items: center;
    overflow: visible;
}

.mf-nav-inner--minimal .mf-nav a.mf-nav-link {
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.4rem;
    width: 100%;
    min-width: 0;
}

.mf-nav-inner--minimal .mf-nav a.mf-nav-link .mf-nav-label {
    display: none;
}

.mf-nav-inner--minimal .mf-nav-ico {
    margin: 0;
}

.mf-nav-inner--minimal .mf-sidebar-foot {
    display: none;
}
