/* ── Global layout ──────────────────────────────────────────────────────── */
html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #F1F5F9;
}

#app {
    height: 100%;
}

/* ── Blazor error UI ─────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #0071c1;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: box-shadow .2s;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(0,0,0,.6);
    margin-top: 4px;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ── Tenant modules hub ─────────────────────────────────────────────────── */
.tenant-module-home {
    position: relative;
    min-height: calc(100vh - 96px);
    padding: 2.15rem 1rem 1.1rem;
    overflow: hidden;
    isolation: isolate;
}

.tenant-module-home::before {
    content: "";
    position: absolute;
    inset: -1.5rem -2rem auto auto;
    width: min(48vw, 640px);
    height: 300px;
    z-index: -1;
    background: linear-gradient(135deg, rgba(204, 251, 241, .72), rgba(240, 253, 250, 0));
    clip-path: polygon(24% 0, 100% 0, 100% 72%, 0 100%);
}

.tenant-module-bg-shape {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
}

.tenant-module-bg-shape--one {
    right: 7%;
    top: 18%;
    width: 260px;
    height: 260px;
    background: rgba(20, 184, 166, .07);
    filter: blur(2px);
}

.tenant-module-bg-shape--two {
    left: 42%;
    bottom: 24%;
    width: 180px;
    height: 180px;
    background: rgba(45, 212, 191, .08);
}

.tenant-module-hero {
    text-align: center;
    margin: 0 auto 2.2rem;
}

.tenant-module-title {
    color: #0f172a;
    font-size: 2.15rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.03em;
}

.tenant-module-subtitle {
    color: #64748b;
    margin-top: 0.45rem !important;
}

.tenant-module-grid {
    max-width: 1120px;
    margin: 0 auto;
}

.tenant-module-card-link,
.tenant-module-card-link:hover {
    display: block;
    height: 100%;
    color: inherit !important;
    text-decoration: none !important;
}

.tenant-module-card {
    height: 100%;
    min-height: 335px;
    padding: 2rem 1.35rem 1.55rem;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 18px;
    background:
        radial-gradient(circle at 84% 84%, rgba(20, 184, 166, .10), transparent 22%),
        #fff;
    text-align: center;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tenant-module-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, .32);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .11);
}

.tenant-module-card-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1.35rem;
    border-radius: 50%;
    background: #dff8f3;
}

.tenant-module-card-icon {
    color: #0d9488 !important;
    font-size: 2.45rem !important;
}

.tenant-module-card-title {
    color: #0f172a;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    min-height: 54px;
}

.tenant-module-card-desc {
    min-height: 78px;
    margin: .95rem auto 1.3rem !important;
    color: #64748b;
    max-width: 190px;
    line-height: 1.45 !important;
}

.tenant-module-card-button {
    border-radius: 999px !important;
    padding-inline: 1.15rem !important;
    text-transform: none !important;
    font-weight: 700 !important;
    box-shadow: 0 12px 24px rgba(13, 148, 136, .22) !important;
}

.tenant-module-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1110px;
    margin: 2.7rem auto 0;
    border-top: 1px solid rgba(203, 213, 225, .72);
}

.tenant-module-benefit {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    padding: 1.35rem 1.35rem;
    border-right: 1px solid rgba(203, 213, 225, .72);
}

.tenant-module-benefit--last {
    border-right: 0;
}

.tenant-module-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #0d9488;
    background: #e6fffb;
}

.tenant-module-benefit strong {
    display: block;
    color: #0f172a;
    font-size: .88rem;
    font-weight: 800;
}

.tenant-module-benefit span {
    display: block;
    margin-top: .16rem;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.35;
}

.tenant-module-footer {
    margin-top: 1.4rem;
    text-align: center;
    color: #64748b;
    font-size: .78rem;
}

/* ── Tenant selector ─────────────────────────────────────────────────────── */
.tenant-selector-home {
    position: relative;
    min-height: calc(100vh - 96px);
    padding: 2.15rem 1rem 1.1rem;
    overflow: hidden;
    isolation: isolate;
}

.tenant-selector-home::before {
    content: "";
    position: absolute;
    inset: -1.5rem -2rem auto auto;
    width: min(48vw, 640px);
    height: 300px;
    z-index: -1;
    background: linear-gradient(135deg, rgba(204, 251, 241, .72), rgba(240, 253, 250, 0));
    clip-path: polygon(24% 0, 100% 0, 100% 72%, 0 100%);
}

.tenant-selector-hero {
    text-align: center;
    margin: 0 auto 2.2rem;
}

.tenant-selector-grid {
    max-width: 1040px;
    margin: 0 auto;
    justify-content: center;
}

.tenant-selector-card {
    height: 100%;
    min-height: 310px;
    padding: 1.9rem 1.35rem 1.45rem;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 18px;
    background:
        radial-gradient(circle at 86% 84%, rgba(20, 184, 166, .10), transparent 22%),
        #fff;
    text-align: center;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tenant-selector-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, .32);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .11);
}

.tenant-selector-card-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1.2rem;
    border-radius: 50%;
    background: #dff8f3;
}

.tenant-selector-card-icon {
    color: #0d9488 !important;
    font-size: 2.4rem !important;
}

.tenant-selector-card-title {
    min-height: 34px;
    color: #0f172a;
    font-weight: 850 !important;
    line-height: 1.22 !important;
}

.tenant-selector-card-key {
    margin-top: .25rem !important;
    color: #64748b;
}

.tenant-selector-role-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
    min-height: 52px;
    margin: 1rem 0 1.15rem;
}

.tenant-selector-role-chip {
    background: #f0fdfa !important;
    color: #0f766e !important;
    font-weight: 700 !important;
}

.tenant-selector-card-button {
    border-radius: 999px !important;
    padding-inline: 1.15rem !important;
    text-transform: none !important;
    font-weight: 700 !important;
    box-shadow: 0 12px 24px rgba(13, 148, 136, .22) !important;
}

.tenant-selector-empty {
    max-width: 760px;
    margin: 0 auto;
}

.tenant-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1rem;
    color: #64748b;
    font-size: .88rem;
}

.tenant-module-dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.75rem 2rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% 8%, rgba(45, 212, 191, .18), transparent 28%),
        linear-gradient(135deg, #ffffff, #f0fdfa);
}

.tenant-module-dashboard-title {
    color: #0f172a;
    font-weight: 850 !important;
    letter-spacing: -0.035em;
}

.tenant-module-dashboard-subtitle {
    color: #64748b;
    margin-top: .45rem !important;
}

.tenant-module-dashboard-icon {
    color: #0d9488 !important;
    font-size: 4rem !important;
    opacity: .95;
}

.tenant-module-dashboard-blank {
    min-height: 52vh;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}

@media (max-width: 768px) {
    .tenant-module-home {
        padding-inline: .25rem;
    }

    .tenant-module-title {
        font-size: 1.65rem !important;
    }

    .tenant-module-benefits {
        grid-template-columns: 1fr;
    }

    .tenant-module-benefit {
        border-right: 0;
        border-bottom: 1px solid rgba(203, 213, 225, .72);
    }

    .tenant-module-dashboard-hero {
        align-items: flex-start;
        padding: 1.35rem;
    }

    .tenant-module-dashboard-icon {
        display: none !important;
    }
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.badge-active     { background-color: #e8f5e9; color: #2e7d32; }
.badge-suspended  { background-color: #fff3e0; color: #e65100; }
.badge-pending    { background-color: #ccfbf1; color: #0F766E; }
.badge-deleted    { background-color: #fce4ec; color: #c62828; }
.badge-paid       { background-color: #e8f5e9; color: #2e7d32; }
.badge-unpaid     { background-color: #fff3e0; color: #e65100; }
.badge-overdue    { background-color: #fce4ec; color: #c62828; }
.badge-cancelled  { background-color: #f3e5f5; color: #6a1b9a; }

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Auth / login (maquette PharmaERP) ───────────────────────────────────── */
.auth-split--pharma,
.auth-split--pharma .mud-typography,
.auth-split--pharma .mud-input-control {
    font-family: 'Inter', 'Roboto', sans-serif;
}

.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

.auth-split-marketing {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(180deg, #e8f4fc 0%, #f5fbff 42%, #eef6ff 100%);
}

.auth-split-marketing-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Points décoratifs — coin supérieur droit */
.auth-split-marketing-decor::before {
    content: "";
    position: absolute;
    top: 10%;
    right: 6%;
    width: 140px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(0, 97, 242, 0.22) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: 0.9;
}

.auth-split-marketing-decor::after {
    content: "+";
    position: absolute;
    top: 16%;
    right: 22%;
    font-size: 2rem;
    font-weight: 300;
    color: rgba(0, 97, 242, 0.2);
}

.pharma-brand-mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.auth-split-marketing-body {
    position: relative;
    z-index: 1;
    padding: 2.5rem 3rem 1.25rem;
    flex: 0 0 auto;
}

.auth-split-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-split-brand-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0a2540;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.auth-split-brand-sub {
    font-size: 0.8125rem;
    color: #5a6d85;
    margin-top: 2px;
    font-weight: 500;
}

.auth-split-headline {
    margin: 0 0 0.65rem;
    font-size: clamp(1.4rem, 2.1vw, 1.75rem);
    font-weight: 800;
    color: #0a2540;
    line-height: 1.22;
    letter-spacing: -0.025em;
    max-width: 28rem;
}

.auth-split-lead {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #5a6d85;
    max-width: 30rem;
}

.auth-split-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-split-feature {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.auth-split-feature-icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 97, 242, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-split-feature-icon {
    color: #0061f2 !important;
}

.auth-split-feature-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0a2540;
    margin-bottom: 2px;
}

.auth-split-feature-desc {
    font-size: 0.82rem;
    color: #6b7c92;
    line-height: 1.4;
}

.auth-split-marketing-photo {
    position: relative;
    z-index: 0;
    flex: 1 1 auto;
    min-height: 220px;
    margin: 0.5rem 1.5rem 0;
    border-radius: 12px 12px 0 0;
    background-image:
        linear-gradient(to top, rgba(232, 244, 252, 0.25) 0%, rgba(232, 244, 252, 0.85) 55%, rgba(245, 251, 255, 0.95) 100%),
        url("https://images.unsplash.com/photo-1587854692152-cbe660dbde88?auto=format&fit=crop&w=1600&q=85");
    background-size: cover;
    background-position: center 60%;
}

.auth-split-foot {
    position: relative;
    z-index: 1;
    padding: 0.65rem 3rem 1.15rem;
    font-size: 0.72rem;
    color: #8b9aad;
}

.auth-split-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.75rem;
    background: #f0f2f5;
}

.auth-login-shell {
    width: 100%;
    max-width: 430px;
}

.auth-login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.auth-login-card-inner {
    padding: 2.35rem 2.1rem 2rem;
}

.auth-login-hero {
    text-align: center;
    margin-bottom: 1.85rem;
}

.auth-login-shield {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.auth-login-shield svg {
    filter: drop-shadow(0 6px 14px rgba(0, 97, 242, 0.3));
}

.auth-login-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 800;
    color: #0a2540;
    letter-spacing: -0.02em;
}

.auth-login-subtitle {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: #6b7c92;
}

/* Champs type maquette (courrier / cadenas / œil) */
.auth-mock-field {
    margin-bottom: 1.1rem;
}

.auth-mock-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374a62;
    margin-bottom: 0.45rem;
}

.auth-mock-input-wrap {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.65rem 0 0.5rem;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-mock-input-wrap:focus-within {
    border-color: #0061f2;
    box-shadow: 0 0 0 3px rgba(0, 97, 242, 0.12);
}

.auth-mock-adorn-start {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    color: #8b9aad;
}

.auth-mock-adorn-start .mud-icon-root {
    font-size: 1.15rem !important;
}

.auth-mock-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    color: #0a2540;
    padding: 0.6rem 0.35rem 0.6rem 0;
}

.auth-mock-input::placeholder {
    color: #9aa8b8;
}

.auth-mock-eye {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #8b9aad;
    border-radius: 8px;
}

.auth-mock-eye:hover:not(:disabled) {
    color: #0061f2;
    background: rgba(0, 97, 242, 0.06);
}

.auth-mock-eye:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-mock-field .validation-message {
    display: block;
    font-size: 0.75rem;
    color: #c62828;
    margin-top: 0.35rem;
}

.auth-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-bottom: 1rem;
}

.auth-login-checkbox .mud-typography {
    font-size: 0.8125rem !important;
    color: #374a62 !important;
}

.auth-login-forgot-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0061f2;
    cursor: pointer;
}

.auth-login-forgot-link:hover:not(:disabled) {
    text-decoration: underline;
}

.auth-login-forgot-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-login-submit-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    margin-top: 0.15rem;
    border: none;
    border-radius: 10px;
    background: #0061f2;
    color: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 97, 242, 0.35);
    transition: background 0.15s, box-shadow 0.15s;
}

.auth-login-submit-btn:hover:not(:disabled) {
    background: #0050d4;
}

.auth-login-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.auth-login-submit-ico {
    color: #fff !important;
}

.auth-login-submit-spin {
    color: #fff !important;
}

.auth-login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.auth-login-divider-line {
    flex: 1;
    height: 1px;
    background: #e2e6ec;
}

.auth-login-divider-text {
    font-size: 0.8125rem;
    color: #9aa8b8;
    font-weight: 500;
}

.auth-login-sso-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.auth-login-sso-btn:hover:not(:disabled) {
    border-color: #0061f2;
    background: #fafbff;
}

.auth-login-sso-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-login-sso-ico {
    color: #0061f2 !important;
}

.auth-login-signup {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #6b7c92;
}

.auth-login-signup-link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    font-weight: 700;
    color: #0061f2;
    cursor: pointer;
}

.auth-login-signup-link:hover:not(:disabled) {
    text-decoration: underline;
}

.auth-login-signup-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 960px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-split-marketing {
        display: none;
    }

    .auth-split-main {
        min-height: 100vh;
        padding: 1.25rem;
    }
}

/* ── Auth / login (maquette Ordix ERP) ───────────────────────────────────── */
.auth-split--pharma {
    grid-template-columns: minmax(420px, 46vw) 1fr;
    background: #f5f6fa;
}

.auth-split--pharma .auth-split-marketing {
    position: relative;
    color: #fff;
    background-image: url("../images/login-left-reference.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.auth-split-marketing-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 42% 74%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(0, 73, 65, 0.18), rgba(0, 56, 50, 0.64));
    pointer-events: none;
}

.auth-split--pharma .auth-split-marketing-body {
    position: relative;
    z-index: 1;
    padding: 4.15rem 3.75rem 1.25rem;
}

.auth-split--pharma .auth-split-brand {
    gap: 1rem;
    margin-bottom: 1.55rem;
}

.auth-split--pharma .pharma-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: linear-gradient(135deg, #0fae92, #078a79);
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.auth-split--pharma .pharma-brand-mark .mud-icon-root {
    color: #fff !important;
    font-size: 1.6rem !important;
}

.auth-split--pharma .auth-split-brand-title {
    color: #fff;
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.auth-split--pharma .auth-split-headline {
    margin: 0 0 2.85rem;
    max-width: 23rem;
    color: #fff;
    font-size: 1.28rem;
    line-height: 1.45;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.auth-split--pharma .auth-split-headline span {
    color: #12b89e;
}

.auth-split--pharma .auth-split-features {
    gap: 1.55rem;
}

.auth-split--pharma .auth-split-feature {
    gap: 1rem;
    align-items: center;
}

.auth-split--pharma .auth-split-feature-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.auth-split--pharma .auth-split-feature-icon {
    color: #fff !important;
}

.auth-split--pharma .auth-split-feature-title {
    color: #fff;
    font-size: 0.93rem;
    font-weight: 800;
    margin-bottom: 0.28rem;
}

.auth-split--pharma .auth-split-feature-desc {
    color: rgba(255, 255, 255, 0.93);
    font-size: 0.84rem;
    line-height: 1.5;
}

.auth-product-scene {
    position: absolute;
    z-index: 1;
    left: 4.9rem;
    bottom: 4.4rem;
    width: 430px;
    height: 245px;
    perspective: 900px;
}

.auth-product-table {
    position: absolute;
    left: 0;
    right: 6px;
    bottom: 0;
    height: 118px;
    transform: rotateX(58deg) rotateZ(-1deg);
    transform-origin: center bottom;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(214, 222, 226, 0.42)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(8, 105, 93, 0.12));
    box-shadow:
        0 36px 42px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -18px 30px rgba(46, 64, 76, 0.16);
}

.auth-product-table::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -12px;
    height: 18px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, rgba(170, 182, 190, 0.45), rgba(77, 96, 105, 0.2));
}

.auth-product-plant {
    position: absolute;
    right: 36px;
    bottom: 64px;
    width: 112px;
    height: 136px;
    filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.18));
}

.auth-plant-pot {
    position: absolute;
    left: 28px;
    bottom: 0;
    width: 58px;
    height: 50px;
    border-radius: 6px 6px 18px 18px;
    background: linear-gradient(180deg, #f8fafc, #d7dde2);
    box-shadow: inset -7px -8px 16px rgba(65, 75, 86, 0.12);
}

.auth-plant-leaf {
    position: absolute;
    left: 50%;
    bottom: 42px;
    width: 28px;
    height: 72px;
    border-radius: 100% 0 100% 0;
    background: linear-gradient(135deg, #66b67a, #1f7a51);
    transform-origin: bottom center;
}

.auth-plant-leaf--1 {
    transform: translateX(-50%) rotate(-38deg);
}

.auth-plant-leaf--2 {
    width: 31px;
    height: 86px;
    transform: translateX(-50%) rotate(-12deg);
    background: linear-gradient(135deg, #75c788, #2a8759);
}

.auth-plant-leaf--3 {
    width: 30px;
    height: 78px;
    transform: translateX(-50%) rotate(20deg);
}

.auth-plant-leaf--4 {
    width: 23px;
    height: 62px;
    transform: translateX(-20%) rotate(48deg);
    background: linear-gradient(135deg, #88d99a, #2f8b5e);
}

.auth-product-box {
    position: absolute;
    left: 58px;
    bottom: 54px;
    width: 175px;
    height: 95px;
    border-radius: 4px;
    background: linear-gradient(90deg, #0b8778 0 24%, #f8fafc 24% 100%);
    box-shadow: 0 22px 34px rgba(0, 0, 0, 0.24);
}

.auth-product-box span {
    position: absolute;
    top: 31px;
    left: 86px;
    color: #087d70;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 0.95;
}

.auth-product-bottle {
    position: absolute;
    bottom: 60px;
    border-radius: 10px 10px 18px 18px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.auth-product-bottle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -15px;
    width: 30px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 8px 8px 3px 3px;
    background: #f4f4f4;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
}

.auth-product-bottle--amber {
    left: 247px;
    width: 42px;
    height: 70px;
    background: linear-gradient(180deg, #7b4a20, #44240f);
}

.auth-product-bottle--white {
    left: 296px;
    bottom: 56px;
    width: 45px;
    height: 76px;
    background: linear-gradient(180deg, #ffffff, #d8dde2);
}

.auth-product-pills {
    position: absolute;
    left: 8px;
    bottom: 40px;
    width: 115px;
    height: 32px;
    transform: rotate(8deg);
    border-radius: 6px;
    background:
        radial-gradient(circle at 18px 14px, #f1d7a5 0 6px, transparent 7px),
        radial-gradient(circle at 42px 14px, #efe2bf 0 6px, transparent 7px),
        radial-gradient(circle at 66px 15px, #f1d7a5 0 6px, transparent 7px),
        radial-gradient(circle at 90px 14px, #efe2bf 0 6px, transparent 7px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(160, 168, 180, 0.55));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.auth-split--pharma .auth-split-foot {
    position: absolute;
    z-index: 1;
    left: 3.85rem;
    bottom: 2rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
}

.auth-split--pharma .auth-split-main {
    position: relative;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #f7f8fb;
}

.auth-split--pharma .auth-login-shell {
    max-width: 514px;
}

.auth-login-toolbar {
    position: fixed;
    top: 1.45rem;
    right: 2.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3;
}

.auth-login-lang,
.auth-login-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e5ea;
    background: #fff;
    color: #374151;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.auth-login-lang {
    height: 42px;
    gap: 0.45rem;
    padding: 0 0.95rem;
    border-radius: 10px;
    font: inherit;
    font-size: 0.82rem;
    cursor: default;
}

.auth-login-theme {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: default;
}

.auth-split--pharma .auth-login-card {
    border: 1px solid #e6e8ee;
    border-radius: 4px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.auth-split--pharma .auth-login-card-inner {
    padding: 3.1rem 2.65rem 1.75rem;
}

.auth-split--pharma .auth-login-hero {
    margin-bottom: 2.4rem;
}

.auth-split--pharma .auth-login-title {
    color: #111827;
    font-size: 1.34rem;
    font-weight: 800;
}

.auth-split--pharma .auth-login-subtitle {
    margin-top: 0.85rem;
    color: #6b7280;
    font-size: 0.82rem;
}

.auth-split--pharma .auth-mock-field {
    margin-bottom: 1.35rem;
}

.auth-split--pharma .auth-mock-label {
    color: #111827;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.auth-split--pharma .auth-mock-input-wrap {
    min-height: 48px;
    border-color: #e0e3e9;
    border-radius: 5px;
    box-shadow: none;
}

.auth-split--pharma .auth-mock-input-wrap:focus-within {
    border-color: #0f9f8e;
    box-shadow: 0 0 0 3px rgba(15, 159, 142, 0.1);
}

.auth-split--pharma .auth-mock-input {
    font-size: 0.84rem;
}

.auth-split--pharma .auth-mock-adorn-start,
.auth-split--pharma .auth-mock-eye {
    color: #8b95a1;
}

.auth-split--pharma .auth-login-options {
    margin: -0.1rem 0 1.65rem;
}

.auth-split--pharma .auth-login-checkbox .mud-typography,
.auth-split--pharma .auth-login-forgot-link {
    font-size: 0.82rem !important;
}

.auth-split--pharma .auth-login-forgot-link {
    color: #0b8f81;
}

.auth-split--pharma .auth-login-submit-btn {
    min-height: 48px;
    border-radius: 5px;
    background: linear-gradient(90deg, #0aa08d, #07967f);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: none;
}

.auth-split--pharma .auth-login-submit-btn:hover:not(:disabled) {
    background: linear-gradient(90deg, #078e7e, #067f70);
}

.auth-split--pharma .auth-login-divider {
    margin: 2rem 0 1.8rem;
}

.auth-split--pharma .auth-login-divider-text {
    color: #6b7280;
    font-size: 0.78rem;
}

.auth-split--pharma .auth-login-sso-btn {
    min-height: 48px;
    border-radius: 5px;
    color: #0b7268;
    font-size: 0.88rem;
    background: #fff;
}

.auth-split--pharma .auth-login-sso-ico {
    color: #0b8f81 !important;
}

.auth-split--pharma .auth-login-signup {
    margin: 2rem -2.65rem -1.75rem;
    padding: 1.75rem 1rem;
    border-top: 1px solid #eff1f5;
    color: #6b7280;
    font-size: 0.84rem;
}

.auth-login-footer {
    position: fixed;
    bottom: 2.2rem;
    left: calc(46vw + 50%);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: #6b7280;
    font-size: 0.82rem;
    white-space: nowrap;
}

.auth-login-footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.auth-login-footer .mud-icon-root {
    color: #667085 !important;
    font-size: 1rem !important;
}

.auth-login-footer-sep {
    width: 1px;
    height: 24px;
    background: #d7dbe2;
}

/* ── Commande client ────────────────────────────────────────────────────── */
.tenant-cc-page-header {
    margin-bottom: 0.5rem;
}

.tenant-cc-table-wrap {
    overflow-x: auto;
}

.tenant-cc-table-wrap .mud-table-cell {
    vertical-align: middle;
}

.tenant-cc-stock-none {
    color: #94a3b8;
    font-weight: 600;
}

.tenant-cc-stock-low {
    color: #d97706;
    font-weight: 600;
}

.tenant-cc-detail-total {
    color: var(--mud-palette-primary);
    font-size: 1.15rem;
    font-weight: 700;
}

.tenant-cc-detail-info .mud-chip {
    font-weight: 600;
}

/* ── Réception (chargement) ─────────────────────────────────────────────── */
.tenant-reception-loading {
    border-radius: 12px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
}

/* ── Commande / point de vente ───────────────────────────────────────────── */
.tenant-commande-pos {
    margin-bottom: 1.5rem;
}

.tenant-commande-panel {
    border-radius: 12px;
    background: #fff;
}

.tenant-commande-toolbar .mud-input-root {
    min-width: 200px;
}

.tenant-commande-search-results {
    border-radius: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.tenant-commande-search-hit {
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.tenant-commande-search-hit:hover {
    background: #f1f5f9;
}

.tenant-commande-table-wrap {
    overflow-x: auto;
}

.tenant-commande-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
    white-space: nowrap;
}

.tenant-commande-stock-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.tenant-commande-stock-dot.stock-ok { background: #22c55e; }
.tenant-commande-stock-dot.stock-warn { background: #eab308; }
.tenant-commande-stock-dot.stock-low { background: #ef4444; }
.tenant-commande-stock-dot.stock-none { background: #94a3b8; }

.tenant-commande-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tenant-commande-rabais-field {
    max-width: 140px;
    margin: 0 !important;
}

.tenant-commande-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
}

@media (max-width: 960px) {
    .auth-split--pharma {
        grid-template-columns: 1fr;
    }

    .auth-split--pharma .auth-split-marketing,
    .auth-login-footer,
    .auth-login-toolbar {
        display: none;
    }

    .auth-split--pharma .auth-split-main {
        padding: 1.5rem;
    }

    .auth-split--pharma .auth-login-card-inner {
        padding: 2.25rem 1.5rem 1.5rem;
    }
}
