/* Brand tokens and base styles for the Dezhakam admin dashboard (Payno style) */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans-web.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-fa: 'IRANSans', Tahoma, sans-serif;
    --brand: #350066;
    --brand-dark: #5D189F;
    --brand-light: #8A2BE2;
    --surface: #FFFCFA;
    --page-bg: #F6F7FB;
    --page-bg-gradient: linear-gradient(180deg, #F3E9FB 0%, #FFFFFF 55%, #F6F7FB 100%);
    --text: #2A2622;
    --muted: #8A828F;
    --green: #1E9E5A;
    --green-bg: #E7F8EE;
    --red: #E5484D;
    --red-bg: #FDEBEB;
    --missing: #C4392E;
    --divider: #EDE8E4;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-card: 0 1px 2px rgba(45, 20, 60, 0.05), 0 6px 22px rgba(53, 0, 102, 0.07);
    --shadow-soft: 0 2px 10px rgba(53, 0, 102, 0.06);
    --shadow-lift: 0 10px 28px rgba(53, 0, 102, 0.11), 0 2px 8px rgba(45, 20, 60, 0.05);
}

html, body {
    margin: 0;
    direction: rtl;
    font-family: var(--font-fa);
    color: var(--text);
    background: var(--page-bg-gradient);
    background-attachment: fixed;
}

* {
    box-sizing: border-box;
    font-family: var(--font-fa);
}

/* MudBlazor Outlined — overrides (dashboard.css loads after MudBlazor.min.css) */
.mud-input-control.mud-input-outlined > .mud-input-control-input-container {
    overflow: visible;
}

.mud-input-control.mud-input-outlined .mud-input.mud-input-outlined,
.mud-input-control.mud-input-outlined .mud-input-outlined-border {
    overflow: visible;
}

.mud-input-control > .mud-input-control-input-container > .mud-input-label-outlined.mud-input-label-inputcontrol {
    line-height: 20px !important;
    overflow: visible !important;
    text-overflow: clip;
    height: auto !important;
    max-height: none;
    padding: 1px 5px 3px !important;
    letter-spacing: 0;
    background-color: #FFFDFB !important;
    z-index: 1;
}

.mud-input > input.mud-input-root-outlined.mud-input-root-margin-dense,
div.mud-input-slot.mud-input-root-outlined.mud-input-root-margin-dense {
    
}

/* RTL — label on notch: lift so Persian descenders clear the border line */
html[dir="rtl"] .mud-input-control.mud-input-outlined > .mud-input-control-input-container > .mud-input.mud-shrink ~ label.mud-input-label-outlined,
html[dir="rtl"] .mud-input-control.mud-input-outlined > .mud-input-control-input-container > .mud-input:focus-within ~ label.mud-input-label-outlined,
.mud-application-layout-rtl .mud-input-control.mud-input-outlined > .mud-input-control-input-container > .mud-input.mud-shrink ~ label.mud-input-label-outlined,
.mud-application-layout-rtl .mud-input-control.mud-input-outlined > .mud-input-control-input-container > .mud-input:focus-within ~ label.mud-input-label-outlined {
    transform: translate(-14px, -8px) scale(0.75) !important;
    transform-origin: top right !important;
}

::selection {
    background: #8A2BE233;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #E1CEF5;
    border-radius: 8px;
}

.dz-surface-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.dz-muted {
    color: var(--muted);
}

.dz-pill {
    border-radius: 20px;
}

/* ===== App shell (MainLayout) ===== */
.dz-shell {
    display: flex;
    gap: 20px;
    padding: 24px;
    min-height: 100vh;
}

.dz-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 74px;
    flex: none;
    padding-block: 10px;
}

.dz-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #350066;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    flex: none;
}

.dz-nav-icons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: auto 0;
}

.dz-nav-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.dz-nav-icon.dz-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
}

.dz-logout-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    flex: none;
}

.dz-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dz-content {
    flex: 1;
    min-width: 0;
}

.dz-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dz-brand-name {
    font-weight: 800;
    font-size: 19px;
    color: var(--brand);
}

.dz-page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.dz-topbar-spacer {
    flex: 1;
    min-width: 8px;
}

.dz-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dz-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    color: var(--muted);
    position: relative;
    cursor: pointer;
    flex: none;
}

.dz-notif-dot {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px; /* visual left in RTL = outer side of left-side icons */
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    border: 1.5px solid #fff;
}

.dz-avatar-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow-soft);
    flex: none;
}

/* Mobile nav toggle/backdrop — desktop hides them after sidebar rules below */
.dz-nav-toggle,
.dz-nav-drawer-close,
.dz-nav-backdrop {
    display: none;
}

/* ===== Login (BlankLayout) ===== */
.dz-blank-shell {
    min-height: 100vh;
    position: relative;
    background: #EDE7F6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    animation: dz-login-page-in 0.55s ease both;
}

@keyframes dz-login-page-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dz-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dz-blob-1 {
    top: -140px;
    left: -90px;
    width: 360px;
    height: 360px;
    background: #5D189F;
    opacity: 0.42;
    filter: blur(36px);
}

.dz-blob-2 {
    bottom: -130px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: #fff;
    opacity: 0.9;
    filter: blur(28px);
}

.dz-login-card {
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 18px 50px rgba(53, 0, 102, 0.14);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    direction: rtl;
    overflow: hidden;
}

.dz-login-form {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 52px 48px 28px;
}

.dz-login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dz-login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 20px;
}

.dz-login-title {
    font-weight: 800;
    font-size: 34px;
    line-height: 1.15;
    color: #1A1224;
    margin: 0;
}

.dz-login-subtitle {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    max-width: 320px;
}

.dz-login-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-login-field {
    position: relative;
}

.dz-login-fields .mud-input-control-input-container {
    background: #F4F0F8;
    border-radius: 16px;
}

.dz-login-field-icon,
.dz-login-field-eye {
    position: absolute;
    top: 16px;
    z-index: 3;
    color: #9B8FB0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
}

.dz-login-field-icon {
    inset-inline-start: 16px;
    pointer-events: none;
}

.dz-login-field-eye {
    inset-inline-end: 16px;
    cursor: pointer;
}

.dz-login-field-eye:hover {
    color: var(--brand);
}

.dz-login-trust {
    margin: 0;
    padding-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.dz-login-footer {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
}

.dz-shell-enter-sidebar {
    animation: dz-shell-enter-side 0.45s ease both;
}

.dz-shell-enter-main {
    animation: dz-shell-enter-main 0.5s ease both;
    animation-delay: 0.06s;
}

@keyframes dz-shell-enter-side {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes dz-shell-enter-main {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dz-login-fields .mud-input-control {
    margin: 0;
}

.dz-login-fields .dz-login-input .mud-input,
.dz-login-fields .dz-login-input .mud-input-filled {
    background: transparent !important;
    border-radius: 16px !important;
    min-height: 54px;
    padding: 0 !important;
}

.dz-login-fields .mud-input-control-input-container:hover {
    background: #EDE8F5;
}

.dz-login-fields .mud-input-helper-text,
.dz-login-fields .mud-input-control-helper-container,
.dz-login-fields .mud-input-control > label,
.dz-login-fields .mud-input-label,
.dz-login-fields .mud-input-outlined .mud-input-outlined-border,
.dz-login-fields .mud-notched-outline,
.dz-login-fields .mud-input-underline:before,
.dz-login-fields .mud-input-underline:after {
    display: none !important;
}

.dz-login-field-invalid {
    --dz-field-tone: var(--red);
    --dz-field-fill: #FDECEC;
}

.dz-login-field-ok {
    --dz-field-tone: var(--green);
    --dz-field-fill: var(--green-bg);
}

.dz-login-field-invalid .mud-input-control-input-container,
.dz-login-field-ok .mud-input-control-input-container,
.dz-login-field-invalid .mud-input-control-input-container:hover,
.dz-login-field-ok .mud-input-control-input-container:hover {
    background: var(--dz-field-fill) !important;
    box-shadow: inset 0 0 0 1.5px var(--dz-field-tone);
}

.dz-login-field-invalid .dz-login-field-icon,
.dz-login-field-ok .dz-login-field-icon,
.dz-login-field-invalid .dz-login-field-eye,
.dz-login-field-ok .dz-login-field-eye,
.dz-login-field-invalid .dz-login-input input,
.dz-login-field-ok .dz-login-input input,
.dz-login-field-invalid .mud-input-slot,
.dz-login-field-ok .mud-input-slot {
    color: var(--dz-field-tone) !important;
    caret-color: var(--dz-field-tone);
}

.dz-login-field-invalid .dz-login-input input::placeholder,
.dz-login-field-ok .dz-login-input input::placeholder,
.dz-login-field-invalid .mud-input-slot::placeholder,
.dz-login-field-ok .mud-input-slot::placeholder {
    color: var(--dz-field-tone) !important;
    opacity: 0.72;
}

.dz-login-fields .mud-input {
    position: relative;
}

.dz-login-fields .dz-login-input input,
.dz-login-fields .mud-input-slot {
    text-align: center !important;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.dz-login-fields .mud-input-slot {
    padding-block: 0 !important;
    padding-inline: 46px !important;
    min-height: 54px;
    width: 100% !important;
    box-sizing: border-box;
    align-self: stretch;
}

.dz-login-submit-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    position: relative;
}

.dz-login-submit {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 14px;
    background-image: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
    background-color: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    box-shadow: 0 10px 22px rgba(93, 24, 159, 0.32);
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.35s ease,
                box-shadow 0.35s ease,
                background-image 0.35s ease;
}

.dz-login-submit:disabled {
    color: #fff;
    opacity: 1;
    cursor: default;
}

.dz-login-submit-fail {
    background-image: none;
    background-color: var(--red);
    box-shadow: 0 8px 18px rgba(229, 72, 77, 0.28);
}

.dz-login-submit-ok {
    background-image: none;
    background-color: var(--green);
    box-shadow: 0 8px 18px rgba(30, 158, 90, 0.28);
}

.dz-login-submit-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dz-login-submit-inner.is-out {
    opacity: 0;
    transform: scale(0.96);
}

.dz-login-submit-inner .mud-icon-root {
    flex: none;
}

.dz-login-submit-probe {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    visibility: hidden;
    pointer-events: none;
}

.dz-login-submit-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dz-login-submit-spin 0.7s linear infinite;
}

@keyframes dz-login-submit-spin {
    to { transform: rotate(360deg); }
}

.dz-login-visual {
    flex: 1 1 50%;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #8B4DFF 0%, #5D189F 42%, #2A0050 100%);
    overflow: hidden;
    padding: 36px;
}

.dz-login-visual-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.dz-login-visual-waves path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 1.6;
}

.dz-login-visual-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dz-login-visual-orb-a {
    width: 160px;
    height: 160px;
    top: -40px;
    inset-inline-start: -50px;
    background: rgba(255, 255, 255, 0.1);
}

.dz-login-visual-orb-b {
    width: 120px;
    height: 120px;
    bottom: -30px;
    inset-inline-end: -30px;
    background: rgba(255, 255, 255, 0.12);
}

.dz-login-visual-frame {
    position: relative;
    z-index: 1;
    width: min(78%, 280px);
    min-height: 340px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 22px 40px rgba(20, 0, 50, 0.22);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 36px 24px;
}

.dz-login-visual-logo {
    width: 148px;
    height: 148px;
}

.dz-login-visual-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: screen;
}

.dz-login-visual-copy {
    text-align: center;
    color: #fff;
}

.dz-login-visual-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.dz-login-visual-tag {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.86;
}

@media (max-width: 860px) {
    .dz-login-card {
        flex-direction: column;
        max-width: 440px;
        min-height: 0;
        border-radius: 24px;
    }

    .dz-login-form {
        padding: 28px 24px 22px;
    }

    .dz-login-title {
        font-size: 28px;
    }

    .dz-login-visual {
        min-height: 168px;
        padding: 20px;
    }

    .dz-login-visual-frame {
        width: 100%;
        min-height: 0;
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        padding: 14px 18px;
        border-radius: 18px;
    }

    .dz-login-visual-logo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        flex: none;
    }

    .dz-login-visual-copy {
        text-align: start;
    }

    .dz-login-visual-name {
        font-size: 16px;
    }
}

/* ===== Dashboard page ===== */
.dz-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 980px) {
    .dz-dash-grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }
}

.dz-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dz-card {
    background: linear-gradient(180deg, #FFFDFB 0%, var(--surface) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(53, 0, 102, 0.06);
    padding: 22px;
    position: relative;
}

.dz-card-sm-pad {
    padding: 18px;
}

.dz-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dz-card-title {
    font-weight: 700;
    font-size: 14px;
}

.dz-link {
    font-size: 12px;
    color: var(--brand-light);
    cursor: pointer;
}

.dz-kpi-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.dz-kpi-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.dz-kpi-value {
    font-size: 20px;
    font-weight: 800;
}

.dz-kpi-value-sm {
    font-size: 19px;
    font-weight: 800;
}

.dz-kpi-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.dz-kpi-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.dz-quick-actions {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.dz-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    background: none;
    border: none;
}

.dz-quick-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-quick-action-label {
    font-size: 11px;
    color: var(--muted);
}

.dz-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #F2ECFA;
}

.dz-list-row:last-child {
    border-bottom: none;
}

.dz-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex: none;
}

.dz-list-name {
    font-size: 13px;
    font-weight: 600;
}

.dz-list-sub {
    font-size: 11px;
    color: var(--muted);
}

.dz-list-amount-pos {
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
}

.dz-stat-pair {
    display: flex;
    gap: 16px;
}

.dz-stat-box {
    flex: 1;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px;
}

.dz-stat-label {
    font-size: 12px;
    color: var(--muted);
}

.dz-stat-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.dz-badge-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}

.dz-badge-pill-green {
    background: var(--green-bg);
    color: var(--green);
}

.dz-badge-pill-red {
    background: var(--red-bg);
    color: var(--red);
}

.dz-week-pill {
    font-size: 11px;
    background: #F3EAFB;
    color: var(--brand);
    padding: 4px 10px;
    border-radius: 20px;
}

.dz-week-total {
    font-size: 24px;
    font-weight: 800;
}

.dz-week-trend {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.dz-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 64px;
}

.dz-bar {
    width: 9px;
    min-height: 6px;
    border-radius: 6px;
    background: #EADCF7;
}

.dz-bar.dz-bar-peak {
    background: linear-gradient(180deg, var(--brand-light), var(--brand));
}

.dz-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.dz-bar-label {
    width: 14px;
    text-align: center;
    font-size: 10px;
    color: var(--muted);
}

.dz-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-sms-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FAF7FD;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.dz-sms-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex: none;
}

.dz-promo-card {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 55%, #1F0040 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dz-promo-badge {
    font-size: 10px;
    background: #ffffff22;
    padding: 4px 10px;
    border-radius: 20px;
}

.dz-input, .dz-textarea, .dz-select {
    width: 100%;
    border: 1px solid #ECE3F7;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 14px;
    background: #FAF7FD;
}

.dz-label {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
    text-align: right;
    font-weight: 700;
}

/* RTL form fields in dialogs: label above control, anchored right */
.dz-form-field,
.dz-account-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.dz-form-field-label,
.dz-account-field-label,
.mud-dialog.dz-form-dialog .dz-label {
    display: block;
    width: 100%;
    text-align: right;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.4;
}

.dz-form-field-hint,
.dz-account-field-hint {
    font-size: 10px;
    color: var(--muted);
    text-align: right;
    line-height: 1.4;
}

.mud-dialog.dz-form-dialog .dz-form-field .dz-input,
.mud-dialog.dz-form-dialog .dz-form-field .dz-textarea,
.mud-dialog.dz-form-dialog .dz-form-field .dz-select {
    text-align: right;
}

/* MudBlazor outlined fields inside form dialogs (fallback) */
.mud-dialog.dz-form-dialog .mud-input-label {
    inset-inline-start: auto !important;
    inset-inline-end: 12px !important;
    transform-origin: top right !important;
    text-align: right;
}

.mud-dialog.dz-form-dialog .mud-input-outlined-border legend {
    margin-inline-start: auto;
    margin-inline-end: 8px;
    text-align: right;
    max-width: calc(100% - 16px);
}

.mud-dialog.dz-blockdlg-dialog .dz-blockdlg-text {
    margin: 0 0 8px;
    line-height: 1.6;
}

.mud-dialog.dz-blockdlg-dialog .dz-blockdlg-note {
    margin-bottom: 14px;
}

.dz-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1.5px dashed #E1CEF5;
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    background: #FAF7FD;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.dz-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dz-products-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dz-products-toolbar-search {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 240px;
    align-items: center;
}

.dz-products-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.dz-products-search-field {
    flex: 1;
    min-width: 180px;
    max-width: 420px;
}

.dz-products-search-field .mud-input-control {
    margin-top: 0 !important;
}

.dz-products-search-field .mud-input-control-input-container {
    margin: 0;
}

.dz-products-toolbar-btn.mud-button-root {
    height: 36px;
    min-height: 36px;
}

.dz-products-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    align-items: center;
}

.dz-products-filter-sep {
    width: 1px;
    height: 1.4rem;
    margin: 0 2px;
    background: rgba(0, 0, 0, 0.12);
}

.dz-products-table .dz-product-row-inactive {
    opacity: 0.55;
}

.dz-products-col-status {
    white-space: nowrap;
}

.dz-product-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.dz-product-status.is-on {
    color: #1b7a3d;
    background: rgba(46, 160, 80, 0.12);
}

.dz-product-status.is-off {
    color: #8a5a00;
    background: rgba(230, 162, 60, 0.16);
}

.dz-product-active-block {
    padding: 10px 12px;
    border: 1px solid var(--border, #e8e0f0);
    border-radius: 12px;
    background: #faf8fc;
}

.dz-product-publish-block {
    padding: 12px;
    border: 1px solid var(--border, #e8e0f0);
    border-radius: 12px;
    background: #faf8fc;
}

.dz-product-publish-row .dz-label {
    margin-bottom: 6px;
}

.dz-product-publish-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dz-product-publish-controls .dz-jalali-datepicker {
    flex: 1 1 180px;
    min-width: 160px;
}

.dz-product-publish-time {
    width: 128px;
    flex: 0 0 auto;
}

.dz-product-status.is-scheduled {
    color: #1a5f8a;
    background: rgba(33, 150, 243, 0.12);
}

.dz-product-active-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dz-products-tag-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.dz-products-tag-filters-label {
    font-size: 12px;
}

.dz-products-filter-actions {
    margin: 0 0 8px;
}

.dz-products-advanced-filters {
    margin: 0 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}

.dz-products-adv-price {
    min-width: 140px;
}

.dz-products-adv-price .dz-label {
    margin-bottom: 4px;
}

.dz-products-adv-price .dz-input {
    height: 36px;
}

.dz-bulk-price-preview {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(53, 0, 102, 0.05);
    border: 1px solid rgba(53, 0, 102, 0.08);
    font-size: 13px;
    line-height: 1.7;
}

.dz-bulk-price-preview p {
    margin: 0;
}

.dz-bulk-price-preview p + p {
    margin-top: 6px;
}

.dz-products-pricing-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.dz-products-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dz-products-price-row .dz-input {
    flex: 1 1 140px;
    min-width: 0;
}

.dz-products-price-row-btn.mud-button-root {
    flex: 0 0 auto;
    height: 36px;
    min-height: 36px;
    white-space: nowrap;
}

.dz-bulk-price-confirm-body {
    gap: 0;
}

.mud-dialog.dz-bulk-price-confirm .mud-dialog-title {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}

.dz-bulk-price-confirm-icon {
    background: linear-gradient(145deg, #F3EAFB, #E9D7F8);
    color: var(--brand);
    margin-bottom: 22px;
}

.dz-bulk-price-confirm-title {
    margin-bottom: 10px;
}

.dz-bulk-price-confirm-summary {
    margin-bottom: 6px;
}

.dz-bulk-price-report {
    width: 100%;
    margin: 22px 0 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, #FBF8FE 0%, #F6F0FB 100%);
    border: 1px solid rgba(53, 0, 102, 0.1);
    text-align: start;
}

.dz-bulk-price-report-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
}

.dz-bulk-price-report-row + .dz-bulk-price-report-row {
    border-top: 1px dashed rgba(53, 0, 102, 0.1);
}

.dz-bulk-price-report-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.dz-bulk-price-report-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-align: end;
    line-height: 1.5;
}

.dz-bulk-price-report-em {
    color: var(--brand);
    font-size: 15px;
    font-weight: 800;
}

.dz-bulk-price-report-row.is-warn .dz-bulk-price-report-value {
    color: #C77800;
}

.dz-bulk-price-confirm-ask {
    margin: 14px 0 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.8;
}

/* Single close button in pricing dialog: don't stretch to half-grid */
.mud-dialog-actions.dz-form-dialog-actions:has(> :only-child) {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: stretch !important;
}

.mud-dialog-actions.dz-form-dialog-actions:has(> :only-child) > .mud-button-root {
    width: 100%;
}

.dz-product-tag-chip {
    border: 1px solid #E0D4EC;
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-fa);
    cursor: pointer;
    line-height: 1.3;
}

.dz-product-tag-chip:hover:not(:disabled) {
    background: #F8F4FC;
}

.dz-product-tag-chip.is-on {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    border-color: transparent;
}

.dz-product-tag-chip.is-on:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--brand-dark, #5b21b6), var(--brand));
    color: #fff;
    border-color: transparent;
    filter: brightness(0.96);
}

.dz-product-tag-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dz-product-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dz-product-tags-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    align-items: start;
}

.dz-product-tags-row .dz-product-tag-chips {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.dz-product-tags-row .dz-product-tag-chip {
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.dz-product-tag-field .dz-label {
    margin-bottom: 6px;
}

.dz-form-section-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    grid-column: 1 / -1;
}

.dz-form-section-with-action::after {
    display: none;
}

.dz-product-tags-manage-btn.mud-button-root {
    border-radius: 16px;
    flex-shrink: 0;
}

.dz-product-tag-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.dz-product-tag-block-head .dz-label {
    margin-bottom: 0;
}

.dz-link-btn {
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-fa);
    cursor: pointer;
    padding: 0;
}

.dz-link-btn:hover:not(:disabled) {
    text-decoration: underline;
}

.dz-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dz-product-tags-cell {
    min-width: 120px;
    vertical-align: middle !important;
}

.dz-product-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.dz-product-tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #F3EEF8;
    color: var(--brand);
    line-height: 1.35;
}

.dz-product-tag-pill.is-speaker {
    background: #EAF4FF;
    color: #1A5FA8;
}

.dz-product-tag-pill.is-category,
.dz-product-tag-pill.is-series {
    background: #F3EEF8;
    color: var(--brand);
}

.dz-product-tag-pill.is-off {
    background: #F0F0F0;
    color: #888;
}

.dz-product-tag-more {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.dz-product-tags-manage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 720px) {
    .dz-product-tags-manage {
        grid-template-columns: 1fr;
    }
}

.dz-product-tags-col {
    border: 1px solid #EDE7F4;
    border-radius: 14px;
    padding: 12px;
    background: #FCFBFE;
}

.dz-product-tags-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dz-product-tags-add {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.dz-product-tags-add .dz-input {
    flex: 1;
}

.dz-product-tags-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.dz-product-tags-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #EEE8F5;
}

.dz-product-tags-item.is-inactive {
    opacity: 0.72;
}

.dz-product-tags-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dz-product-tags-item-name {
    font-weight: 700;
    font-size: 13px;
}

.dz-product-tags-item-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.dz-form-dialog-actions-center {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: center !important;
}

.dz-form-dialog-actions-center .mud-button-root {
    width: auto !important;
    min-width: 140px;
}

.dz-product-type-icon {
    color: var(--brand, #7c3aed);
    vertical-align: middle;
}

.dz-products-table-block {
    margin-top: 4px;
}

.dz-products-table-scroll {
    max-height: min(70vh, 720px);
    overflow: auto;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(53, 0, 102, 0.06);
}

.dz-products-page-card .mud-table.dz-table-sticky thead .mud-table-cell,
.dz-products-page-card .mud-table.dz-table-sticky .mud-table-head .mud-table-cell {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

@media (max-width: 900px) {
    .dz-products-table-scroll {
        max-height: none;
    }
}

/* Identity cluster: code + type + name stuck together (RTL start) */
.dz-products-table .dz-products-col-code {
    width: 72px;
    max-width: 88px;
    padding-inline-end: 4px !important;
    white-space: nowrap;
}

.dz-products-table .dz-products-col-type {
    width: 44px;
    max-width: 48px;
    padding-inline: 2px !important;
}

.dz-products-table .dz-products-col-name {
    padding-inline-start: 4px !important;
    min-width: 140px;
}

.dz-products-table .dz-products-col-tags {
    min-width: 120px;
    max-width: 220px;
}

.dz-products-table .dz-product-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-width: none;
    overflow: visible;
}

.dz-products-table .dz-product-tag-pill {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
}

.dz-product-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e8e0f0);
    border-radius: 12px;
    background: #faf8fc;
}

.dz-product-file-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border, #e8e0f0);
    border-radius: 12px;
    background: #faf8fc;
    overflow: hidden;
}

.dz-product-file-card > .dz-product-file-row {
    border: none;
    border-radius: 0;
    background: transparent;
}

.dz-product-file-meta {
    flex: 1;
    min-width: 0;
}

.dz-product-file-meta .dz-cell-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-product-file-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    margin-top: 2px;
}

.dz-product-file-progress {
    padding: 0 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dz-product-file-bar.mud-progress-linear {
    height: 6px;
    border-radius: 999px;
}

.dz-product-file-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted, #7a6f8a);
}

.dz-product-cover-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.dz-product-cover-preview {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    border: 1px solid var(--border, #e8e0f0);
    background: #f3eef8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.dz-product-cover-preview img,
.dz-product-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.dz-product-color-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dz-product-color-picker-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dz-product-color-picker-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E0D4EC;
    cursor: pointer;
    background: #fff;
}

.dz-product-color-picker-wrap.is-empty {
    background:
        linear-gradient(45deg, #ECE7F2 25%, transparent 25%) 0 0 / 10px 10px,
        linear-gradient(-45deg, #ECE7F2 25%, transparent 25%) 0 5px / 10px 10px,
        linear-gradient(45deg, transparent 75%, #ECE7F2 75%) 5px -5px / 10px 10px,
        linear-gradient(-45deg, transparent 75%, #ECE7F2 75%) 5px 0 / 10px 10px,
        #fff;
    border-style: dashed;
    border-color: #C9B8DC;
}

.dz-product-color-picker-wrap.is-empty .dz-product-color-picker {
    opacity: 0;
}

.dz-product-color-picker {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    padding: 0;
    border: 0;
    cursor: pointer;
    background: transparent;
}

.dz-product-color-eyedropper-btn.mud-button-root {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(53, 0, 102, 0.18);
    border-radius: 10px;
    background: #F6F0FB;
    color: var(--brand);
}

.dz-product-color-eyedropper-btn.mud-button-root:hover {
    background: #E9D7F8;
}

.dz-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dz-mini-table th,
.dz-mini-table td {
    text-align: right;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.dz-mini-table th {
    color: var(--muted, #888);
    font-weight: 600;
}

/* ===== Products / Users list rows ===== */
.dz-row-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 8px;
}

.dz-entity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid #F2ECFA;
}

.dz-entity-row:last-child {
    border-bottom: none;
}

.dz-cover {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-icon-action {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-icon-action-edit {
    background: #F3EAFB;
    color: var(--brand);
}

.dz-icon-action-delete {
    background: var(--red-bg);
    color: var(--red);
}

.dz-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 60px 20px;
    text-align: center;
}

.dz-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F3EAFB;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-search-box {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.dz-search-box .dz-search-icon {
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    margin: auto;
    color: var(--muted);
    display: flex;
    align-items: center;
}

.dz-search-input {
    width: 100%;
    border: none;
    border-radius: 20px;
    padding: 11px 40px 11px 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-size: 13px;
}

.dz-filter-pill {
    border: none;
    border-radius: 20px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.dz-filter-pill-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
}

/* ===== Reports page ===== */
.dz-report-filter-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.dz-report-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

@media (max-width: 980px) {
    .dz-report-grid {
        grid-template-columns: 1fr;
    }
}

.dz-branch-bar-track {
    height: 10px;
    background: #F3EAFB;
    border-radius: 10px;
    overflow: hidden;
}

.dz-branch-bar-fill {
    height: 100%;
    border-radius: 10px;
}

.dz-donut {
    position: relative;
    width: 150px;
    height: 150px;
}

.dz-donut-ring {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.dz-donut-hole {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.dz-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

/* Wide text sidebar */
.dz-sidebar.dz-sidebar-wide {
    width: 220px;
    align-items: stretch;
    padding: 16px 12px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: var(--text);
    overflow: hidden;
}

/* Desktop: sticky sidebar in document flow */
@media (min-width: 981px) {
    .dz-sidebar.dz-sidebar-wide {
        position: sticky;
        top: 24px;
        align-self: start;
        height: calc(100vh - 48px);
        max-height: calc(100vh - 48px);
    }
}

/* Mobile: off-canvas drawer + framed topbar */
@media (max-width: 980px) {
    .dz-shell {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .dz-main-col {
        min-width: 0;
        max-width: 100%;
        gap: 12px;
    }

    .dz-content {
        min-width: 0;
        max-width: 100%;
    }

    /* One solid header card: menu + title + user */
    .dz-topbar {
        position: sticky;
        top: 12px;
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 56px;
        padding: 8px 10px;
        margin: 0;
        background: var(--surface);
        border: 1px solid rgba(53, 0, 102, 0.08);
        border-radius: 16px;
        box-shadow: var(--shadow-soft);
    }

    .dz-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: #F3EAFB;
        color: var(--brand);
        box-shadow: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .dz-nav-toggle:active {
        background: #E8D7F8;
    }

    .dz-nav-toggle .mud-icon-root {
        font-size: 22px !important;
    }

    .dz-page-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dz-topbar-spacer {
        display: none;
    }

    .dz-topbar-actions {
        flex: none;
        min-width: 0;
    }

    .dz-topbar-user {
        gap: 6px;
        padding-block: 3px;
        padding-inline: 8px 3px;
        background: #F5F2F8;
        border-radius: 999px;
        max-width: min(48vw, 180px);
    }

    .dz-topbar-roles {
        display: none !important;
    }

    .dz-topbar-user-text {
        min-width: 0;
        flex: 1 1 auto;
    }

    .dz-topbar-user-name {
        max-width: none;
        font-size: 12px;
        line-height: 1.2;
    }

    .dz-topbar-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .dz-topbar-logout {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #fff;
        color: var(--muted);
        box-shadow: none;
    }

    .dz-topbar-logout:active {
        background: #ECEAF2;
        color: var(--brand);
    }

    .dz-nav-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-inline-start: auto;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 10px;
        background: #F5F2F8;
        color: var(--muted);
        cursor: pointer;
        flex: none;
    }

    .dz-nav-drawer-close:active {
        background: #ECEAF2;
        color: var(--brand);
    }

    .dz-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(20, 10, 35, 0.42);
        backdrop-filter: blur(2px);
    }

    .dz-shell.dz-nav-open .dz-nav-backdrop {
        display: block;
    }

    body:has(.dz-shell.dz-nav-open) {
        overflow: hidden;
        touch-action: none;
    }

    /*
     * Fixed to the viewport (not sticky in flow).
     * Closed drawer must not reserve vertical space at page top.
     */
    .dz-sidebar.dz-sidebar-wide {
        position: fixed;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        width: min(300px, 88vw);
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding: 14px 12px 20px;
        border-radius: 0;
        border-start-end-radius: 18px;
        border-end-end-radius: 18px;
        z-index: 1150;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translate3d(110%, 0, 0);
        transition: transform 0.28s ease;
        box-shadow: -8px 0 28px rgba(20, 10, 35, 0.18);
        pointer-events: none;
        visibility: hidden;
    }

    .dz-shell.dz-nav-open .dz-sidebar.dz-sidebar-wide {
        transform: translate3d(0, 0, 0);
        pointer-events: auto;
        visibility: visible;
    }

    .dz-sidebar.dz-sidebar-wide .dz-sidebar-brand {
        gap: 10px;
        padding: 2px 2px 14px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--divider);
    }

    .dz-sidebar.dz-sidebar-wide .dz-nav-text {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 4px;
        overflow-y: auto;
        padding-inline: 2px;
    }

    .dz-sidebar.dz-sidebar-wide .dz-nav-link {
        padding: 11px 12px;
        border-radius: 12px;
    }

    .dz-sidebar.dz-sidebar-wide.dz-shell-enter-sidebar {
        animation: none;
    }
}

@media (max-width: 420px) {
    .dz-topbar-user-text {
        display: none;
    }

    .dz-topbar-user {
        max-width: none;
        padding-inline: 3px;
        gap: 4px;
    }

    .dz-page-title {
        font-size: 14px;
    }
}

.dz-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 16px;
    width: 100%;
    flex-shrink: 0;
}

.dz-sidebar.dz-sidebar-wide .dz-logo-badge {
    margin: 0;
    background: #350066;
    box-shadow: none;
}

.dz-sidebar-brand .dz-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand);
}

.dz-sidebar-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.dz-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--page-bg);
    border-radius: 14px;
}

.dz-sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #8A2BE2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex: none;
}

.dz-sidebar-profile-text {
    min-width: 0;
    flex: 1;
}

.dz-sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dz-sidebar-profile-roles {
    margin-top: 4px;
}

.dz-sidebar-profile-roles .dz-role-chip {
    font-size: 10px;
    padding: 2px 8px;
}

.dz-sidebar.dz-sidebar-wide .dz-logout-btn {
    margin-top: 0;
    align-self: flex-start;
    width: 36px;
    height: 36px;
    background: var(--page-bg);
    color: var(--muted);
    box-shadow: none;
}

.dz-sidebar.dz-sidebar-wide .dz-logout-btn:hover {
    background: #ECEAF2;
    color: var(--brand);
}

.dz-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
}

.dz-nav-group {
    font-size: 11px;
    color: var(--muted);
    margin: 12px 8px 4px;
    letter-spacing: 0.02em;
}

.dz-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-fa);
}

.dz-nav-link .mud-icon-root {
    flex: none;
    font-size: 20px;
}

.dz-nav-link .dz-nav-ico-fill,
.dz-nav-link .dz-nav-ico-fill.mud-icon-root {
    display: none !important;
}

.dz-nav-link.dz-active .dz-nav-ico-out,
.dz-nav-link.dz-active .dz-nav-ico-out.mud-icon-root {
    display: none !important;
}

.dz-nav-link.dz-active .dz-nav-ico-fill,
.dz-nav-link.dz-active .dz-nav-ico-fill.mud-icon-root {
    display: inline-flex !important;
}

.dz-nav-link:hover {
    background: rgba(53, 0, 102, 0.05);
    color: var(--brand);
}

.dz-nav-link.dz-active {
    background: #350066;
    color: #fff;
    font-weight: 700;
}

.dz-nav-link.dz-active .mud-icon-root {
    color: #fff;
}

.dz-nav-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dz-nav-link.dz-nav-parent-active {
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
    font-weight: 700;
}

.dz-nav-link.dz-nav-parent-active .dz-nav-ico-out,
.dz-nav-link.dz-nav-parent-active .dz-nav-ico-out.mud-icon-root {
    display: none !important;
}

.dz-nav-link.dz-nav-parent-active .dz-nav-ico-fill,
.dz-nav-link.dz-nav-parent-active .dz-nav-ico-fill.mud-icon-root {
    display: inline-flex !important;
    color: var(--brand);
}

.dz-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 4px;
    padding: 0 0 0 12px;
    border-inline-start: 2px solid rgba(53, 0, 102, 0.12);
    margin-inline-start: 18px;
}

.dz-nav-sublink {
    appearance: none;
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: start;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-fa);
    transition: background 0.12s ease, color 0.12s ease;
}

.dz-nav-sublink:hover {
    background: rgba(53, 0, 102, 0.05);
    color: var(--brand);
}

.dz-nav-sublink.dz-active {
    background: #350066;
    color: #fff;
    font-weight: 700;
}

/* Branch picker inside light cards (not white-on-white like sidebar links) */
.dz-branch-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: start;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-fa);
}

.dz-branch-pick:hover {
    background: #F0E8FA;
}

.dz-branch-pick-active {
    /* Selected branch: brand tint + accent bar */
    background: rgba(53, 0, 102, 0.08);
    border-right: 2px solid #350066;
    border-radius: 0 8px 8px 0;
    color: var(--brand);
    font-weight: 700;
}

/* ── Branch / group UX (P0) ── */
.dz-busy-host {
    position: relative;
}

.dz-busy-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.62);
}

.dz-branch-layout {
    display: grid;
    gap: 16px;
}

.dz-branch-layout-split {
    grid-template-columns: 260px 1fr;
    align-items: start;
}

/* Align branch/province picker with main nav: same top & bottom (pull up past topbar) */
.dz-main-col:has(.dz-branch-layout-split) .dz-topbar {
    margin-inline-start: 276px; /* 260px sidebar + 16px layout gap */
}

.dz-branch-sidebar {
    display: flex;
    flex-direction: column;
    padding: 14px;
    position: sticky;
    top: 24px;
    margin-top: -56px; /* topbar (36px) + main-col gap (20px) */
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

/* Header controls must not grow; MudTextField defaults to flex-grow:1 */
.dz-branch-sidebar > *:not(.dz-branch-list) {
    flex: 0 0 auto;
}

.dz-branch-sidebar .mud-input-control {
    flex-grow: 0;
    flex-shrink: 0;
}

.dz-branch-add-btn {
    width: 100%;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
    min-height: 36px !important;
    font-weight: 700 !important;
}

.dz-branch-locations-link {
    display: block;
    width: 100%;
    text-align: center;
    margin: -6px 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
}

.dz-loc-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-loc-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 14px;
    padding: 8px 12px;
    border: 1px solid #E8D7F8;
    border-radius: 12px;
    background: #F8F4FC;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.dz-loc-back-btn:hover {
    background: #F3EAFB;
}

.dz-loc-cities {
    padding: 16px 18px;
    min-height: 320px;
}

.dz-loc-hero {
    margin-bottom: 16px;
}

.dz-loc-hero-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-inline-end: auto;
}

.dz-loc-count-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: #F3F0F6;
    border-radius: 999px;
    padding: 3px 9px;
}

.dz-loc-title-input {
    max-width: 260px;
    font-size: 16px;
    font-weight: 700;
}

.dz-loc-inline-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
}

.dz-loc-inline-actions {
    display: flex;
    gap: 6px;
}

.dz-loc-add-city-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #E8D7F8;
    border-radius: 14px;
    background: #FBF8FE;
}

.dz-loc-city-search {
    margin: 0 0 12px;
    max-width: 420px;
}

.dz-loc-city-ac,
.dz-loc-province-ac {
    width: 100%;
}

.dz-loc-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
}

.dz-loc-form-actions .mud-button-root {
    min-width: 88px;
}

.dz-loc-table {
    margin-top: 4px;
}

.dz-loc-table.mud-table .mud-table-root {
    table-layout: fixed;
    width: 100%;
}

.dz-loc-table.mud-table tbody .mud-table-cell:first-child,
.dz-loc-table.mud-table .mud-table-body .mud-table-cell:first-child {
    width: 38%;
    max-width: 240px;
    min-width: 0;
}

.dz-loc-table.mud-table tbody .mud-table-cell:nth-child(2),
.dz-loc-table.mud-table .mud-table-body .mud-table-cell:nth-child(2) {
    width: 72px;
}

.dz-loc-city-edit-input {
    display: block;
    width: 100%;
    max-width: 200px;
    min-width: 0;
    padding: 6px 10px;
    font-size: 13px;
    box-sizing: border-box;
}

.mud-table.dz-loc-table .mud-table-row.dz-loc-row-editing .mud-table-cell,
.mud-table.dz-loc-table .mud-table-body .mud-table-row.dz-loc-row-editing .mud-table-cell {
    background: #F3EAFB !important;
}

.mud-table.dz-loc-table .mud-table-row.dz-loc-row-editing .mud-table-cell:first-child,
.mud-table.dz-loc-table .mud-table-body .mud-table-row.dz-loc-row-editing .mud-table-cell:first-child {
    border-inline-start: 3px solid var(--brand);
}

.mud-table.dz-loc-table.mud-table-hover .mud-table-row.dz-loc-row-editing:hover .mud-table-cell,
.mud-table.dz-loc-table .mud-table-body .mud-table-row.dz-loc-row-editing:hover .mud-table-cell {
    background: #F3EAFB !important;
}

.dz-pill-draft {
    display: inline-block;
    margin-inline-start: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--brand);
    background: #F3EAFB;
    border-radius: 999px;
    padding: 1px 7px;
    vertical-align: middle;
}

.dz-branch-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.dz-branch-pick-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-branch-pick .dz-muted {
    flex: none;
    font-size: 11px;
}

.dz-branch-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #F8F4FC 0%, #fff 60%);
    border: 1px solid #E8D7F8;
}

.dz-branch-hero-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.dz-branch-hero-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 4px;
}

.dz-branch-hero-title-row .dz-branch-hero-title {
    margin-bottom: 0;
}

.dz-branch-edit-btn,
.dz-branch-delete-btn {
    border-radius: 999px !important;
    min-height: 32px !important;
    font-weight: 700 !important;
}

.dz-branch-hero-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.dz-pill-code {
    display: inline-block;
    background: var(--purple-soft, #F3EAFB);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.dz-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dz-group-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 16px;
    border-top: 4px solid var(--brand-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-group-card-1 { border-top-color: #7C3AED; }
.dz-group-card-2 { border-top-color: #DB2777; }
.dz-group-card-3 { border-top-color: #D97706; }
.dz-group-card-4 { border-top-color: #2563EB; }

.dz-group-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dz-group-card-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dz-group-card-1 .dz-group-card-badge { background: linear-gradient(135deg, #5B21B6, #7C3AED); }
.dz-group-card-2 .dz-group-card-badge { background: linear-gradient(135deg, #9D174D, #DB2777); }
.dz-group-card-3 .dz-group-card-badge { background: linear-gradient(135deg, #92400E, #D97706); }
.dz-group-card-4 .dz-group-card-badge { background: linear-gradient(135deg, #1E40AF, #2563EB); }

.dz-group-card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--brand);
}

.dz-group-slot {
    background: #FAFAFC;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #EEE8F5;
}

.dz-group-slot-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.dz-person-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.dz-person-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.dz-empty-slot {
    font-size: 13px;
    color: var(--muted);
    padding: 6px 0 10px;
    font-style: italic;
}

.dz-user-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dz-user-picker-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    background: #F0E8FA;
    border-radius: 10px;
    padding: 6px 10px;
}

.dz-user-picker-chip-name {
    font-weight: 700;
    color: var(--brand);
}

.dz-ac-item {
    padding: 2px 0;
    text-align: right;
}

.dz-ac-item-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.dz-ac-item-sub {
    font-size: 11px;
    color: var(--muted);
}

.dz-ac-item-current {
    font-size: 11px;
    font-weight: 500;
    color: var(--mud-palette-primary);
}

.dz-ac-item-code {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: embed;
    opacity: 0.9;
}

.dz-page-guides {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-page-guides > .dz-card {
    margin-bottom: 0;
}

.dz-guides-context {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: linear-gradient(135deg, #F8F4FC 0%, #fff 60%);
    border: 1px solid #E8D7F8;
}

.dz-guides-context-main {
    min-width: 0;
    flex: 1 1 260px;
}

.dz-guides-context-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dz-guides-back-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-fa);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 8px;
}

.dz-guides-back-link:hover:not(:disabled) {
    color: var(--brand);
    background: rgba(53, 0, 102, 0.06);
}

.dz-guides-back-link:disabled {
    opacity: 0.5;
    cursor: default;
}

.dz-guides-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
}

.dz-guides-info-btn.mud-icon-button {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    color: var(--muted) !important;
}

.dz-guides-context-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dz-guides-context-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.3;
}

.dz-guides-branch-picker {
    margin-top: 10px;
}

.dz-guides-branch-select {
    min-width: 260px;
    max-width: 380px;
    width: 100%;
}

.dz-guides-coverage {
    flex: 0 1 220px;
    min-width: 160px;
    align-self: center;
}

.dz-guides-coverage-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.dz-guides-coverage-meta strong {
    color: var(--text);
    font-weight: 700;
}

.dz-guides-coverage-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(53, 0, 102, 0.08);
    overflow: hidden;
}

.dz-guides-coverage-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 280ms ease;
}

.dz-guides-coverage-fill.is-partial {
    background: linear-gradient(90deg, #D97706, #F59E0B);
}

.dz-guides-coverage-fill.is-complete {
    background: linear-gradient(90deg, var(--green, #15803D), #22C55E);
}

.dz-guides-kpi-wrap {
    margin: 0;
}

.dz-guides-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dz-page-guides .dz-kpi-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.dz-page-guides .dz-kpi-card {
    width: 100%;
    text-align: start;
    font-family: var(--font-fa);
    background: var(--surface);
    border: 1px solid rgba(53, 0, 102, 0.06);
    border-inline-start-width: 2px;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: none;
}

.dz-page-guides .dz-kpi-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #F0E8FA;
    color: var(--brand);
}

.dz-page-guides .dz-kpi-card-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
}

.dz-page-guides .dz-kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
    margin-top: -5px;
    letter-spacing: -0.01em;
    margin-right: 10px
}

.dz-page-guides .dz-kpi-tone-total {
    border-inline-start-color: var(--brand);
}

.dz-page-guides .dz-kpi-tone-assigned {
    border-inline-start-color: var(--green, #15803D);
}

.dz-page-guides .dz-kpi-tone-assigned .dz-kpi-icon {
    background: var(--green-bg, #DCFCE7);
    color: var(--green, #15803D);
}

.dz-page-guides .dz-kpi-tone-assigned .dz-kpi-value {
    color: var(--green, #15803D);
}

.dz-page-guides .dz-kpi-tone-missing {
    border-inline-start-color: var(--muted);
}

.dz-page-guides .dz-kpi-tone-missing .dz-kpi-icon {
    background: #F5F2EF;
    color: var(--muted);
}

.dz-page-guides .dz-kpi-tone-missing .dz-kpi-value {
    color: var(--muted);
}

.dz-page-guides .dz-kpi-tone-missing.has-warn {
    border-inline-start-color: #C4392E;
}

.dz-page-guides .dz-kpi-tone-missing.has-warn .dz-kpi-icon {
    background: #FEE2E2;
    color: #C4392E;
}

.dz-page-guides .dz-kpi-tone-missing.has-warn .dz-kpi-value {
    color: #C4392E;
}

.dz-page-guides .dz-kpi-clickable {
    cursor: pointer;
    transition: background .15s ease;
}

.dz-page-guides .dz-kpi-clickable:hover:not(:disabled) {
    background: #F0E8FA;
}

.dz-page-guides .dz-kpi-clickable:disabled {
    opacity: 0.65;
    cursor: default;
}

.dz-page-guides .dz-kpi-active {
    background: rgba(53, 0, 102, 0.08);
    border-inline-start-color: var(--brand);
}

.dz-page-guides .dz-kpi-tone-assigned.dz-kpi-active {
    background: rgba(21, 128, 61, 0.08);
    border-inline-start-color: var(--green, #15803D);
}

.dz-page-guides .dz-kpi-tone-missing.dz-kpi-active {
    background: rgba(196, 57, 46, 0.08);
    border-inline-start-color: #C4392E;
}

.dz-guides-toolbar-card {
    margin: 0;
}

.dz-guides-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.dz-guides-search {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 360px;
}

.dz-guides-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dz-guides-chip {
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-fa);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.dz-guides-chip:hover:not(:disabled) {
    background: #F0E8FA;
}

.dz-guides-chip:disabled {
    opacity: 0.55;
    cursor: default;
}

.dz-guides-chip.is-active {
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
    font-weight: 700;
}

.dz-guides-filter-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

.dz-guides-filter-meta strong {
    color: var(--text);
    font-weight: 700;
}

.dz-guides-body {
    padding: 4px 8px 8px;
}

.dz-guides-accordion {
    margin: 0;
}

.dz-guides-band-missing {
    color: #C4392E;
    font-weight: 600;
}

@media (max-width: 720px) {
    .dz-guides-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dz-guides-coverage {
        flex: 1 1 100%;
        width: 100%;
    }

    .dz-guides-branch-select {
        max-width: none;
        width: 100%;
    }

    .dz-guides-search {
        max-width: none;
    }
}

.dz-band-other {
    background: #F3F4F6;
    color: #4B5563;
}

.dz-legion-band-other .mud-expand-panel-header {
    background: rgba(107, 114, 128, 0.06);
}

.dz-legion-band-other {
    border-inline-start: 3px solid #9CA3AF;
}

.dz-guides-list {
    display: flex;
    flex-direction: column;
}

.dz-guide-tiles {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding: 4px 2px 8px;
    overflow: visible;
}

.dz-guide-tile-slot {
    position: relative;
    min-width: 0;
    height: 168px;
}

/* Slot always keeps one grid cell — expand/collapse is an overlay, so neighbors never reflow. */
.dz-guide-tile-slot.is-wide {
    z-index: 6;
}

.dz-guide-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    width: 100%;
    height: 168px;
    min-height: 168px;
    max-height: 168px;
    padding: 14px 12px 10px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: #fff;
    position: relative;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition:
        border-color 280ms ease,
        box-shadow 280ms ease,
        background-color 280ms ease;
}

.dz-guide-tile-slot.is-wide .dz-guide-tile {
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: auto;
    top: 0;
    width: calc(200% + 10px);
    /* Solid fill so the covered neighbor never shows through (e.g. after clearing picker). */
    background-color: #FBF9FE;
    z-index: 6;
}

/* Last item in each row: expand toward previous column so we stay inside the grid */
@media (min-width: 1400px) {
    .dz-guide-tile-slot.is-wide:nth-child(6n) .dz-guide-tile {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

@media (max-width: 1399px) and (min-width: 1100px) {
    .dz-guide-tile-slot.is-wide:nth-child(5n) .dz-guide-tile {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

@media (max-width: 1099px) and (min-width: 900px) {
    .dz-guide-tile-slot.is-wide:nth-child(4n) .dz-guide-tile {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

@media (max-width: 899px) and (min-width: 780px) {
    .dz-guide-tile-slot.is-wide:nth-child(3n) .dz-guide-tile {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

@media (max-width: 779px) and (min-width: 480px) {
    .dz-guide-tile-slot.is-wide:nth-child(2n) .dz-guide-tile {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }
}

.dz-guide-tile-slot.is-expand .dz-guide-tile {
    animation: dz-guide-tile-expand-x 280ms ease forwards;
}

.dz-guide-tile-slot.is-collapse .dz-guide-tile {
    animation: dz-guide-tile-collapse-x 280ms ease forwards;
}

@keyframes dz-guide-tile-expand-x {
    from { width: 100%; }
    to { width: calc(200% + 10px); }
}

@keyframes dz-guide-tile-collapse-x {
    from { width: calc(200% + 10px); }
    to { width: 100%; }
}

.dz-guide-tile-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 1;
    transition: opacity 150ms ease;
}

.dz-guide-tile.is-fade-out .dz-guide-tile-body {
    opacity: 0;
}

.dz-guide-tile.is-expand .dz-guide-tile-body,
.dz-guide-tile.is-collapse .dz-guide-tile-body {
    animation: dz-guide-tile-fade-in 280ms ease forwards;
}

@keyframes dz-guide-tile-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dz-guide-tile.is-editing {
    z-index: 3;
    border-color: rgba(53, 0, 102, 0.28);
    box-shadow: 0 4px 18px rgba(53, 0, 102, 0.10);
    background: #FBF9FE;
}

.dz-guide-tile.is-empty:not(.is-editing) {
    background: #FDF6F5;
    border-color: rgba(196, 57, 46, 0.16);
}

.dz-guide-tile.is-dirty:not(.is-editing) {
    border-color: rgba(124, 58, 237, 0.35);
    background: #F5F0FC;
}

.dz-guide-tile.is-reserved {
    opacity: 0.55;
    background: #F5F5F7;
    pointer-events: none;
}

.dz-guide-tile:hover:not(.is-reserved):not(.is-editing) {
    border-color: rgba(53, 0, 102, 0.22);
    box-shadow: 0 2px 12px rgba(53, 0, 102, 0.08);
}

.dz-guide-tiles:has(.is-wide) .dz-guide-tile-slot:not(.is-wide) .dz-guide-tile:not(.is-reserved) {
    opacity: 0.42;
    filter: grayscale(0.15);
    transition: opacity 280ms ease, filter 280ms ease, border-color 280ms ease, box-shadow 280ms ease, background-color 280ms ease;
}

.dz-guide-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    flex-shrink: 0;
    background: transparent;
    color: #6B7280;
}

.dz-guide-tile-icon .mud-icon-root {
    font-size: 26px;
}

.dz-guide-tile-title {
    display: block;
    box-sizing: border-box;
    flex: none;
    flex-shrink: 0;
    max-width: 100%;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
    overflow-x: hidden;
    overflow-y: visible;
    text-overflow: ellipsis;
    background: #F3EEF9;
    color: var(--brand);
}

.dz-band-tone-1 .dz-guide-tile-title { background: #EDE9FE; color: #5B21B6; }
.dz-band-tone-2 .dz-guide-tile-title { background: #FCE7F3; color: #9D174D; }
.dz-band-tone-3 .dz-guide-tile-title { background: #FEF3C7; color: #92400E; }
.dz-band-tone-4 .dz-guide-tile-title { background: #DBEAFE; color: #1E40AF; }
.dz-band-tone-other .dz-guide-tile-title { background: #F3F4F6; color: #4B5563; }

.dz-guide-tile-guide {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    padding-block: 8px 4px;
    max-width: 100%;
    flex: none;
    flex-shrink: 0;
    white-space: nowrap;
    overflow-x: hidden;
    overflow-y: visible;
    text-overflow: ellipsis;
}

.dz-guide-tile-guide.is-missing {
    color: #C4392E;
    font-weight: 700;
}

.dz-guide-tile-guide.is-muted {
    color: #6B7280;
}

.dz-guide-tile-phone {
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-bottom: 4px;
}

.dz-guide-tile-note {
    font-size: 11px;
    color: #6B7280;
    font-style: italic;
    line-height: 1.35;
    margin-top: auto;
}

.dz-guide-tile-picker {
    width: 100%;
    margin-top: 2px;
    min-width: 0;
    text-align: start;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}

.dz-guide-tile-picker .dz-user-picker {
    min-width: 0 !important;
    max-width: none;
    width: 100%;
}

.dz-guide-tile-picker .dz-user-picker .mud-input,
.dz-guide-tile-picker .dz-user-picker .mud-input-slot,
.dz-guide-tile-picker .dz-user-picker .mud-input-outlined {
    min-height: 40px !important;
    height: 40px !important;
}

.dz-guide-tile-picker .dz-user-picker .mud-input input {
    font-size: 13px !important;
    line-height: 1.7 !important;
    height: 100% !important;
    padding-block: 6px !important;
}

.dz-guide-tile-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    width: 100%;
    flex: none;
}

.dz-guide-tile-edit-actions {
    gap: 8px;
}

.dz-guide-edit-btn.mud-icon-button,
.dz-guide-clear-btn.mud-icon-button {
    width: 30px;
    height: 30px;
}

.dz-guide-save-btn {
    min-width: 3.5rem;
    height: 30px !important;
    padding-inline: 8px !important;
    font-size: 12px !important;
}

@media (prefers-reduced-motion: reduce) {
    .dz-guide-tile,
    .dz-guide-tile-body,
    .dz-guide-tiles:has(.is-wide) .dz-guide-tile-slot:not(.is-wide) .dz-guide-tile:not(.is-reserved) {
        transition: none !important;
        animation: none !important;
    }

    .dz-guide-tile-slot.is-expand .dz-guide-tile,
    .dz-guide-tile-slot.is-collapse .dz-guide-tile,
    .dz-guide-tile.is-expand .dz-guide-tile-body,
    .dz-guide-tile.is-collapse .dz-guide-tile-body {
        animation: none !important;
        width: 100%;
        opacity: 1;
    }

    .dz-guide-tile-slot.is-wide .dz-guide-tile {
        width: calc(200% + 10px);
    }
}

/* Legacy row styles kept for Branches page if referenced elsewhere — guides now use tiles */
.dz-guides-list:hover .dz-guide-row:not(:hover):not(.is-reserved) {
    opacity: 0.36;
}

.dz-guide-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--divider);
    min-width: 0;
    min-height: 38px;
    position: relative;
    transition: opacity 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.dz-guide-row:last-child {
    border-bottom: none;
}

.dz-guide-row.is-empty {
    background: rgba(196, 57, 46, 0.03);
}

.dz-guide-row.is-dirty {
    background: rgba(124, 58, 237, 0.04);
}

.dz-guide-row.is-reserved {
    opacity: 0.55;
    background: #F5F5F7;
    pointer-events: none;
}

.dz-guide-row:hover:not(.is-reserved) {
    opacity: 1;
    background: #EEEEEEB2;
    box-shadow: 0 1px 10px rgba(53, 0, 102, 0.10);
    z-index: 1;
}

.dz-guide-row:hover:not(.is-reserved)::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #350066;
    border-radius: 0 2px 2px 0;
}

.dz-guide-legion-num {
    flex: none;
    min-width: 2.1rem;
    height: 1.7rem;
    padding: 0 4px;
    border-radius: 6px;
    background: #F3EEF9;
    color: var(--brand);
    font-weight: 800;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
}

.dz-guide-legion-name {
    flex: 0 1 9.5rem;
    max-width: 9.5rem;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dz-guide-reserved-tag {
    flex: none;
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    background: #E5E7EB;
    border-radius: 999px;
    padding: 1px 6px;
}

.dz-guide-reserved-note {
    font-size: 12px;
    color: #6B7280;
    font-style: italic;
    white-space: nowrap;
}

.dz-legion-reserved-cell {
    opacity: 0.55;
}

.dz-guide-row-picker {
    flex: 0 1 33%;
    width: 33%;
    max-width: 280px;
    min-width: 150px;
}

.dz-guide-row-picker .dz-user-picker {
    min-width: 0 !important;
    max-width: none;
    width: 100%;
}

.dz-guide-row-picker .dz-user-picker .mud-input,
.dz-guide-row-picker .dz-user-picker .mud-input-slot,
.dz-guide-row-picker .dz-user-picker .mud-input-outlined {
    min-height: 30px !important;
    height: 30px !important;
}

.dz-guide-row-picker .dz-user-picker .mud-input input {
    font-size: 12.5px !important;
}

.dz-guide-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    flex: none;
    margin-inline-end: auto;
}

.dz-guide-clear-btn.mud-icon-button {
    width: 30px;
    height: 30px;
}

@media (max-width: 1399px) {
    .dz-guide-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1099px) {
    .dz-guide-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
    .dz-guide-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 779px) {
    .dz-guide-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .dz-guide-row {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .dz-guide-legion-name {
        flex: 1 1 auto;
        max-width: none;
    }

    .dz-guide-row-picker {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        order: 3;
    }

    .dz-guide-row-actions {
        margin-inline-end: 0;
        margin-inline-start: auto;
        order: 4;
    }
}

@media (max-width: 479px) {
    .dz-guide-tiles { grid-template-columns: 1fr; }

    .dz-guide-tile-slot.is-wide .dz-guide-tile {
        width: 100%;
        position: absolute;
        inset-inline: 0;
    }

    .dz-guide-tile-slot.is-expand .dz-guide-tile,
    .dz-guide-tile-slot.is-collapse .dz-guide-tile {
        animation: none;
        width: 100%;
    }
}

/* Instant expand/collapse — avoids MudCollapse height mismatch (content flashes then resizes) */
.dz-guides-accordion .mud-collapse-container {
    transition: none !important;
}

/* Guides tiles expand as overlay — allow horizontal overflow so neighboring cells can be covered */
.dz-guides-accordion.dz-legion-accordion .mud-expand-panel,
.dz-guides-accordion.dz-legion-accordion .mud-expand-panel.mud-panel-expanded {
    overflow: visible !important;
}

.dz-guides-accordion .mud-expand-panel-content,
.dz-guides-accordion .mud-collapse-wrapper,
.dz-guides-accordion .mud-collapse-wrapper-inner {
    overflow: visible !important;
}

.dz-band-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.dz-band-1 { background: #EDE9FE; color: #5B21B6; }
.dz-band-2 { background: #FCE7F3; color: #9D174D; }
.dz-band-3 { background: #FEF3C7; color: #92400E; }
.dz-band-4 { background: #DBEAFE; color: #1E40AF; }

.dz-legion-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dz-legion-accordion .mud-expand-panel,
.dz-legion-accordion .mud-expand-panel.mud-panel-expanded {
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: none !important;
    background: var(--surface);
    /* spacing comes from the flex gap; MudBlazor's 16px expanded margin would double it */
    margin: 0 !important;
    transition: none !important;
}

.dz-legion-accordion .mud-expand-panel::before {
    display: none;
}

.dz-legion-accordion .mud-expand-panel-header {
    min-height: 46px;
    padding-inline: 12px !important;
    padding-block: 0 !important;
}

.dz-legion-accordion .mud-expand-panel-content,
.dz-legion-accordion .mud-collapse-wrapper,
.dz-legion-accordion .mud-collapse-wrapper-inner {
    padding: 0 !important;
    margin: 0 !important;
}

/* MudBlazor animates grid-template-rows — keep that, just slow it a touch */
.dz-legion-accordion .mud-collapse-container {
    transition: grid-template-rows 320ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dz-legion-accordion .mud-table-root {
    margin: 0 !important;
}

.dz-legion-accordion .mud-table.dz-table thead .mud-table-cell,
.dz-legion-accordion .mud-table.dz-table .mud-table-head .mud-table-cell {
    border-start-start-radius: 0 !important;
    border-start-end-radius: 0 !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

.dz-legion-band-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.dz-legion-band-count {
    font-size: 12px;
}

.dz-legion-band-1 .mud-expand-panel-header { background: rgba(124, 58, 237, 0.06); }
.dz-legion-band-2 .mud-expand-panel-header { background: rgba(219, 39, 119, 0.06); }
.dz-legion-band-3 .mud-expand-panel-header { background: rgba(217, 119, 6, 0.06); }
.dz-legion-band-4 .mud-expand-panel-header { background: rgba(37, 99, 235, 0.06); }

.dz-legion-band-1 { border-inline-start: 3px solid #7C3AED; }
.dz-legion-band-2 { border-inline-start: 3px solid #DB2777; }
.dz-legion-band-3 { border-inline-start: 3px solid #D97706; }
.dz-legion-band-4 { border-inline-start: 3px solid #2563EB; }

/* Legion tables tinted by band: header uses the band's title colour, text goes light */
.mud-table.dz-table.dz-table-band thead .mud-table-cell,
.mud-table.dz-table.dz-table-band .mud-table-head .mud-table-cell {
    color: #fff !important;
}

.mud-table.dz-table.dz-table-band-1 thead .mud-table-cell,
.mud-table.dz-table.dz-table-band-1 .mud-table-head .mud-table-cell {
    background: #5B21B6 !important;
}

.mud-table.dz-table-band-1 tbody .mud-table-cell {
    background: #fff;
}

.mud-table.dz-table-band-1 tbody .mud-table-row:nth-child(even) .mud-table-cell {
    background: #F5F3FF !important;
}

.mud-table.dz-table-band-1.mud-table-hover tbody .mud-table-row:hover .mud-table-cell,
.mud-table.dz-table-band-1 tbody .mud-table-row:hover .mud-table-cell {
    background: #EDE9FE !important;
}

.mud-table.dz-table-band-1 .dz-cell-code {
    color: #5B21B6;
}

.mud-table.dz-table.dz-table-band-2 thead .mud-table-cell,
.mud-table.dz-table.dz-table-band-2 .mud-table-head .mud-table-cell {
    background: #9D174D !important;
}

.mud-table.dz-table-band-2 tbody .mud-table-row:nth-child(even) .mud-table-cell {
    background: #FFF1F2 !important;
}

.mud-table.dz-table-band-2.mud-table-hover tbody .mud-table-row:hover .mud-table-cell,
.mud-table.dz-table-band-2 tbody .mud-table-row:hover .mud-table-cell {
    background: #FCE7F3 !important;
}

.mud-table.dz-table-band-2 .dz-cell-code {
    color: #9D174D;
}

.mud-table.dz-table.dz-table-band-3 thead .mud-table-cell,
.mud-table.dz-table.dz-table-band-3 .mud-table-head .mud-table-cell {
    background: #92400E !important;
}

.mud-table.dz-table-band-3 tbody .mud-table-row:nth-child(even) .mud-table-cell {
    background: #FFFBEB !important;
}

.mud-table.dz-table-band-3.mud-table-hover tbody .mud-table-row:hover .mud-table-cell,
.mud-table.dz-table-band-3 tbody .mud-table-row:hover .mud-table-cell {
    background: #FEF3C7 !important;
}

.mud-table.dz-table-band-3 .dz-cell-code {
    color: #92400E;
}

.mud-table.dz-table.dz-table-band-4 thead .mud-table-cell,
.mud-table.dz-table.dz-table-band-4 .mud-table-head .mud-table-cell {
    background: #1E40AF !important;
}

.mud-table.dz-table-band-4 tbody .mud-table-row:nth-child(even) .mud-table-cell {
    background: #EFF6FF !important;
}

.mud-table.dz-table-band-4.mud-table-hover tbody .mud-table-row:hover .mud-table-cell,
.mud-table.dz-table-band-4 tbody .mud-table-row:hover .mud-table-cell {
    background: #DBEAFE !important;
}

.mud-table.dz-table-band-4 .dz-cell-code {
    color: #1E40AF;
}

/* ── P1 filters & tabs ── */
.dz-tabs-card {
    padding: 8px 16px 16px;
}

.dz-tab-panel {
    padding-top: 12px;
}

.dz-tab-hint {
    font-size: 12px;
    margin: 0 0 14px;
}

.dz-members-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dz-members-filter-row {
    align-items: center;
}

.dz-members-filter-field {
    min-width: min(100%, 220px);
    flex: 1 1 220px;
}

.dz-members-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    align-self: center;
    min-height: 56px; /* match outlined labeled inputs */
}

.dz-members-filter-actions .mud-button-root {
    margin: 0 !important;
    height: 40px;
}

@media (max-width: 720px) {
    .dz-members-filter-field {
        flex: 1 1 100%;
        min-width: 0;
    }

    .dz-members-filter-actions {
        width: 100%;
        min-height: 0;
        justify-content: stretch;
    }

    .dz-members-filter-actions .mud-button-root {
        flex: 1 1 0;
    }
}

.dz-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.dz-chip {
    border: 1px solid #E0D4EC;
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-fa);
    cursor: pointer;
}

.dz-chip:hover {
    background: #F8F4FC;
}

.dz-chip-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    border-color: transparent;
}

.dz-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.dz-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.dz-filter-tag {
    background: #F0E8FA;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.dz-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.dz-role-guide {
    background: var(--green-bg);
    color: var(--green);
}

.dz-role-pilgrim {
    background: #EEF2FF;
    color: #4338CA;
}

/* ── P2 empty / badges / confirm polish ── */
.dz-empty-state {
    text-align: center;
    padding: 36px 20px;
}

.dz-empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #F3EAFB, #EDE9FE);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-empty-state-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--brand);
    margin-bottom: 6px;
}

.dz-empty-state-desc {
    font-size: 13px;
    color: var(--muted);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.6;
}

.dz-empty-state-actions {
    margin-top: 16px;
}

.dz-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.dz-role-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.3;
}

.dz-role-chip-super {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
}

.dz-role-chip-pub {
    background: #EDE9FE;
    color: #5B21B6;
}

.dz-role-chip-agent {
    background: #F3EAFB;
    color: var(--brand-dark);
}

.dz-role-chip-guide {
    background: var(--green-bg);
    color: var(--green);
}

.dz-role-chip-branch-admin {
    background: #E0F2FE;
    color: #0369A1;
}

.dz-role-chip-more {
    background: #F3F0F7;
    color: var(--muted);
}

.dz-sidebar-roles {
    display: none;
    padding: 0 10px 10px;
    width: 100%;
}

.dz-sidebar-roles .dz-role-badges {
    justify-content: center;
}

/* User cluster in topbar (roles + name + avatar) */
.dz-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F2F3F7;
    border-radius: 20px;
    padding: 4px 6px 4px 14px;
}

.dz-topbar-roles {
    max-width: 42vw;
    justify-content: flex-end;
}

.dz-topbar-roles .dz-role-chip {
    font-size: 10px;
    padding: 3px 8px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-topbar-user-text {
    min-width: 0;
}

.dz-topbar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.dz-topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8A2BE2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
}

.dz-topbar-logout {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: none;
}

.dz-topbar-logout:hover {
    background: #ECEAF2;
    color: var(--brand);
}

.dz-branch-admin-card {
    margin-top: 12px;
}

.dz-tab-note-branch-admin {
    background: #E0F2FE;
    color: #0369A1;
}

.dz-role-avatar-branch-admin {
    background: #E0F2FE;
    color: #0369A1;
}

/* ---------------------------------------------------------------- dashboard home */

.dz-page-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dz-dash-hero {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 22px 24px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 55% 80% at 100% 0%, rgba(138, 43, 226, 0.12), transparent 55%),
        radial-gradient(ellipse 40% 70% at 0% 100%, rgba(53, 0, 102, 0.08), transparent 50%),
        linear-gradient(135deg, #FBF7FF 0%, #FFFCFA 48%, #F7F3F0 100%);
    border: 1px solid rgba(53, 0, 102, 0.1);
}

.dz-dash-hero-main {
    min-width: 0;
    flex: 1 1 auto;
}

.dz-dash-hero-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.dz-dash-hero-title {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dz-dash-hero-sub {
    margin: 0 0 14px;
    max-width: 42rem;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.dz-dash-hero-roles {
    margin-top: 2px;
}

.dz-dash-hero-aside {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.dz-dash-hero-mark {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(53, 0, 102, 0.12), rgba(138, 43, 226, 0.08));
    border: 1px solid rgba(53, 0, 102, 0.12);
    color: var(--brand);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dz-dash-hero-mark .mud-icon-root {
    font-size: 34px !important;
    width: 34px;
    height: 34px;
}

.dz-dash-section {
    margin: 0;
    padding: 18px 20px 20px;
}

.dz-dash-section.dz-busy-host {
    min-height: 180px;
}

.dz-dash-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dz-dash-section-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.01em;
}

.dz-dash-section-hint {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

.dz-dash-section-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(53, 0, 102, 0.14);
    background: rgba(53, 0, 102, 0.04);
    color: var(--brand-dark);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.dz-dash-section-link:hover:not(:disabled) {
    background: rgba(53, 0, 102, 0.08);
    border-color: rgba(53, 0, 102, 0.22);
}

.dz-dash-section-link:disabled {
    opacity: 0.55;
    cursor: default;
}

.dz-dash-section-link .mud-icon-root {
    font-size: 16px !important;
}

.dz-dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.dz-dash-kpi {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    text-align: start;
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(53, 0, 102, 0.08);
    border-inline-start-width: 3px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dz-dash-kpi:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(53, 0, 102, 0.18);
}

.dz-dash-kpi:disabled {
    opacity: 0.7;
    cursor: default;
}

.dz-dash-kpi-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dz-dash-kpi-ico {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
}

.dz-dash-kpi-ico .mud-icon-root {
    font-size: 16px !important;
}

.dz-dash-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.3;
}

.dz-dash-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-dark);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.dz-dash-kpi-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

.dz-dash-kpi-total { border-inline-start-color: var(--brand); }
.dz-dash-kpi-active { border-inline-start-color: #0F766E; }
.dz-dash-kpi-active .dz-dash-kpi-ico { background: rgba(15, 118, 110, 0.12); color: #0F766E; }
.dz-dash-kpi-active .dz-dash-kpi-value { color: #0F766E; }
.dz-dash-kpi-new { border-inline-start-color: #5D189F; }
.dz-dash-kpi-new .dz-dash-kpi-ico { background: rgba(93, 24, 159, 0.1); color: #5D189F; }
.dz-dash-kpi-never { border-inline-start-color: #B45309; }
.dz-dash-kpi-never .dz-dash-kpi-ico { background: rgba(180, 83, 9, 0.12); color: #B45309; }
.dz-dash-kpi-never .dz-dash-kpi-value { color: #B45309; }
.dz-dash-kpi-blocked { border-inline-start-color: #B91C1C; }
.dz-dash-kpi-blocked .dz-dash-kpi-ico { background: rgba(185, 28, 28, 0.1); color: #B91C1C; }
.dz-dash-kpi-blocked .dz-dash-kpi-value { color: #B91C1C; }

.dz-dash-subgrid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 12px;
}

.dz-dash-panel {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(53, 0, 102, 0.03);
    border: 1px solid rgba(53, 0, 102, 0.07);
}

.dz-dash-panel-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-dark);
}

.dz-dash-kind-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dz-dash-kind {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(53, 0, 102, 0.08);
    background: #FFFCFA;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.dz-dash-kind:hover:not(:disabled) {
    border-color: rgba(53, 0, 102, 0.2);
    box-shadow: 0 2px 10px rgba(53, 0, 102, 0.06);
    transform: translateY(-1px);
}

.dz-dash-kind:disabled {
    opacity: 0.7;
    cursor: default;
}

.dz-dash-kind-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
}

.dz-dash-kind-ico .mud-icon-root {
    font-size: 16px !important;
}

.dz-dash-kind-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dz-dash-kind-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.dz-dash-kind-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-dark);
    font-variant-numeric: tabular-nums;
}

.dz-dash-band-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dz-dash-band {
    appearance: none;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    text-align: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(53, 0, 102, 0.08);
    background: #FFFCFA;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.dz-dash-band:hover:not(:disabled) {
    border-color: rgba(53, 0, 102, 0.2);
    box-shadow: 0 2px 10px rgba(53, 0, 102, 0.06);
    transform: translateY(-1px);
}

.dz-dash-band:disabled {
    opacity: 0.7;
    cursor: default;
}

.dz-dash-band-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
}

.dz-dash-band-ico .mud-icon-root {
    font-size: 15px !important;
}

.dz-dash-band-label {
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-dash-band-value {
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--brand-dark);
}

.dz-dash-band-band-1 { border-inline-start: 3px solid #1D4ED8; }
.dz-dash-band-band-1 .dz-dash-band-ico { background: rgba(29, 78, 216, 0.12); color: #1D4ED8; }
.dz-dash-band-band-1 .dz-dash-band-value { color: #1D4ED8; }

.dz-dash-band-band-2 { border-inline-start: 3px solid #BE185D; }
.dz-dash-band-band-2 .dz-dash-band-ico { background: rgba(190, 24, 93, 0.12); color: #BE185D; }
.dz-dash-band-band-2 .dz-dash-band-value { color: #BE185D; }

.dz-dash-band-band-3 { border-inline-start: 3px solid #7C3AED; }
.dz-dash-band-band-3 .dz-dash-band-ico { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.dz-dash-band-band-3 .dz-dash-band-value { color: #7C3AED; }

.dz-dash-band-band-4 { border-inline-start: 3px solid #0F766E; }
.dz-dash-band-band-4 .dz-dash-band-ico { background: rgba(15, 118, 110, 0.12); color: #0F766E; }
.dz-dash-band-band-4 .dz-dash-band-value { color: #0F766E; }

.dz-dash-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.dz-dash-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(53, 0, 102, 0.08);
    background: linear-gradient(180deg, #FFFEFC 0%, #FAF7F4 100%);
    color: inherit;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dz-dash-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(53, 0, 102, 0.18);
    color: inherit;
    text-decoration: none;
}

.dz-dash-action.is-featured {
    background: linear-gradient(135deg, #F7F0FC 0%, #FFFCFA 70%);
    border-color: rgba(53, 0, 102, 0.16);
}

.dz-dash-action-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
}

.dz-dash-action-ico .mud-icon-root {
    font-size: 22px !important;
}

.dz-dash-action-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dz-dash-action-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--brand-dark);
}

.dz-dash-action-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.dz-dash-action-chevron {
    color: rgba(53, 0, 102, 0.35);
    flex-shrink: 0;
}

.dz-dash-action-finance .dz-dash-action-ico {
    background: rgba(53, 0, 102, 0.14);
    color: var(--brand);
}

.dz-dash-action-members .dz-dash-action-ico { background: rgba(15, 118, 110, 0.1); color: #0F766E; }

.dz-page-guide-pilgrims {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-guide-pilgrims-toolbar {
    align-items: center;
}

.dz-guide-pilgrims-product {
    min-width: min(100%, 280px);
    flex: 1 1 280px;
}

.dz-guide-pilgrims-search {
    min-width: min(100%, 200px);
    flex: 1 1 200px;
}

@media (max-width: 720px) {
    .dz-guide-pilgrims-product,
    .dz-guide-pilgrims-search {
        flex: 1 1 100%;
        min-width: 0;
    }
}

.dz-guide-section-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}

.dz-guide-section-hint {
    margin: 4px 0 0;
    font-size: 12px;
}

.dz-guide-analytics-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px;
    border-radius: calc(var(--radius-sm) + 4px);
    background: linear-gradient(180deg, rgba(53, 0, 102, 0.05), transparent 48px);
}

.dz-guide-analytics-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.dz-guide-analytics-head-main {
    min-width: 0;
    flex: 1 1 220px;
}

.dz-guide-week-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dz-guide-week-block,
.dz-guide-watch-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-guide-kpi-link {
    cursor: pointer;
    font: inherit;
    text-align: start;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dz-guide-kpi-link:hover:not(:disabled) {
    border-color: rgba(53, 0, 102, 0.18);
    box-shadow: 0 0 0 3px rgba(53, 0, 102, 0.06);
}

.dz-guide-kpi-link:disabled {
    opacity: 0.7;
    cursor: default;
}

.dz-dash-guide-section {
    border-inline-start: 3px solid var(--brand);
}

.dz-dash-finance-section {
    border-inline-start: 3px solid #0F766E;
}

.dz-dash-finance-branch {
    max-width: 280px;
    margin: 0 0 14px;
}

.dz-dash-finance-branch .mud-input-control {
    margin-top: 0;
}

.dz-dash-guide-kpis {
    margin-bottom: 12px;
}

.dz-dash-guide-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 12px;
}

.dz-dash-guide-compare {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dz-dash-guide-compare-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.dz-dash-guide-compare-delta {
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(53, 0, 102, 0.04);
}

.dz-dash-guide-compare-delta strong {
    display: block;
    font-size: 1.35rem;
}

.dz-dash-guide-compare.is-up .dz-dash-guide-compare-delta strong { color: #15803D; }
.dz-dash-guide-compare.is-down .dz-dash-guide-compare-delta strong { color: #C4392E; }

.dz-dash-guide-more {
    margin-top: 12px;
}

@media (max-width: 960px) {
    .dz-dash-guide-charts {
        grid-template-columns: 1fr;
    }
}

.dz-guide-export-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dz-guide-analytics-toolbar {
    align-items: center;
}

.dz-guide-analytics-weeks,
.dz-guide-analytics-role {
    min-width: min(100%, 160px);
    flex: 0 1 180px;
}

.dz-guide-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dz-guide-kpi {
    background: var(--surface);
    border: 1px solid rgba(53, 0, 102, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dz-guide-kpi-label {
    font-size: 12px;
    color: var(--muted);
}

.dz-guide-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.dz-guide-kpi-value.is-up { color: #15803D; }
.dz-guide-kpi-value.is-down { color: #C4392E; }

.dz-guide-kpi-sub {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-guide-analytics-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 12px;
}

.dz-guide-analytics-panel {
    min-width: 0;
}

.dz-guide-panel-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dz-guide-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
}

.dz-guide-compare-col {
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(53, 0, 102, 0.03);
}

.dz-guide-compare-head {
    font-weight: 700;
    margin-bottom: 2px;
}

.dz-guide-compare-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    font-size: 13px;
}

.dz-guide-compare-delta {
    text-align: center;
    min-width: 88px;
    font-size: 12px;
    color: var(--muted);
}

.dz-guide-compare-delta strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin: 4px 0;
}

.dz-guide-compare-delta.is-up strong { color: #15803D; }
.dz-guide-compare-delta.is-down strong { color: #C4392E; }

.dz-guide-matrix-legend {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    align-items: center;
}

.dz-matrix-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-inline-end: 4px;
    vertical-align: -1px;
}

.dz-matrix-swatch.is-bought { background: #15803D; }
.dz-matrix-swatch.is-miss { background: #F59E0B; }
.dz-matrix-swatch.is-absent { background: #E5E7EB; }

.dz-guide-matrix-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(70vh, 640px);
    width: 100%;
    border: 1px solid rgba(53, 0, 102, 0.08);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
}

.dz-guide-matrix {
    border-collapse: separate;
    border-spacing: 3px;
    width: max-content;
    min-width: 100%;
    font-size: 11px;
}

.dz-guide-matrix th,
.dz-guide-matrix td {
    padding: 0;
    text-align: center;
}

.dz-guide-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #FFFCFA;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 6px;
    vertical-align: bottom;
}

.dz-guide-matrix-col {
    min-width: 88px;
    max-width: 120px;
}

.dz-guide-matrix-col-date {
    display: block;
    font-weight: 700;
    color: #350066;
    white-space: nowrap;
    margin-bottom: 3px;
}

.dz-guide-matrix-col-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    color: #6b5a7d;
    white-space: normal;
    word-break: break-word;
}

.dz-guide-matrix-sticky {
    position: sticky;
    inset-inline-start: 0;
    z-index: 3;
    background: #FFFCFA;
    text-align: start !important;
    padding: 8px 12px !important;
    min-width: 150px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.dz-guide-matrix thead th.dz-guide-matrix-sticky {
    z-index: 4;
}

.dz-guide-matrix tbody th.dz-guide-matrix-sticky {
    z-index: 1;
}

/* Zebra rows: band shows in cell gaps + sticky name + soft cell tint */
.dz-guide-matrix tbody tr.is-odd {
    background: #EDE4F7;
}

.dz-guide-matrix tbody tr.is-even {
    background: #FFFCFA;
}

.dz-guide-matrix tbody tr.is-odd th.dz-guide-matrix-sticky {
    background: #E8DCF5;
    box-shadow: inset -3px 0 0 #5d189f;
}

.dz-guide-matrix tbody tr.is-even th.dz-guide-matrix-sticky {
    background: #FFFCFA;
    box-shadow: inset -3px 0 0 transparent;
}

.dz-guide-matrix tbody tr.is-odd td.is-bought { background: #0f6b32; }
.dz-guide-matrix tbody tr.is-even td.is-bought { background: #1a9145; }
.dz-guide-matrix tbody tr.is-odd td.is-miss { background: #E5A817; }
.dz-guide-matrix tbody tr.is-even td.is-miss { background: #F8C84A; }
.dz-guide-matrix tbody tr.is-odd td.is-absent { background: #D9D0E6; }
.dz-guide-matrix tbody tr.is-even td.is-absent { background: #EDEEF1; }

.dz-guide-matrix tbody tr:hover th.dz-guide-matrix-sticky {
    background: #DDD0EF;
}

.dz-guide-matrix tbody tr:hover {
    background: #E2D6F2;
}

.dz-guide-matrix td {
    width: 88px;
    min-width: 88px;
    height: 22px;
    border-radius: 4px;
}

.dz-guide-matrix td.is-bought { background: #15803D; }
.dz-guide-matrix td.is-miss { background: #FBBF24; }
.dz-guide-matrix td.is-absent { background: #E5E7EB; }

@media (max-width: 960px) {
    .dz-guide-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dz-guide-analytics-row,
    .dz-guide-compare-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dz-guide-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dz-guide-export-btn {
        width: 100%;
    }
}

.dz-dash-action-reports .dz-dash-action-ico { background: rgba(180, 83, 9, 0.1); color: #B45309; }
.dz-dash-action-branches .dz-dash-action-ico { background: rgba(29, 78, 216, 0.1); color: #1D4ED8; }
.dz-dash-action-guides .dz-dash-action-ico { background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.dz-dash-action-products .dz-dash-action-ico { background: rgba(190, 24, 93, 0.1); color: #BE185D; }
.dz-dash-action-logs .dz-dash-action-ico { background: rgba(71, 85, 105, 0.12); color: #475569; }

@media (max-width: 1100px) {
    .dz-dash-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dz-dash-subgrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dz-dash-hero {
        padding: 18px 16px;
    }

    .dz-dash-hero-aside {
        display: none;
    }

    .dz-dash-section {
        padding: 16px;
    }

    .dz-dash-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dz-dash-section-link {
        align-self: flex-start;
    }

    .dz-dash-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dz-dash-kind-grid,
    .dz-dash-band-grid {
        grid-template-columns: 1fr;
    }

    .dz-dash-action-grid {
        grid-template-columns: 1fr;
    }
}

/* legacy aliases kept for any leftover references */
.dz-dashboard-hero {
    margin-bottom: 16px;
    background: linear-gradient(135deg, #F8F4FC 0%, #fff 55%);
    border: 1px solid #E8D7F8;
}

.dz-dashboard-hello {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 22px;
}

.dz-dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dz-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.dz-kpi-card {
    background: linear-gradient(160deg, #FFFDFB 0%, #FAF6F2 100%);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, var(--shadow-soft);
    border: 1px solid rgba(53, 0, 102, 0.07);
    padding: 18px;
}

.dz-kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand);
    margin-top: 4px;
}

@media (max-width: 980px) {
    .dz-branch-layout,
    .dz-branch-layout-split {
        grid-template-columns: 1fr;
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    .dz-main-col:has(.dz-branch-layout-split) .dz-topbar {
        margin-inline-start: 0;
    }

    .dz-branch-layout > *,
    .dz-branch-layout .dz-card,
    .dz-branch-layout .mud-tabs,
    .dz-branch-layout .mud-tabs-panels,
    .dz-branch-layout .mud-tab-panel {
        min-width: 0;
        max-width: 100%;
    }

    .dz-branch-sidebar {
        position: static;
        margin-top: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    /* Scroll the list, not the whole sidebar card */
    .dz-branch-list {
        flex: none;
        max-height: 220px;
    }

    .dz-group-grid {
        grid-template-columns: 1fr;
    }

    .dz-branch-hero {
        flex-direction: column;
    }

    .dz-branch-hero-meta {
        align-items: flex-start;
    }

    .dz-branch-hero > div {
        min-width: 0;
        max-width: 100%;
    }

    .dz-assign-row {
        flex-wrap: wrap;
    }

    .dz-assign-row .dz-user-picker {
        flex: 1 1 100%;
        min-width: 0;
    }

    .dz-branch-layout .mud-tabs-toolbar,
    .dz-branch-layout .mud-tabs-toolbar-wrapper,
    .dz-branch-layout .mud-tabs-toolbar-inner {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .dz-branch-layout .mud-table-container,
    .dz-branch-layout .dz-table-scroll {
        max-width: 100%;
        overflow-x: auto;
    }
}


/* Publication officer list — one card, row dividers only */
.dz-officer-list {
    display: flex;
    flex-direction: column;
}

.dz-officer-row {
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
}

.dz-officer-row:last-child {
    border-bottom: none;
}

.dz-officer-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dz-officer-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dz-officer-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EEEAF4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

/* Outer side of start-side avatar = inline-start (right in RTL) */
.dz-status-dot {
    position: absolute;
    bottom: 1px;
    inset-inline-start: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid #fff;
}

.dz-officer-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dz-officer-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.dz-officer-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.dz-officer-phone {
    font-size: 11px;
    color: var(--muted);
}

.dz-officer-missing {
    margin-top: 2px;
    font-size: 12px;
    color: #C4392E;
}

.dz-officer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    flex-wrap: wrap;
}

.dz-pill-edit,
.dz-pill-remove,
.dz-branch-edit-btn {
    border-radius: 999px !important;
    min-height: 32px !important;
    padding-inline: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
}

.mud-button-root.dz-pill-edit,
.mud-button-root.dz-pill-edit:hover,
.mud-button-root.dz-pill-edit:focus-visible,
.mud-button-root.dz-pill-edit:active,
.mud-button-root.dz-branch-edit-btn,
.mud-button-root.dz-branch-edit-btn:hover,
.mud-button-root.dz-branch-edit-btn:focus-visible,
.mud-button-root.dz-branch-edit-btn:active {
    border: 0 !important;
    box-shadow: none !important;
    background: #F3EAFB !important;
    color: var(--brand) !important;
}

.mud-button-root.dz-pill-remove,
.mud-button-root.dz-pill-remove:hover,
.mud-button-root.dz-pill-remove:focus-visible,
.mud-button-root.dz-pill-remove:active {
    border: 0 !important;
    box-shadow: none !important;
    background: var(--red-bg) !important;
    color: var(--red) !important;
}

.dz-pill-assign {
    border-radius: 20px !important;
    background: #350066 !important;
    color: #fff !important;
    min-height: 32px !important;
    padding-inline: 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.dz-officer-picker {
    margin-top: 12px;
    padding-inline-start: 50px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dz-officer-picker-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compact assign row: picker + buttons side by side */
.dz-assign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-top: 10px;
    max-width: 100%;
    width: 100%;
}

.dz-assign-row .dz-user-picker {
    display: flex;
    flex-direction: column;
}

.dz-assign-row .mud-input-control {
    margin-top: 0 !important;
}

.dz-assign-row .mud-input,
.dz-assign-row .mud-input-slot,
.dz-assign-row .mud-input-outlined {
    min-height: 32px !important;
    height: 32px !important;
}

.dz-assign-row .mud-input input {
    height: 32px !important;
    padding-block: 0 !important;
    font-size: 13px;
}

.dz-assign-row .mud-button-root {
    height: 32px;
    min-height: 32px;
}

.dz-assign-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

.dz-user-picker {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
}

.dz-user-picker .mud-input-control {
    margin-top: 0;
}

.dz-user-picker .mud-input,
.dz-user-picker .mud-input-slot {
    min-height: 36px !important;
    font-size: 13px;
}

.dz-ac-item-inline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.dz-person-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.dz-title-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: #F3EAFB;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
}

.dz-tab-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #FFF6EC;
    border: 1px solid #F3D7B5;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 400;
    color: #D46A1E;
    margin: 0 0 14px;
}

.dz-tab-note .mud-icon-root {
    flex: none;
    font-size: 16px;
    color: #E08A3C;
}

.dz-tab-role {
    display: inline-flex;
    align-items: center;
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.72);
}

.dz-tab-note-officer {
    background: #F3EAFB;
    border-color: #E2D0F2;
    color: #5D189F;
}

.dz-tab-note-officer .mud-icon-root,
.dz-tab-note-officer .dz-tab-role {
    color: var(--brand);
}

.dz-tab-note-officer .dz-tab-role {
    background: rgba(53, 0, 102, 0.08);
}

.dz-tab-note-agent {
    background: #E8F7F4;
    border-color: #C5E8E0;
    color: #0F766E;
}

.dz-tab-note-agent .mud-icon-root,
.dz-tab-note-agent .dz-tab-role {
    color: #0F766E;
}

.dz-tab-note-agent .dz-tab-role {
    background: rgba(15, 118, 110, 0.10);
}

.dz-tab-note-legion {
    background: #FFF6EC;
    border-color: #F3D7B5;
    color: #D46A1E;
}

.dz-tab-note-legion .dz-tab-role {
    color: #C2410C;
    background: rgba(194, 65, 12, 0.08);
}

.dz-role-avatar-officer {
    background: #F3EAFB;
}

.dz-role-avatar-officer .mud-icon-root {
    color: var(--brand) !important;
}

.dz-role-avatar-agent {
    background: #E8F7F4;
}

.dz-role-avatar-agent .mud-icon-root {
    color: #0F766E !important;
}

/* Active tab tint follows current role */
.mud-tabs.dz-branch-tabs-officer .mud-tab.mud-tab-active,
.mud-tabs.dz-branch-tabs-officer .mud-tab[aria-selected="true"] {
    background: rgba(53, 0, 102, 0.12);
    color: #350066 !important;
}

.mud-tabs.dz-branch-tabs-agent .mud-tab.mud-tab-active,
.mud-tabs.dz-branch-tabs-agent .mud-tab[aria-selected="true"] {
    background: rgba(15, 118, 110, 0.12);
    color: #0F766E !important;
}

.mud-tabs.dz-branch-tabs-legion .mud-tab.mud-tab-active,
.mud-tabs.dz-branch-tabs-legion .mud-tab[aria-selected="true"] {
    background: rgba(212, 106, 30, 0.12);
    color: #C2410C !important;
}

.dz-tab-note-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dz-tab-note-row .dz-tab-note {
    margin: 0;
    flex: 1 1 220px;
}

/* Selected tab looks like a badge; inactive stays plain */
.mud-tabs .mud-tab {
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: none;
    font-weight: 500;
    color: var(--muted);
}

.mud-tabs .mud-tab.mud-tab-active,
.mud-tabs .mud-tab[aria-selected="true"] {
    background: rgba(53, 0, 102, 0.10);
    color: #350066 !important;
    font-weight: 600;
}

.mud-tabs .mud-tab-slider {
    display: none;
}

.dz-officer-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.dz-officer-name {
    margin-top: 0;
}

.dz-group-card-head {
    flex-wrap: wrap;
}

/* Aliases matching markup class names */
.dz-assign-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}

.dz-title-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: #F3EAFB;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
}

.dz-person-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.dz-user-picker {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
}

.dz-user-picker .mud-input-control {
    margin-top: 0;
}

.dz-user-picker .mud-input,
.dz-user-picker .mud-input-slot {
    min-height: 36px !important;
    font-size: 13px;
}

.dz-ac-item-inline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.dz-tab-note-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dz-tab-note-row .dz-tab-note {
    margin: 0;
    flex: 1 1 220px;
}

.dz-officer-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Name aligns with badge TEXT, not the badge box */
.dz-officer-copy .dz-person-line,
.dz-officer-copy .dz-officer-missing {
    padding-inline-start: 10px;
}

.dz-group-slot .dz-person-line,
.dz-group-slot .dz-empty-slot {
    padding-inline-start: 10px;
}

.dz-assign-row .dz-user-picker .mud-input,
.dz-assign-row .dz-user-picker .mud-input-slot,
.dz-assign-row .dz-user-picker .mud-input,
.dz-assign-row .dz-user-picker .mud-input-slot {
    min-height: 32px !important;
    height: 32px !important;
}

.dz-officer-copy .dz-assign-row,
.dz-group-slot .dz-assign-row {
    padding-inline-start: 0;
    margin-top: 8px;
    max-width: 100%;
    width: 100%;
    align-self: stretch;
}

.dz-user-picker {
    position: relative;
    flex: 1 1 auto;
    min-width: 16rem;
    max-width: none;
    width: 100%;
}

.dz-user-picker .mud-select,
.dz-user-picker .mud-input-control,
.dz-user-picker .mud-select-input {
    width: 100% !important;
    max-width: none !important;
}

.dz-picker-end {
    position: absolute;
    inset-inline-end: 10px;
    inset-block: 0;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.dz-picker-end-spinner {
    width: 18px !important;
    height: 18px !important;
}

.dz-picker-end-clear {
    width: 28px !important;
    height: 28px !important;
}

.dz-user-picker .mud-select-input input,
.dz-user-picker .mud-input input {
    text-align: start !important;
    padding-inline-start: 10px !important;
    padding-right: 10px !important;
    padding-inline-end: 2.5rem !important;
    padding-left: 2.5rem !important;
}

.dz-picker-end-search {
    color: var(--muted);
}

.dz-user-picker .mud-input-adornment-end,
.dz-user-picker .mud-select-input .mud-input-adornment-end,
.dz-user-picker .mud-select .mud-input-adornment-end,
.dz-user-picker .mud-select-input .mud-icon-button {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Save/success/error snackbars: top-center, RTL-safe (avoid left:50% + transform offset) */
#mud-snackbar-container.mud-snackbar-location-top-center {
    top: 16px;
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Confirm dialog (delete publication officer, etc.) */
.dz-confirm-overlay {
    backdrop-filter: blur(8px);
    background: rgba(32, 0, 64, 0.28) !important;
}

.mud-dialog.dz-confirm-dialog {
    border-radius: 22px !important;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(53, 0, 102, 0.18);
}

.dz-confirm-content {
    padding: 28px 22px 8px !important;
}

.dz-confirm-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.dz-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: var(--red-bg);
    color: var(--red);
}

.dz-confirm-icon .mud-icon-root {
    font-size: 28px !important;
}

.dz-confirm-icon-warn {
    background: #FFF4E5;
    color: #C77800;
}

.dz-confirm-btn-warn {
    background: #C77800 !important;
    color: #fff !important;
}

.dz-confirm-btn-warn:hover {
    background: #A66300 !important;
}

.dz-confirm-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 10px;
}

.dz-confirm-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--text);
    max-width: 34ch;
}

.dz-confirm-em {
    color: var(--brand);
    font-weight: 800;
}

.dz-confirm-scope {
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #F3EAFB;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

.dz-confirm-scope span {
    font-weight: 800;
}

.dz-confirm-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    padding: 8px 22px 22px !important;
    justify-content: stretch !important;
}

.mud-dialog-actions.dz-confirm-actions .mud-button-root,
.dz-confirm-actions .mud-button-root {
    margin: 0 !important;
    width: 100%;
}

.dz-confirm-btn {
    min-height: 44px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.dz-confirm-btn-cancel {
    background: #F3EAFB !important;
    color: var(--brand) !important;
}

.dz-confirm-btn-cancel:hover {
    background: #E9D7F8 !important;
}

.mud-dialog-actions.dz-form-dialog-actions .dz-confirm-btn-cancel.mud-button-root,
.mud-dialog-actions.dz-confirm-actions .dz-confirm-btn-cancel.mud-button-root,
.dz-form-dialog-actions .dz-confirm-btn-cancel.mud-button-root {
    background: #F3EAFB !important;
    background-image: none !important;
    color: var(--brand) !important;
}

.mud-dialog-actions.dz-form-dialog-actions .dz-confirm-btn-cancel.mud-button-root:hover,
.mud-dialog-actions.dz-confirm-actions .dz-confirm-btn-cancel.mud-button-root:hover,
.dz-form-dialog-actions .dz-confirm-btn-cancel.mud-button-root:hover {
    background: #E9D7F8 !important;
    background-image: none !important;
}

.dz-confirm-btn-delete {
    background: var(--red) !important;
    color: #fff !important;
}

.dz-confirm-btn-delete:hover {
    background: var(--missing) !important;
}

/* Purchased-product delete / deactivate choice */
.dz-product-force-content {
    padding: 26px 20px 6px !important;
}

.dz-product-force-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
}

.dz-product-force-body .dz-confirm-icon {
    align-self: center;
}

.dz-product-force-lead {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text);
}

.dz-product-force-code {
    color: var(--muted);
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

.dz-product-force-card {
    text-align: right;
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid transparent;
}

.dz-product-force-card p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text);
}

.dz-product-force-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.dz-product-force-card.is-recommend {
    background: #FFF8EE;
    border-color: #F0D9A8;
}

.dz-product-force-card.is-recommend .dz-product-force-card-head {
    color: #A66300;
}

.dz-product-force-card.is-danger {
    background: #FFF5F5;
    border-color: #F0C4C4;
}

.dz-product-force-card.is-danger .dz-product-force-card-head {
    color: var(--red);
}

.dz-product-force-list {
    margin: 0;
    padding: 0 18px 0 0;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text);
}

.dz-product-force-list li + li {
    margin-top: 2px;
}

.dz-product-force-irreversible {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--red);
}

.mud-dialog-actions.dz-product-force-actions {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 10px 20px 20px !important;
    justify-content: stretch !important;
}

.mud-dialog-actions.dz-product-force-actions .mud-button-root {
    margin: 0 !important;
}

.dz-product-force-btn-primary {
    width: 100%;
}

.dz-product-force-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.dz-product-force-actions-row .mud-button-root {
    width: 100%;
}

.dz-product-force-btn-danger {
    border-width: 1.5px !important;
    font-weight: 700 !important;
}

@media (max-width: 480px) {
    .dz-product-force-actions-row {
        grid-template-columns: 1fr;
    }
}

.mud-dialog.dz-form-dialog {
    border-radius: 22px !important;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(53, 0, 102, 0.18);
}

.dz-form-dialog-content {
    padding: 24px 22px 8px !important;
}

.dz-form-dialog-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.dz-form-dialog-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 0;
}

.dz-dialog-hero-title {
    font-family: var(--font-fa);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--brand);
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.mud-dialog.dz-form-dialog .mud-dialog-title {
    padding: 18px 22px 6px !important;
}

.mud-dialog.dz-form-dialog .mud-dialog-title .dz-dialog-hero-title {
    display: block;
}

.dz-form-dialog-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    letter-spacing: 0.02em;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dz-form-dialog-meta-code {
    font-weight: 700;
    color: var(--brand, #6b3fa0);
    letter-spacing: 0.04em;
}

.dz-form-dialog-title-row-code {
    justify-content: flex-start;
    margin-bottom: 4px;
}

.dz-product-color-clear-btn.mud-button-root {
    background: #eceff1 !important;
    color: #546e7a !important;
    border-radius: 10px;
    min-width: 56px;
}

.dz-product-color-clear-btn.mud-button-root:hover {
    background: #cfd8dc !important;
}

.dz-form-dialog-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.dz-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dz-form-span-2,
.dz-form-span-2 {
    grid-column: 1 / -1;
}

.dz-input-readonly,
.dz-input[readonly] {
    background: #F0EBF6;
    color: var(--muted);
    cursor: default;
}

.dz-form-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.dz-form-section {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.dz-form-section:not(:first-child) {
    margin-top: 10px;
    padding-top: 6px;
}

    .dz-form-section::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #350066;
    }

.dz-form-section-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: #F0E8FA;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.dz-form-dialog-content {
    max-height: min(72vh, 680px);
    overflow-y: auto;
}

.dz-textarea {
    min-height: 84px;
    resize: vertical;
    font-family: inherit;
}

.dz-form-error {
    margin-top: 10px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
}

.dz-req {
    color: var(--red);
    font-weight: 800;
}

.dz-input.is-invalid,
.dz-textarea.is-invalid {
    border-color: var(--red);
    background: #FFF6F6;
}

.dz-mcode-autocomplete.is-invalid .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--red) !important;
}

.dz-branch-city-ac {
    width: 100%;
}

.dz-field-error {
    margin-top: 5px;
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
}

.dz-fold {
    border: 1px solid #EDE4F7;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.dz-fold-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #FAF7FD;
    border: 0;
    cursor: pointer;
    text-align: right;
}

.dz-fold-sum {
    flex: 1;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-fold-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid #F0F0F0;
}

.dz-fold-body .dz-schedule-card {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 10px;
    padding: 8px 10px;
    margin-right: 0;
}

.dz-schedule-card {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 10px 12px;
}

.dz-schedule-title {
    margin-bottom: 8px;
}

.dz-schedule-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #F4ECFB;
    color: #8A6AAB;
    font-size: 11px;
    font-weight: 700;
}

.dz-schedule-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.dz-day-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
}

.dz-day-chip {
    min-width: 32px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid #E4D7F2;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.dz-day-chip.is-on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.dz-schedule-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-right: auto;
}

.dz-time {
    width: 118px;
    height: 32px;
    border: 1px solid #E4D7F2;
    border-radius: 8px;
    background: #fff;
    padding: 0 8px;
    font-size: 12px;
    direction: ltr;
}

.dz-form-dialog-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    padding: 8px 22px 22px !important;
    justify-content: stretch !important;
}

.mud-dialog-actions.dz-form-dialog-actions.dz-form-dialog-actions-center {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: center !important;
    align-items: center !important;
}

.mud-dialog-actions.dz-form-dialog-actions.dz-form-dialog-actions-center .mud-button-root {
    width: auto !important;
    min-width: 160px;
    margin-inline: auto !important;
}

.mud-dialog-actions.dz-form-dialog-actions .mud-button-root,
.dz-form-dialog-actions .mud-button-root {
    margin: 0 !important;
    width: 100%;
}

.dz-form-btn-save {
    background: var(--brand) !important;
    color: #fff !important;
}

.dz-form-btn-save:hover {
    background: var(--brand-dark) !important;
}

.mud-dialog-actions.dz-form-dialog-actions .dz-form-btn-save.mud-button-root:disabled,
.mud-dialog-actions.dz-form-dialog-actions .dz-form-btn-save.mud-button-root.mud-disabled {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 0.95;
}

.dz-form-btn-save-spinner {
    width: 18px !important;
    height: 18px !important;
    margin-inline-end: 6px;
    color: #fff !important;
}

@media (max-width: 600px) {
    .dz-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Unified data tables ===== */
.mud-table.dz-table {
    background: transparent;
    box-shadow: none !important;
}

.mud-table.dz-table .mud-table-container {
    overflow-x: auto;
}

.mud-table.dz-table .mud-table-root {
    border-collapse: separate;
    border-spacing: 0;
}

.mud-table.dz-table .mud-table-cell {
    border-bottom: 1px solid var(--divider) !important;
    font-family: var(--font-fa);
}

.mud-table.dz-table thead .mud-table-row,
.mud-table.dz-table .mud-table-head .mud-table-row {
    background: #F3EAFB !important;
}

.mud-table.dz-table thead .mud-table-cell,
.mud-table.dz-table .mud-table-head .mud-table-cell {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: var(--brand) !important;
    background: #F3EAFB !important;
    padding: 11px 12px !important;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: none !important;
    box-shadow: none !important;
    letter-spacing: 0.02em;
}

.mud-table.dz-table thead .mud-table-cell:first-child,
.mud-table.dz-table .mud-table-head .mud-table-cell:first-child {
    border-start-start-radius: 12px;
}

.mud-table.dz-table thead .mud-table-cell:last-child,
.mud-table.dz-table .mud-table-head .mud-table-cell:last-child {
    border-start-end-radius: 12px;
}

.mud-table.dz-table tbody .mud-table-cell,
.mud-table.dz-table .mud-table-body .mud-table-cell {
    font-size: 13px !important;
    padding: 10px 12px !important;
    vertical-align: middle;
    color: var(--text);
    background: #fff;
}

.mud-table.dz-table tbody .mud-table-row:nth-child(even) .mud-table-cell,
.mud-table.dz-table .mud-table-body .mud-table-row:nth-child(even) .mud-table-cell {
    background: #FAF8FB;
}

.mud-table.dz-table tbody tr:last-child .mud-table-cell,
.mud-table.dz-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none !important;
}

.mud-table.dz-table.mud-table-hover tbody .mud-table-row:hover .mud-table-cell,
.mud-table.dz-table tbody .mud-table-row:hover .mud-table-cell {
    background-color: #FBF8FE !important;
}

.mud-table.dz-table tbody .mud-table-row.dz-clickable-row {
    cursor: pointer;
}

.mud-table.dz-table tbody .mud-table-row.dz-clickable-row:hover .mud-table-cell {
    background-color: #F6EFFB !important;
}

.mud-table.dz-table .mud-table-sort-label,
.mud-table.dz-table .mud-table-sort-label * {
    color: inherit !important;
    font-weight: 700 !important;
    font-size: 11px !important;
}

.dz-table-compact.mud-table tbody .mud-table-cell {
    padding: 8px 10px !important;
}

.dz-cell-id {
    font-weight: 700;
    color: var(--text);
}

.dz-cell-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 1px;
}

.dz-cell-ltr,
.dz-cell-num,
.dz-cell-date {
    direction: ltr;
    unicode-bidi: isolate;
}

.dz-cell-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.dz-cell-code {
    display: inline-flex;
    align-items: center;
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--brand);
    background: #F3EAFB;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.dz-cell-muted {
    color: var(--muted);
}

.dz-cell-clip {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-cell-actions {
    white-space: nowrap;
}

.dz-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}

.dz-badge-ok {
    background: var(--green-bg);
    color: var(--green);
}

.dz-badge-warn {
    background: #FFF6E5;
    color: #C97C0C;
}

.dz-badge-action,
.dz-badge-edit {
    background: #F3EAFB;
    color: var(--brand);
}

.dz-badge-guide {
    background: var(--green-bg);
    color: var(--green);
}

.dz-badge-agent {
    background: #EEF2FF;
    color: #4338CA;
}

.dz-badge-pub {
    background: #F8F0E8;
    color: #9A5B12;
}

.dz-badge-role {
    background: #F3F0F6;
    color: var(--muted);
}

.dz-table-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--divider);
}

.dz-table-pager-meta {
    margin-inline-end: auto;
    font-size: 12px;
    color: var(--muted);
}

.dz-table-pager .mud-button-root {
    border-radius: 999px !important;
    min-height: 32px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
}

@media (max-width: 600px) {
    .mud-table.dz-table tbody .mud-table-row {
        border: 1px solid var(--divider);
        border-radius: 12px;
        margin-bottom: 8px;
        background: #fff;
    }

    .mud-table.dz-table tbody .mud-table-cell {
        border-bottom: none !important;
    }

    .mud-table.dz-table.mud-table-small tbody .mud-table-cell::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
    }

    .dz-cell-clip {
        max-width: none;
        white-space: normal;
    }

    .dz-table-pager {
        flex-wrap: wrap;
    }
}

/* ---------------------------------------------------------------- users page — aligned with branch management visual language */

.dz-page-users {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dz-users-context {
    margin: 0;
}

.dz-users-kpi-wrap {
    position: relative;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dz-users-kpi-wrap.dz-busy-host {
    min-height: 0;
}

.dz-users-kpi-grid {
    grid-template-columns: repeat(8, minmax(112px, 1fr));
    gap: 8px;
    min-width: 920px;
}

.dz-users-kpi-grid .dz-kpi-card:nth-child(5) {
    position: relative;
}

.dz-users-kpi-grid .dz-kpi-card:nth-child(5)::before {
    content: "";
    position: absolute;
    inset-inline-start: -5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: var(--divider);
    pointer-events: none;
}

.dz-page-users .dz-kpi-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.dz-page-users .dz-kpi-card {
    background: var(--surface);
    border: 1px solid rgba(53, 0, 102, 0.06);
    border-inline-start-width: 2px;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: none;
}

.dz-page-users .dz-kpi-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #F0E8FA;
    color: var(--brand);
    box-shadow: none;
}

.dz-page-users .dz-kpi-card-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
}

.dz-page-users .dz-kpi-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
    margin-top: 0;
    letter-spacing: -0.01em;
}

.dz-page-users .dz-kpi-tone-total {
    border-inline-start-color: var(--brand);
}

.dz-page-users .dz-kpi-tone-band-1 {
    border-inline-start-color: #7C3AED;
    border-inline-start-width: 3px;
}

.dz-page-users .dz-kpi-tone-band-1 .dz-kpi-icon {
    background: #EDE9FE;
    color: #5B21B6;
}

.dz-page-users .dz-kpi-tone-band-1 .dz-kpi-value {
    color: #5B21B6;
}

.dz-page-users .dz-kpi-tone-band-2 {
    border-inline-start-color: #DB2777;
    border-inline-start-width: 3px;
}

.dz-page-users .dz-kpi-tone-band-2 .dz-kpi-icon {
    background: #FCE7F3;
    color: #9D174D;
}

.dz-page-users .dz-kpi-tone-band-2 .dz-kpi-value {
    color: #9D174D;
}

.dz-page-users .dz-kpi-tone-band-3 {
    border-inline-start-color: #D97706;
    border-inline-start-width: 3px;
}

.dz-page-users .dz-kpi-tone-band-3 .dz-kpi-icon {
    background: #FEF3C7;
    color: #92400E;
}

.dz-page-users .dz-kpi-tone-band-3 .dz-kpi-value {
    color: #92400E;
}

.dz-page-users .dz-kpi-tone-band-4 {
    border-inline-start-color: #2563EB;
    border-inline-start-width: 3px;
}

.dz-page-users .dz-kpi-tone-band-4 .dz-kpi-icon {
    background: #DBEAFE;
    color: #1E40AF;
}

.dz-page-users .dz-kpi-tone-band-4 .dz-kpi-value {
    color: #1E40AF;
}

.dz-page-users .dz-kpi-tone-band-1.dz-kpi-active {
    background: rgba(124, 58, 237, 0.08);
    border-inline-start-color: #7C3AED;
}

.dz-page-users .dz-kpi-tone-band-2.dz-kpi-active {
    background: rgba(219, 39, 119, 0.08);
    border-inline-start-color: #DB2777;
}

.dz-page-users .dz-kpi-tone-band-3.dz-kpi-active {
    background: rgba(217, 119, 6, 0.08);
    border-inline-start-color: #D97706;
}

.dz-page-users .dz-kpi-tone-band-4.dz-kpi-active {
    background: rgba(37, 99, 235, 0.08);
    border-inline-start-color: #2563EB;
}

.dz-page-users .dz-kpi-tone-active {
    border-inline-start-color: var(--green);
}

.dz-page-users .dz-kpi-tone-active .dz-kpi-icon {
    background: var(--green-bg);
    color: var(--green);
}

.dz-page-users .dz-kpi-tone-active .dz-kpi-value {
    color: var(--green);
}

.dz-page-users .dz-kpi-tone-never {
    border-inline-start-color: var(--muted);
}

.dz-page-users .dz-kpi-tone-never .dz-kpi-icon {
    background: #F5F2EF;
    color: var(--muted);
}

.dz-page-users .dz-kpi-tone-never .dz-kpi-value {
    color: var(--muted);
}

.dz-page-users .dz-kpi-tone-blocked {
    border-inline-start-color: var(--red);
}

.dz-page-users .dz-kpi-tone-blocked .dz-kpi-icon {
    background: var(--red-bg);
    color: var(--red);
}

.dz-page-users .dz-kpi-tone-blocked .dz-kpi-value {
    color: var(--red);
}

.dz-page-users .dz-kpi-clickable {
    cursor: pointer;
    transition: background .15s ease;
}

.dz-page-users .dz-kpi-clickable:hover {
    background: #F0E8FA;
}

.dz-page-users .dz-kpi-active {
    background: rgba(53, 0, 102, 0.08);
    border-inline-start-color: var(--brand);
    box-shadow: none;
    transform: none;
}

.dz-users-filter-card {
    margin: 0;
}

.dz-users-kind-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 14px;
}

.dz-users-kind-pick {
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-fa);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.dz-users-kind-pick:hover {
    background: #F0E8FA;
}

.dz-users-kind-pick-active {
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
    font-weight: 700;
}

.dz-users-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.dz-users-search-field {
    flex: 1 1 240px;
    min-width: 200px;
}

.dz-users-search-btn {
    height: 40px;
    min-width: 88px;
    flex: none;
}

.dz-users-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dz-users-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--brand);
    font-family: var(--font-fa);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 2px;
}

.dz-users-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    border: 0;
    background: transparent;
    color: var(--brand-light);
    font-family: var(--font-fa);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.dz-users-clear-filters:hover:not(:disabled) {
    background: #F0E8FA;
    color: var(--brand);
}

.dz-users-clear-filters:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dz-users-active-filters {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--divider);
    align-items: center;
}

.dz-users-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.dz-users-advanced-filters {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}

.dz-page-users .dz-filter-tag-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: rgba(53, 0, 102, 0.06);
    color: var(--brand);
    border-radius: 10px;
    padding: 4px 8px 4px 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-fa);
    cursor: pointer;
    transition: background .15s ease;
}

.dz-page-users .dz-filter-tag-dismiss:hover {
    background: #F0E8FA;
}

.dz-page-users .dz-filter-tag-dismiss .mud-icon-root {
    font-size: 14px !important;
    opacity: 0.7;
}

.dz-users-table-card {
    margin: 0;
}

.dz-users-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
}

.dz-users-table-toolbar-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
}

.dz-users-table-toolbar-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dz-users-table-toolbar-pager .mud-button-root {
    min-height: 32px !important;
    height: 32px;
}

.dz-users-page-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
}

.dz-users-page-size-label {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.dz-users-page-size {
    min-width: 4.25rem;
    max-width: 4.75rem;
}

.dz-users-page-size .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dz-users-page-size .mud-input-control-input-container {
    display: flex;
    align-items: center;
    height: 32px;
}

.dz-users-page-size .mud-input-root {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    align-items: center;
}

.dz-users-page-size .mud-input,
.dz-users-page-size .mud-input-outlined,
.dz-users-page-size .mud-select-input {
    min-height: 32px !important;
    height: 32px !important;
    align-items: center !important;
}

.dz-users-page-size .mud-input-slot {
    min-height: 32px !important;
    height: 32px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    line-height: 32px !important;
    font-size: 12px !important;
    font-weight: 700;
}

.dz-users-page-size input.mud-input-slot {
    height: 32px !important;
    min-height: 32px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 32px !important;
    box-sizing: border-box;
}

.dz-users-page-size div.mud-input-slot {
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

.dz-users-page-size .mud-input input {
    height: 32px !important;
    min-height: 32px !important;
    padding-block: 0 !important;
    margin: 0 !important;
    line-height: 32px !important;
    font-size: 12px !important;
    font-weight: 700;
}

.dz-users-page-size .mud-input-adornment-end {
    align-self: center;
    height: 32px;
    max-height: 32px;
    display: inline-flex;
    align-items: center;
}

.dz-users-page-size .mud-input-adornment-end .mud-icon-button {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
}

.dz-users-page-size .mud-input-outlined .mud-input-outlined-border {
    border-radius: 999px !important;
}

.dz-users-table-scroll {
    max-height: min(70vh, 720px);
    overflow: auto;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(53, 0, 102, 0.06);
}

.dz-page-users .mud-table.dz-table-sticky thead .mud-table-cell,
.dz-page-users .mud-table.dz-table-sticky .mud-table-head .mud-table-cell {
    position: sticky;
    top: 0;
    z-index: 2;
}

.dz-user-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dz-user-name-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dz-user-name-main .dz-cell-id {
    min-width: 0;
    line-height: 1.4;
}

.dz-activity-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0;
}

.dz-dot-active {
    background: var(--green);
}

.dz-dot-dormant {
    background: #C97C0C;
}

.dz-dot-never {
    background: #B8B0A8;
}

.dz-dot-blocked {
    background: var(--red);
}

.dz-page-users .mud-table.dz-table tbody .mud-table-row.dz-row-blocked .mud-table-cell,
.dz-page-users .mud-table.dz-table .mud-table-body .mud-table-row.dz-row-blocked .mud-table-cell {
    background: #FEF5F5 !important;
}

.dz-page-users .mud-table.dz-table thead .mud-table-cell:first-child,
.dz-page-users .mud-table.dz-table .mud-table-head .mud-table-cell:first-child,
.dz-page-users .mud-table.dz-table tbody .mud-table-cell:first-child,
.dz-page-users .mud-table.dz-table .mud-table-body .mud-table-cell:first-child {
    text-align: start;
}

.dz-page-users .mud-table.dz-table thead .mud-table-cell:not(:first-child),
.dz-page-users .mud-table.dz-table .mud-table-head .mud-table-cell:not(:first-child),
.dz-page-users .mud-table.dz-table tbody .mud-table-cell:not(:first-child),
.dz-page-users .mud-table.dz-table .mud-table-body .mud-table-cell:not(:first-child) {
    text-align: center;
}

.dz-page-users .dz-cell-actions {
    text-align: center;
}

@media (max-width: 720px) {
    .dz-users-kind-pick {
        flex: 1 1 calc(50% - 4px);
        text-align: center;
    }

    .dz-page-users .dz-user-name-main {
        gap: 4px 6px;
    }

    .dz-page-users .mud-table.dz-table tbody .mud-table-cell:first-child,
    .dz-page-users .mud-table.dz-table .mud-table-body .mud-table-cell:first-child {
        padding-bottom: 4px !important;
    }

    .dz-users-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dz-users-table-toolbar-pager {
        justify-content: space-between;
    }

    .dz-users-table-scroll {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .dz-page-users .dz-user-name-cell {
        align-items: flex-start;
    }

    .dz-page-users .dz-user-name-main {
        flex: 1;
        gap: 4px 6px;
    }

    .dz-page-users .dz-user-name-main .dz-cell-id {
        flex: 1 1 auto;
        word-break: break-word;
    }
}

.dz-badge-blocked {
    background: var(--red-bg, #FDECEC);
    color: var(--red, #C62828);
}

/* ------------------------------------------------------- user detail dialog */

.mud-dialog.dz-userdlg-dialog {
    position: relative;
    border-radius: 22px !important;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(53, 0, 102, 0.18);
}

    .mud-dialog.dz-userdlg-dialog .mud-dialog-title {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: 0 !important;
        overflow: hidden;
    }

.dz-userdlg-content {
    position: relative;
    padding: 20px 22px 8px !important;
}

.dz-userdlg-close {
    position: absolute !important;
    top: 10px;
    left: 10px;
    z-index: 3;
    color: var(--muted) !important;
}

    .dz-userdlg-close:hover {
        color: var(--brand) !important;
        background: #F0E8FA !important;
    }

.mud-dialog-actions.dz-userdlg-actions {
    position: relative;
    padding: 12px 22px 18px !important;
    gap: 0;
    justify-content: stretch;
}

    .mud-dialog-actions.dz-userdlg-actions:not(:has(.mud-button-root)) {
        display: none !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

.dz-userdlg-actions-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.dz-userdlg-actions-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dz-userdlg-actions-moderate {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mud-dialog-actions.dz-userdlg-actions .dz-userdlg-action {
    flex: 0 0 auto;
    min-width: 0;
    padding-inline: 12px;
    white-space: nowrap;
}

.dz-account-subject.dz-userdlg-hero {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #E0D4F0;
    background: none;
    border-radius: 0;
}

.dz-creditdlg-current {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F7F3FC;
    border: 1px solid #EDE4F7;
}

.dz-creditdlg-current-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #2a2040);
    letter-spacing: 0.01em;
}

.dz-creditdlg-unit {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-inline-start: 4px;
}

.dz-creditdlg-delta {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
}

.dz-creditdlg-delta.is-up {
    color: #1B7A4A;
}

.dz-creditdlg-delta.is-down {
    color: #B42318;
}

.dz-account-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-account-field-hint-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

    .dz-account-field-hint-row .dz-account-field-hint {
        margin-top: 0;
        text-align: right;
        flex: 1;
    }

    .dz-account-field-hint-row .dz-account-field-note {
        flex-shrink: 0;
    }

.dz-account-field-note {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.dz-account-field-hint {
    font-size: 10px;
    color: var(--muted);
    text-align: right;
    line-height: 1.4;
    margin-top: -2px;
}

.dz-account-field .dz-input {
    text-align: right;
}

.dz-account-field-ltr .dz-form-field-label {
    text-align: right;
}

.dz-account-input-adorned {
    position: relative;
    width: 100%;
    direction: ltr;
}

.dz-account-input-core {
    width: 100%;
    text-align: left !important;
    direction: ltr;
    padding-left: 14px !important;
    padding-right: 42px !important;
    font-family: inherit;
}

.dz-account-field-eye,
.dz-account-field-status {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.dz-account-field-eye:hover:not(:disabled) {
    color: var(--brand);
}

.dz-account-field-eye:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dz-account-field-ok {
    color: var(--green);
    pointer-events: none;
}

.dz-account-input-core.is-valid {
    border-color: var(--green);
    background: var(--green-bg);
}

.dz-account-field-ltr .dz-field-error {
    text-align: right;
}

.dz-userdlg-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ECE3F7;
}

.dz-userdlg-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

    .dz-userdlg-avatar-wrap .dz-activity-dot {
        position: absolute;
        bottom: 0;
        inset-inline-start: 0;
        width: 10px;
        height: 10px;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px rgba(53, 0, 102, 0.12);
    }

.dz-userdlg-avatar {
    width: 48px;
    height: 48px;
    font-weight: 700;
    font-size: 15px;
}

.dz-userdlg-hero-main {
    flex: 1;
    min-width: 0;
}

.dz-pilgrim-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(93, 24, 159, 0.08), rgba(53, 0, 102, 0.03));
    border: 1px solid rgba(93, 24, 159, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
}

.dz-pilgrim-hint p {
    margin: 0 0 7px;
    font-size: 12.5px;
    line-height: 1.65;
    text-align: right;
    color: #505050;
}

.dz-pilgrim-hint p:last-child {
    margin-bottom: 0;
}

.dz-pilgrim-hint-lead {
    color: #350066;
    font-weight: 700;
}

.dz-pilgrim-hint-stat {
    color: #5d189f;
    font-weight: 700;
}

.dz-pilgrim-hint-body {
    color: #3f3f3f;
}

.dz-pilgrim-hint-note {
    color: #6b5a7d;
    font-size: 11.5px;
    border-top: 1px dashed rgba(93, 24, 159, 0.18);
    margin-top: 2px !important;
    padding-top: 6px;
}

.dz-pilgrim-actions {
    justify-content: center;
}

.dz-pilgrim-close-btn.mud-button-root {
    min-width: 140px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-color: rgba(93, 24, 159, 0.28) !important;
    color: #350066 !important;
    background: linear-gradient(165deg, rgba(93, 24, 159, 0.06), rgba(53, 0, 102, 0.02));
}

.dz-pilgrim-close-btn.mud-button-root:hover:not(:disabled) {
    border-color: rgba(93, 24, 159, 0.45) !important;
    background: linear-gradient(165deg, rgba(93, 24, 159, 0.12), rgba(53, 0, 102, 0.05)) !important;
}

.dz-pilgrim-close-btn.mud-button-root:disabled {
    opacity: 0.55;
}

.dz-userdlg-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dz-userdlg-name {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.35;
}

.dz-userdlg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dz-userdlg-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

    .dz-userdlg-phone .mud-icon-root {
        font-size: 15px !important;
        color: var(--muted);
    }

.dz-userdlg-phone-num {
    letter-spacing: 0.02em;
}

.dz-userdlg-phone-verify-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 15px;
    flex-shrink: 0;
    line-height: 0;
    cursor: help;
}

.dz-userdlg-phone-verify {
    font-size: 15px !important;
    width: 18px !important;
    height: 15px !important;
    cursor: help;
}

.dz-userdlg-activity-label {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    cursor: help;
}

    .dz-userdlg-activity-label.dz-dot-active {
        background: var(--green-bg);
        color: var(--green);
    }

    .dz-userdlg-activity-label.dz-dot-dormant {
        background: #FFF6E5;
        color: #C97C0C;
    }

    .dz-userdlg-activity-label.dz-dot-never {
        background: #F3F0F7;
        color: var(--muted);
    }

    .dz-userdlg-activity-label.dz-dot-blocked {
        background: var(--red-bg, #FDECEC);
        color: var(--red, #C62828);
    }

.dz-userdlg-icon-ok {
    color: var(--green) !important;
}

.dz-userdlg-icon-warn {
    color: #C97C0C !important;
}

.dz-userdlg-icon-block {
    color: var(--red) !important;
}

.dz-userdlg-body {
    min-height: 0;
}

.dz-userdlg-alert {
    margin-bottom: 12px;
}

.dz-userdlg-tabs {
    margin-top: 2px;
}

/* Keep tabs visible on narrow dialogs; avoid RTL scroll-arrow paging. */
.dz-userdlg-tabs .mud-tab {
    min-width: 0 !important;
    flex: 1 1 0;
    padding-inline: 8px;
    font-size: 12px;
    white-space: nowrap;
    min-height: 40px;
}

.dz-userdlg-tabs .mud-tab .mud-tab-icon {
    margin-inline-end: 4px;
}

/* Mud scroll chevrons sit in a 48px bar but the button is shorter — center them. */
.dz-userdlg-tabs .mud-tabs-tabbar-inner {
    align-items: center;
    min-height: 40px;
}

.dz-userdlg-tabs .mud-tabs-scroll-button {
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.dz-userdlg-tabs .mud-tabs-scroll-button .mud-button-root {
    height: 36px;
    width: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 520px) {
    .dz-userdlg-tabs .mud-tab .mud-typography {
        font-size: 11px;
    }
}

.dz-userdlg-tab-panel {
    padding-top: 14px !important;
}

.dz-userdlg-kpi.dz-userdlg-kpi-otp {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 10px;
}

.dz-userdlg-kpi-otp b {
    font-size: 12px;
    font-weight: 700;
    word-break: break-word;
}

.dz-userdlg-otp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(42vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dz-userdlg-otp-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm, 12px);
    background: #FAF7FD;
}

.dz-userdlg-otp-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.dz-userdlg-otp-kind {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    background: rgba(103, 58, 183, 0.1);
    color: var(--primary, #673AB7);
}

.dz-userdlg-otp-kind--login {
    background: rgba(2, 136, 209, 0.1);
    color: #0277BD;
}

.dz-userdlg-otp-kind--register {
    background: rgba(103, 58, 183, 0.1);
    color: var(--primary, #673AB7);
}

.dz-userdlg-otp-when {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    flex: 1 1 auto;
    text-align: left;
    min-width: 0;
}

.dz-userdlg-otp-item-note {
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 520px) {
    .dz-userdlg-otp-item-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .dz-userdlg-otp-when {
        text-align: right;
        width: 100%;
    }
}

.dz-userdlg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 520px) {
    .dz-userdlg-grid {
        grid-template-columns: 1fr;
    }
}

.dz-userdlg-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm, 12px);
    background: #FAF7FD;
}

.dz-userdlg-field-label {
    font-size: 11px;
    color: var(--muted);
}

.dz-userdlg-field-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.dz-userdlg-field-hint {
    font-size: 10px;
    color: var(--muted);
}

/* Compact client glance next to phone / activity in the hero */
.dz-userdlg-client-mini {
    --dz-client-accent: #5D189F;
    --dz-client-accent-soft: rgba(93, 24, 159, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 6px;
    border-radius: 999px;
    background: var(--dz-client-accent-soft);
    color: var(--dz-client-accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
}

.dz-userdlg-client-mini .mud-icon-root {
    font-size: 14px !important;
}

.dz-userdlg-client-mini.dz-client--android {
    --dz-client-accent: #15803D;
    --dz-client-accent-soft: rgba(61, 220, 132, 0.18);
}

.dz-userdlg-client-mini.dz-client--ios {
    --dz-client-accent: #334155;
    --dz-client-accent-soft: rgba(148, 163, 184, 0.28);
}

.dz-userdlg-client-mini.dz-client--web-android {
    --dz-client-accent: #0F766E;
    --dz-client-accent-soft: rgba(45, 212, 191, 0.18);
}

.dz-userdlg-client-mini.dz-client--windows {
    --dz-client-accent: #1D4ED8;
    --dz-client-accent-soft: rgba(96, 165, 250, 0.22);
}

.dz-userdlg-client-mini.dz-client--macos {
    --dz-client-accent: #4B5563;
    --dz-client-accent-soft: rgba(209, 213, 219, 0.55);
}

.dz-userdlg-client-mini.dz-client--unknown {
    --dz-client-accent: #8B7A9E;
    --dz-client-accent-soft: rgba(139, 122, 158, 0.12);
}

/* Last-client presence card (channel / OS / version) */
.dz-userdlg-client {
    --dz-client-accent: #5D189F;
    --dz-client-accent-soft: rgba(93, 24, 159, 0.12);
    --dz-client-surface: linear-gradient(165deg, rgba(93, 24, 159, 0.07), rgba(53, 0, 102, 0.02));
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm, 12px);
    background: var(--dz-client-surface);
    border: 1px solid rgba(93, 24, 159, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
}

.dz-userdlg-client.dz-client--android {
    --dz-client-accent: #3DDC84;
    --dz-client-accent-soft: rgba(61, 220, 132, 0.16);
    --dz-client-surface: linear-gradient(165deg, rgba(61, 220, 132, 0.12), rgba(30, 158, 90, 0.03));
    border-color: rgba(30, 158, 90, 0.22);
}

.dz-userdlg-client.dz-client--ios {
    --dz-client-accent: #334155;
    --dz-client-accent-soft: rgba(51, 65, 85, 0.12);
    --dz-client-surface: linear-gradient(165deg, rgba(148, 163, 184, 0.18), rgba(241, 245, 249, 0.55));
    border-color: rgba(71, 85, 105, 0.2);
}

.dz-userdlg-client.dz-client--web-android {
    --dz-client-accent: #0F766E;
    --dz-client-accent-soft: rgba(15, 118, 110, 0.12);
    --dz-client-surface: linear-gradient(165deg, rgba(45, 212, 191, 0.14), rgba(15, 118, 110, 0.03));
    border-color: rgba(15, 118, 110, 0.2);
}

.dz-userdlg-client.dz-client--windows {
    --dz-client-accent: #2563EB;
    --dz-client-accent-soft: rgba(37, 99, 235, 0.12);
    --dz-client-surface: linear-gradient(165deg, rgba(96, 165, 250, 0.16), rgba(37, 99, 235, 0.03));
    border-color: rgba(37, 99, 235, 0.2);
}

.dz-userdlg-client.dz-client--macos {
    --dz-client-accent: #6B7280;
    --dz-client-accent-soft: rgba(107, 114, 128, 0.14);
    --dz-client-surface: linear-gradient(165deg, rgba(209, 213, 219, 0.35), rgba(243, 244, 246, 0.7));
    border-color: rgba(107, 114, 128, 0.22);
}

.dz-userdlg-client.dz-client--web {
    --dz-client-accent: #5D189F;
    --dz-client-accent-soft: rgba(93, 24, 159, 0.12);
}

.dz-userdlg-client.dz-client--unknown {
    --dz-client-accent: #8B7A9E;
    --dz-client-accent-soft: rgba(139, 122, 158, 0.12);
    --dz-client-surface: linear-gradient(165deg, #FAF7FD, #F5F0FA);
    border-color: #ECE3F7;
}

.dz-userdlg-client-ico {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--dz-client-accent-soft);
    color: var(--dz-client-accent);
    align-self: center;
}

.dz-userdlg-client-ico .mud-icon-root {
    font-size: 24px !important;
}

.dz-userdlg-client-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.dz-userdlg-client-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--dz-client-accent);
}

.dz-userdlg-client-kicker .mud-icon-root {
    font-size: 15px !important;
}

.dz-userdlg-client-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dz-userdlg-client-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(53, 0, 102, 0.08);
    color: var(--text, #2A2622);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dz-userdlg-client-chip .mud-icon-root {
    font-size: 15px !important;
    color: var(--dz-client-accent);
}

.dz-userdlg-client-chip--ver {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    background: var(--dz-client-accent);
    border-color: transparent;
    color: #fff;
}

.dz-userdlg-client-chip--ver .dz-userdlg-client-ver-prefix {
    opacity: 0.72;
    font-weight: 600;
    margin-inline-end: 1px;
}

.dz-userdlg-client-empty {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    line-height: 1.55;
    color: #6b5a7d;
}

.dz-userdlg-client-empty .mud-icon-root {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 15px !important;
    color: #8B7A9E;
}

@media (max-width: 520px) {
    .dz-userdlg-client {
        padding: 11px 12px;
        gap: 10px;
    }

    .dz-userdlg-client-ico {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .dz-userdlg-client-ico .mud-icon-root {
        font-size: 22px !important;
    }
}

.dz-userdlg-blockbox {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm, 12px);
    background: var(--red-bg, #FDECEC);
    color: var(--red, #C62828);
    font-size: 12px;
}

.dz-userdlg-blockbox-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    margin-bottom: 8px;
}

.dz-userdlg-blockbox-row {
    display: flex;
    gap: 6px;
    margin-top: 3px;
}

    .dz-userdlg-blockbox-row > span:first-child {
        opacity: .75;
    }

.dz-userdlg-kpi {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.dz-userdlg-kpi-3 {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 0;
}

.dz-userdlg-kpi-2 + .dz-userdlg-table-scroll,
.dz-userdlg-kpi-2 + .dz-empty-state,
.dz-userdlg-kpi-2 + .dz-userdlg-search,
.dz-userdlg-kpi-3 + .dz-userdlg-table-scroll,
.dz-userdlg-kpi-3 + .dz-empty-state,
.dz-userdlg-kpi-3 + .dz-userdlg-search {
    margin-top: 10px;
}

.dz-userdlg-kpi-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    min-width: 0;
    flex: 1 1 auto;
}

    .dz-userdlg-kpi-dates b {
        font-weight: 700;
        color: var(--text);
    }

.dz-userdlg-kpi-sep {
    opacity: 0.5;
}

.dz-userdlg-kpi-2 {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 14px;
}

@media (max-width: 520px) {
    .dz-userdlg-kpi-3 {
        grid-template-columns: 1fr;
    }

    .dz-userdlg-kpi.dz-userdlg-kpi-otp {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .dz-userdlg-kpi.dz-userdlg-kpi-otp > div {
        padding: 8px 6px;
    }

    .dz-userdlg-kpi.dz-userdlg-kpi-otp span {
        font-size: 10px;
    }

    .dz-userdlg-kpi.dz-userdlg-kpi-otp b {
        font-size: 11px;
    }

    .dz-userdlg-search-bar .dz-userdlg-kpi-dates {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .dz-userdlg-kpi-sep {
        display: none;
    }
}

    .dz-userdlg-kpi > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 9px 12px;
        border-radius: var(--radius-sm, 12px);
        background: #FAF7FD;
        font-size: 13px;
    }

    .dz-userdlg-kpi span {
        font-size: 11px;
    }

    .dz-userdlg-kpi b {
        font-weight: 800;
    }

.dz-userdlg-table-scroll {
    max-height: min(42vh, 360px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm, 12px);
}

.dz-userdlg-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
}

.dz-userdlg-pager-label {
    min-width: 4.5rem;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.dz-userdlg-table.mud-table {
    min-width: 360px;
}

.dz-userdlg-table.mud-table tbody .mud-table-cell,
.dz-userdlg-table.mud-table thead .mud-table-cell,
.dz-userdlg-table.mud-table .mud-table-head .mud-table-cell {
    vertical-align: middle !important;
}

.dz-userdlg-cell-split {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.dz-userdlg-cell-main {
    order: 2;
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: right;
    min-width: 0;
    float: right;
}

.dz-userdlg-cell-meta {
    order: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    max-width: 48%;
    float: left;
}

.dz-userdlg-ltr-line {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
    max-width: 100%;
}

.dz-userdlg-cell-sub {
    display: block;
    width: 100%;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 0;
}

.dz-userdlg-pay-credit {
    display: inline-block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.dz-userdlg-th-icon,
.dz-userdlg-td-icon {
    width: 44px;
    text-align: center !important;
}

.dz-userdlg-more {
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

.dz-userdlg-search {
    margin: 8px 0 12px;
}

.dz-userdlg-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
}

.dz-userdlg-search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    margin-inline-start: auto;
    border: 1px solid var(--divider, #EDE8E4);
    background: #F4F0F6;
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-fa, IRANSans, Tahoma, sans-serif);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 9px 3px 7px;
    opacity: 1;
    line-height: 1;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

    .dz-userdlg-search-toggle .mud-icon-root {
        font-size: 14px !important;
        width: 14px;
        height: 14px;
    }

    .dz-userdlg-search-toggle:hover:not(:disabled),
    .dz-userdlg-search-toggle.is-open,
    .dz-userdlg-search-toggle.is-active {
        color: var(--brand);
        background: #EFE8F6;
        border-color: #D4C4E4;
    }

    .dz-userdlg-search-toggle:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.dz-userdlg-search-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand);
}

.dz-userdlg-search-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s ease;
}

    .dz-userdlg-search-collapse.is-open {
        grid-template-rows: 1fr;
    }

.dz-userdlg-search-collapse-inner {
    overflow: hidden;
    min-height: 0;
}

.dz-userdlg-search-panel {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--divider, #EDE8E4);
    border-radius: 14px;
    background: #FBF8FC;
    direction: rtl;
    text-align: right;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease;
}

.dz-userdlg-search-collapse.is-open .dz-userdlg-search-panel {
    opacity: 1;
    transform: none;
}

.dz-userdlg-search-field .mud-input-slot,
.dz-userdlg-search-field input,
.dz-jalali-datepicker .mud-input-slot,
.dz-jalali-datepicker input {
    direction: rtl;
    text-align: right;
}

.dz-jalali-datepicker .mud-input > input {
    padding-inline-end: 4.25rem;
}

.dz-userdlg-search-field .mud-input > input {
    padding-inline-start: 2.5rem;
}

.dz-userdlg-search-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dz-userdlg-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dz-jalali-datepicker {
    position: relative;
    width: 100%;
}

.mud-popover.dz-jalali-pop {
    z-index: 1600 !important;
}

.dz-jalali-cal {
    width: 268px;
    padding: 8px 8px 10px;
    direction: rtl;
    font-family: var(--font-fa, IRANSans, Tahoma, sans-serif);
}

.dz-jalali-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 4px;
}

.dz-jalali-cal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.dz-jalali-cal-title-btn,
.dz-jalali-cal-title-range {
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text, #2A2622);
    line-height: 1;
    padding: 4px 6px;
    border-radius: 8px;
}

.dz-jalali-cal-title-btn {
    cursor: pointer;
}

    .dz-jalali-cal-title-btn:hover {
        background: #EFE8F6;
        color: var(--brand, #350066);
    }

.dz-jalali-cal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    min-height: 212px;
}

.dz-jalali-cal-chip {
    border: 0;
    background: transparent;
    border-radius: 8px;
    min-height: 48px;
    padding: 0 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    color: var(--text, #2A2622);
}

    .dz-jalali-cal-chip.is-today:not(.is-selected) {
        box-shadow: inset 0 0 0 1px var(--brand, #350066);
        color: var(--brand, #350066);
    }

    .dz-jalali-cal-chip.is-selected {
        background: var(--brand, #350066);
        color: #fff;
    }

    .dz-jalali-cal-chip:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .dz-jalali-cal-chip:not(:disabled):not(.is-selected):hover {
        background: #EFE8F6;
    }

.dz-jalali-cal-week,
.dz-jalali-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.dz-jalali-cal-week {
    margin-bottom: 8px;
}

.dz-jalali-cal-dow {
    font-size: 11px;
    color: var(--muted, #8A828F);
    padding: 4px 0 6px;
}

.dz-jalali-cal-day {
    border: 0;
    background: transparent;
    border-radius: 8px;
    height: 32px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    color: var(--text, #2A2622);
}

    .dz-jalali-cal-day.is-out {
        color: #c4bfc8;
    }

    .dz-jalali-cal-day.is-today:not(.is-selected) {
        box-shadow: inset 0 0 0 1px var(--brand, #350066);
        color: var(--brand, #350066);
        font-weight: 700;
    }

    .dz-jalali-cal-day.is-selected {
        background: var(--brand, #350066);
        color: #fff;
        font-weight: 700;
    }

    .dz-jalali-cal-day:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .dz-jalali-cal-day:not(:disabled):not(.is-selected):hover {
        background: #EFE8F6;
    }

.dz-userdlg-history {
    min-height: 64px;
}

@media (max-width: 600px) {
    .dz-userdlg-search-dates {
        grid-template-columns: 1fr;
    }
}

.mud-dialog.dz-mcode-dialog {
    width: 100%;
    max-width: min(405px, 90vw) !important;
}

    .mud-dialog.dz-mcode-dialog .mud-dialog-title {
        padding-bottom: 6px;
    }

    .mud-dialog.dz-mcode-dialog .dz-form-dialog-content {
        padding-top: 10px !important;
    }

    .mud-dialog.dz-mcode-dialog .dz-blockdlg-text {
        margin: 0 0 10px;
        line-height: 1.5;
    }

.dz-mcode-editor {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-mcode-editor-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dz-mcode-mode-block {
    display: flex;
    flex-direction: column;
}

.dz-mcode-nolegion-note {
    margin: 8px 2px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.dz-mcode-mode-btn {
    width: 100%;
    border: 1.5px solid #C4B0DC;
    border-radius: 10px;
    background: #fff;
    color: #4A3566;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    line-height: 1.5;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .dz-mcode-mode-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.dz-mcode-mode-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.dz-mcode-mode-block-open .dz-mcode-mode-btn.dz-mcode-mode-active {
    border-radius: 10px 10px 0 0;
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.dz-mcode-mode-block-open .dz-mcode-editor-accordion {
    border-color: var(--brand);
}

.dz-mcode-editor-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1.5px solid #C4B0DC;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #FAF7FD;
    padding: 12px;
    animation: dz-mcode-accordion-in 0.18s ease-out;
}

@keyframes dz-mcode-accordion-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dz-mcode-editor-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-mcode-editor-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dz-mcode-editor-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-align: start;
}

.dz-mcode-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.dz-mcode-field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-align: start;
    width: 100%;
}

.dz-mcode-autocomplete,
.dz-mcode-autocomplete .mud-input-control {
    width: 100%;
}

.dz-mcode-toggle-row {
    display: flex;
    gap: 8px;
}

.dz-mcode-toggle {
    flex: 1;
    border: 1px solid #E0D4F0;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6B5A7E;
    cursor: pointer;
    font-family: inherit;
}

    .dz-mcode-toggle:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.dz-mcode-toggle-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.dz-mcode-toggle-check {
    font-size: 14px !important;
    opacity: 0.85;
}

.dz-mcode-toggle-active {
    border-color: #C4B0DC;
    background: #F0E8FA;
    color: #5A3D7A;
    font-weight: 700;
}

.dz-mcode-legion-select {
    width: 100%;
}

.dz-mcode-preview {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: 2px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #F2EFF5;
    border: 1px solid #E4DEEA;
    text-align: center;
    white-space: nowrap;
}

.dz-mcode-preview-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
}

.dz-mcode-preview-value {
    letter-spacing: 0.04em;
    color: #5C5368;
}

.dz-mcode-editor-loading {
    display: flex;
    justify-content: center;
    padding: 28px 0;
}

/* -------------------------------------------------------- block user dialog */

.dz-blockdlg-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 15px;
}

.dz-blockdlg-text {
    font-size: 13px;
    line-height: 1.9;
    margin: 0 0 6px;
}

.dz-blockdlg-note {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 14px;
}

/* -- Finance dashboard ------------------------------------------- */
.dz-page-finance .dz-finance-shell {
    padding: 22px 22px 28px;
}

.dz-finance-header {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.dz-finance-mode-tabs {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 10px;
    background: rgba(53, 0, 102, 0.06);
    border: 1px solid rgba(53, 0, 102, 0.08);
}

.dz-finance-buyers-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dz-finance-buyers-head .dz-finance-section-title {
    margin-bottom: 4px;
}

.dz-finance-buyers-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 280px;
    max-width: 420px;
}

.dz-finance-buyers-search-field {
    flex: 1 1 auto;
    min-width: 0;
}

.dz-finance-buyers-panel {
    padding-top: 8px;
}

.dz-finance-buyer-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    background: rgba(53, 0, 102, 0.07);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.dz-finance-buyer-amount {
    font-weight: 700;
    color: var(--brand-dark);
}

.dz-finance-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.dz-finance-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 10px 12px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #FFFCFA 0%, #F8F3EE 100%);
    overflow-x: auto;
}

.dz-finance-scoped-branch {
    flex: 0 0 180px;
    width: 180px;
    min-width: 160px;
    max-width: 180px;
    align-self: center;
}

.dz-finance-scoped-branch .mud-input-control {
    margin-top: 0;
}

.dz-finance-chip-group {
    display: inline-flex;
    flex-shrink: 0;
    margin-inline-start: auto;
    padding: 3px;
    gap: 2px;
    border-radius: 10px;
    background: rgba(53, 0, 102, 0.06);
    border: 1px solid rgba(53, 0, 102, 0.08);
}

.dz-finance-chip {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.dz-finance-chip:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.7);
}

.dz-finance-chip.is-active {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 1px 3px rgba(53, 0, 102, 0.12);
}

.dz-finance-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dz-finance-range {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.dz-finance-range-label {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.dz-finance-range-field {
    flex: 0 0 152px;
    width: 152px;
    max-width: 168px;
    min-width: 152px;
}

.dz-finance-range-field .dz-jalali-datepicker {
    width: 100%;
}

.dz-finance-apply {
    flex-shrink: 0;
    height: 40px;
    white-space: nowrap;
}

.dz-finance-section {
    margin-bottom: 22px;
}

.dz-finance-section-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-dark);
}

.dz-finance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dz-finance-kpi-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dz-page-finance .dz-kpi-card {
    padding: 14px 16px;
}

.dz-page-finance .dz-kpi-value {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.dz-page-finance .dz-kpi-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.dz-kpi-label-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dz-kpi-sub-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
}

.dz-kpi-metric {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dz-kpi-metric-sep {
    margin: 0 4px;
    opacity: 0.7;
}

.dz-fin-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: help;
    line-height: 1;
    opacity: 0.75;
    transition: color 0.12s ease, opacity 0.12s ease;
}

.dz-fin-info:hover,
.dz-fin-info:focus-visible {
    color: var(--brand);
    opacity: 1;
    outline: none;
}

.dz-fin-info .mud-icon-root {
    font-size: 15px !important;
    width: 15px;
    height: 15px;
}

.dz-fin-cmp-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dz-finance-panel {
    background: #FFFCFA;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    min-width: 0;
}

.dz-finance-panel-trend {
    padding-top: 10px;
}

.dz-finance-panel-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.dz-finance-donut-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dz-finance-donut-row .dz-finance-panel-trend {
    min-height: 0;
}

.dz-finance-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dz-finance-rank-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.dz-finance-rank-cols.is-scoped {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dz-finance-local-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    background: rgba(53, 0, 102, 0.03);
}

.dz-finance-local-filter {
    min-width: 0;
}

.dz-finance-local-filter .mud-input-control {
    margin-top: 0;
}

.dz-finance-rank-col {
    min-width: 0;
}

.dz-finance-rank-col .dz-finance-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dz-finance-rank-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    flex-shrink: 0;
}

.dz-finance-rank-cols .dz-finance-ranklist-row {
    padding: 8px 6px;
    gap: 8px;
    grid-template-columns: 28px minmax(0, 1fr);
}

.dz-finance-rank-cols .dz-finance-ranklist-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 12px;
}

.dz-finance-rank-cols .dz-finance-ranklist-top {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
}

.dz-finance-rank-cols .dz-finance-ranklist-stats {
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.dz-finance-rank-cols .dz-finance-ranklist-title {
    font-size: 13px;
}

.dz-finance-rank-cols .dz-finance-ranklist-amt {
    font-size: 12px;
}

.dz-finance-rank-cols .dz-finance-ranklist-meta {
    display: none;
}

.dz-finance-band-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 12px;
}

.dz-finance-band-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 14px 12px;
    text-align: start;
    font: inherit;
    color: inherit;
    background: #FFF;
    border: 1px solid var(--divider);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dz-finance-band-card:hover:not(:disabled) {
    border-color: rgba(53, 0, 102, 0.22);
    box-shadow: 0 4px 14px rgba(42, 30, 20, 0.06);
}

.dz-finance-band-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dz-finance-band-card.is-selected {
    border-color: rgba(53, 0, 102, 0.4);
    background: rgba(53, 0, 102, 0.04);
    box-shadow: inset 0 0 0 1px rgba(53, 0, 102, 0.12);
}

.dz-finance-band-accent {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--band-accent, var(--brand));
}

.dz-finance-band-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    padding-inline-end: 4px;
}

.dz-finance-band-pct {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--band-accent, var(--brand-dark));
    font-variant-numeric: tabular-nums;
}

.dz-finance-band-amt {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dz-finance-band-meta {
    font-size: 11px;
    color: var(--muted);
}

.dz-finance-band-track {
    display: block;
    margin-top: 8px;
    height: 4px;
    border-radius: 999px;
    background: #F0EBE7;
    overflow: hidden;
}

.dz-finance-band-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--band-accent, var(--brand));
    transition: width 0.35s ease;
}

.dz-band-tone-1 { --band-accent: #6D28D9; }
.dz-band-tone-2 { --band-accent: #BE185D; }
.dz-band-tone-3 { --band-accent: #B45309; }
.dz-band-tone-4 { --band-accent: #1D4ED8; }
.dz-band-tone-guest { --band-accent: #64748B; }
.dz-band-tone-other { --band-accent: #78716C; }

.dz-finance-ranklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dz-finance-ranklist-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    text-align: start;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

button.dz-finance-ranklist-row:hover:not(:disabled) {
    background: rgba(53, 0, 102, 0.04);
    border-color: rgba(53, 0, 102, 0.1);
}

.dz-finance-ranklist-row.is-selected,
button.dz-finance-ranklist-row.is-selected {
    background: rgba(53, 0, 102, 0.07);
    border-color: rgba(53, 0, 102, 0.2);
}

.dz-finance-ranklist-row:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dz-finance-ranklist-rank {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(53, 0, 102, 0.07);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.dz-finance-ranklist-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

.dz-finance-ranklist-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.dz-finance-ranklist-title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.dz-finance-ranklist-stats {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dz-finance-ranklist-amt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.dz-finance-ranklist-pct {
    min-width: 3.2em;
    text-align: end;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.dz-finance-ranklist-track {
    height: 8px;
    border-radius: 999px;
    background: #F0EBE7;
    overflow: hidden;
}

.dz-finance-ranklist-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.35s ease;
}

.dz-finance-ranklist-fill.dz-tone-brand { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.dz-finance-ranklist-fill.dz-tone-teal { background: linear-gradient(90deg, #0F766E, #2DD4BF); }
.dz-finance-ranklist-fill.dz-tone-amber { background: linear-gradient(90deg, #B45309, #FBBF24); }
.dz-finance-ranklist-fill.dz-tone-rose { background: linear-gradient(90deg, #9F1239, #FB7185); }
.dz-finance-ranklist-fill.dz-tone-band-1 { background: linear-gradient(90deg, #5B21B6, #7C3AED); }
.dz-finance-ranklist-fill.dz-tone-band-2 { background: linear-gradient(90deg, #9D174D, #DB2777); }
.dz-finance-ranklist-fill.dz-tone-band-3 { background: linear-gradient(90deg, #92400E, #D97706); }
.dz-finance-ranklist-fill.dz-tone-band-4 { background: linear-gradient(90deg, #1E40AF, #2563EB); }
.dz-finance-ranklist-fill.dz-tone-guest { background: linear-gradient(90deg, #475569, #94A3B8); }
.dz-finance-ranklist-fill.dz-tone-other { background: linear-gradient(90deg, #78716C, #A8A29E); }

.dz-finance-ranklist-meta {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2;
}

.dz-finance-donut-chart-wrap,
.dz-finance-trend-wrap {
    position: relative;
    overflow: visible;
}

.dz-finance-tip {
    position: absolute;
    z-index: 5;
    min-width: 150px;
    max-width: 220px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #2A2622;
    color: #FFF;
    font-size: 12px;
    line-height: 1.7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.dz-finance-tip-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: #F3E9FB;
}

.dz-finance-tip-donut {
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}

.dz-finance-tip-anchor {
    top: 10px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.dz-finance-donut-seg {
    cursor: pointer;
    opacity: 0.92;
    transition: opacity 0.12s ease, filter 0.12s ease;
}

.dz-finance-donut-seg.is-active {
    opacity: 1;
    filter: brightness(1.08);
}

.dz-finance-donut-seg.is-dim {
    opacity: 0.38;
}

.dz-finance-legend li {
    cursor: default;
    border-radius: 8px;
    padding: 4px 6px;
    margin-inline-start: -6px;
    transition: background 0.12s ease;
}

.dz-finance-legend li.is-active {
    background: rgba(53, 0, 102, 0.06);
}

.dz-finance-trend-hits {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
}

.dz-finance-trend-hit {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    transform: translateX(-50%);
    border: 0;
    padding: 0;
    background: transparent;
    cursor: crosshair;
    pointer-events: auto;
}

.dz-finance-trend-guide {
    stroke-width: 1.2;
    stroke-dasharray: 3 3;
    opacity: 0.45;
}

.dz-finance-trend-bullets {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.dz-finance-trend-bullet {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid #FFFCFA;
    box-shadow: 0 0 0 1px rgba(42, 38, 34, 0.12);
    transform: translate(-50%, -50%);
    transition: width 0.12s ease, height 0.12s ease, box-shadow 0.12s ease;
}

.dz-finance-trend-bullet.is-active {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 2px rgba(53, 0, 102, 0.22);
}

.dz-finance-trend-dot.is-active {
    stroke: #fff;
    stroke-width: 1.5;
}

.dz-finance-empty {
    font-size: 13px;
    padding: 8px 0;
}

.dz-finance-donut {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
}

.dz-finance-donut-svg {
    width: 128px;
    height: 128px;
    flex-shrink: 0;
}

.dz-finance-donut-track {
    stroke: #EDE8E4;
}

.dz-finance-donut-center-value {
    font-size: 4.2px;
    font-weight: 700;
    fill: var(--text);
    font-family: var(--font-fa);
}

.dz-finance-donut-center-sub {
    font-size: 3px;
    fill: var(--muted);
    font-family: var(--font-fa);
}

.dz-finance-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dz-finance-legend li {
    display: grid;
    grid-template-columns: 10px 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
}

.dz-finance-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    grid-row: 1 / span 2;
}

.dz-finance-legend-title {
    font-size: 12px;
    font-weight: 600;
}

.dz-finance-legend-meta {
    font-size: 11px;
    color: var(--muted);
}

.dz-finance-hbars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dz-finance-hbar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dz-finance-hbar-head,
.dz-finance-hbar-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.dz-finance-hbar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.dz-finance-hbar-val {
    font-variant-numeric: tabular-nums;
    color: var(--text);
    flex-shrink: 0;
}

.dz-finance-hbar-foot {
    color: var(--muted);
    font-size: 11px;
}

.dz-finance-hbar-track {
    height: 8px;
    border-radius: 999px;
    background: #F0EBE7;
    overflow: hidden;
}

.dz-finance-hbar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.dz-finance-hbar-fill.dz-tone-brand { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.dz-finance-hbar-fill.dz-tone-teal { background: linear-gradient(90deg, #0F766E, #2DD4BF); }
.dz-finance-hbar-fill.dz-tone-amber { background: linear-gradient(90deg, #B45309, #FBBF24); }
.dz-finance-hbar-fill.dz-tone-rose { background: linear-gradient(90deg, #9F1239, #FB7185); }
.dz-finance-hbar-fill.dz-tone-band-1 { background: linear-gradient(90deg, #5B21B6, #7C3AED); }
.dz-finance-hbar-fill.dz-tone-band-2 { background: linear-gradient(90deg, #9D174D, #DB2777); }
.dz-finance-hbar-fill.dz-tone-band-3 { background: linear-gradient(90deg, #92400E, #D97706); }
.dz-finance-hbar-fill.dz-tone-band-4 { background: linear-gradient(90deg, #1E40AF, #2563EB); }
.dz-finance-hbar-fill.dz-tone-guest { background: linear-gradient(90deg, #475569, #94A3B8); }
.dz-finance-hbar-fill.dz-tone-other { background: linear-gradient(90deg, #78716C, #A8A29E); }

.dz-finance-trend {
    width: 100%;
}

.dz-finance-trend-svg {
    width: 100%;
    height: 160px;
    display: block;
}

.dz-finance-trend-grid {
    stroke: #EDE8E4;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.dz-finance-trend-dot {
    opacity: 0.9;
}

.dz-finance-trend-axis {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--muted);
}

.dz-finance-trend-peak {
    color: var(--brand-dark);
    font-weight: 600;
    text-align: center;
}

.dz-finance-section-hint {
    margin-inline-start: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.dz-finance-delta {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
}

.dz-finance-delta.is-up { color: #047857; }
.dz-finance-delta.is-down { color: #B91C1C; }
.dz-finance-delta.is-flat { color: var(--muted); }

.dz-finance-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.dz-finance-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.dz-finance-filter-dock {
    position: fixed;
    z-index: 60;
    inset-inline: 24px;
    bottom: 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.dz-finance-filter-dock-inner {
    pointer-events: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    max-width: min(960px, 100%);
    padding: 12px 16px;
    background: #FFFCFA;
    border: 1px solid rgba(53, 0, 102, 0.16);
    border-radius: 16px;
    box-shadow:
        0 12px 32px rgba(42, 30, 20, 0.14),
        0 2px 8px rgba(53, 0, 102, 0.08);
}

.dz-finance-filter-dock-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-dark);
    white-space: nowrap;
}

.dz-finance-filter-dock-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.dz-page-finance:has(.dz-finance-filter-dock),
.dz-page-finance.has-filter-dock {
    padding-bottom: 96px;
}

.dz-finance-filter-chip,
.dz-finance-filter-clear {
    appearance: none;
    border: 1px solid rgba(53, 0, 102, 0.18);
    background: #F3EAF9;
    color: var(--brand-dark);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.dz-finance-filter-clear {
    background: transparent;
    border-style: dashed;
    margin-inline-start: auto;
}

.dz-finance-filter-chip:disabled,
.dz-finance-filter-clear:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .dz-finance-filter-dock {
        inset-inline: 12px;
        bottom: 12px;
    }

    .dz-finance-filter-dock-inner {
        width: 100%;
        max-width: none;
        border-radius: 14px;
        padding: 12px;
    }

    .dz-finance-filter-clear {
        margin-inline-start: 0;
        width: 100%;
        text-align: center;
    }

    .dz-page-finance:has(.dz-finance-filter-dock),
    .dz-page-finance.has-filter-dock {
        padding-bottom: 140px;
    }
}

button.dz-finance-hbar-row {
    width: 100%;
    text-align: start;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 8px;
    margin: 0 -8px;
    cursor: pointer;
}

button.dz-finance-hbar-row:hover:not(:disabled) {
    background: rgba(53, 0, 102, 0.04);
    border-color: rgba(53, 0, 102, 0.1);
}

.dz-finance-hbar-row.is-selected,
button.dz-finance-hbar-row.is-selected {
    background: rgba(53, 0, 102, 0.08);
    border-color: rgba(53, 0, 102, 0.22);
}

.dz-finance-donut-seg.is-clickable,
.dz-finance-legend li.is-clickable {
    cursor: pointer;
}

.dz-finance-compare-setup {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-finance-scope-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    background: rgba(53, 0, 102, 0.04);
    font-size: 13px;
}

.dz-finance-scope-banner-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.dz-finance-scope-banner strong {
    color: var(--text);
}

.dz-finance-compare-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 10px 12px;
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    background: rgba(53, 0, 102, 0.04);
}

.dz-finance-compare-scope-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.dz-finance-compare-scope strong {
    font-size: 13px;
    color: var(--text);
}

.dz-finance-compare-scope-select {
    min-width: min(220px, 100%);
    flex: 1 1 180px;
}

.dz-finance-dim-group {
    margin-inline-start: 0;
    align-self: flex-start;
}

.dz-finance-compare-pickers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dz-finance-compare-grid.has-delta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dz-finance-compare-delta-card .dz-kpi-value.is-up {
    color: #15803D;
}

.dz-finance-compare-delta-card .dz-kpi-value.is-down {
    color: #C4392E;
}

.dz-finance-compare-side-label {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-dark);
}

.dz-finance-legion-pick {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 10px;
}

.dz-finance-compare-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
}

.dz-finance-compare-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dz-finance-swatch-line {
    display: inline-block;
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.dz-finance-gbars {
    width: 100%;
}

.dz-finance-gbar-groups {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px 10px;
    align-items: end;
    min-height: 200px;
}

.dz-finance-gbar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 4px 2px;
    border-radius: 8px;
}

.dz-finance-gbar-pair {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 140px;
}

.dz-finance-gbar-col {
    flex: 1 1 0;
    max-width: 36px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.dz-finance-gbar-track {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 6px 6px 2px 2px;
    background: rgba(53, 0, 102, 0.05);
    overflow: hidden;
}

.dz-finance-gbar-fill {
    width: 100%;
    border-radius: 6px 6px 2px 2px;
    min-height: 0;
    transition: height 0.35s ease;
}

.dz-finance-gbar-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-dark);
    text-align: center;
}

.dz-finance-gbar-vals {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.dz-finance-gbar-tip {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #F3EAF9;
    border: 1px solid rgba(53, 0, 102, 0.12);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text);
}

.dz-finance-gbar-delta {
    margin-inline-start: 6px;
    font-weight: 700;
}

.dz-finance-gbar-delta.is-up { color: #047857; }
.dz-finance-gbar-delta.is-flat { color: var(--muted); }

.dz-fin-cmp {
    width: 100%;
}

.dz-fin-cmp-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.dz-fin-cmp-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dz-fin-cmp-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 240px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dz-fin-cmp-chip i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dz-fin-cmp-chip.is-a {
    color: var(--brand-dark);
    background: rgba(53, 0, 102, 0.08);
    border: 1px solid rgba(53, 0, 102, 0.14);
}

.dz-fin-cmp-chip.is-a i { background: var(--brand); }

.dz-fin-cmp-chip.is-b {
    color: #0F766E;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.18);
}

.dz-fin-cmp-chip.is-b i { background: #0D9488; }

.dz-fin-cmp-hint {
    font-size: 11px;
    color: var(--muted);
}

.dz-fin-cmp-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dz-fin-cmp-row {
    display: grid;
    grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) minmax(220px, 300px);
    gap: 12px 16px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: linear-gradient(180deg, #FFFEFC 0%, #FBF7F3 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dz-fin-cmp-row.is-active {
    border-color: rgba(53, 0, 102, 0.28);
    box-shadow: 0 4px 14px rgba(53, 0, 102, 0.08);
}

.dz-fin-cmp-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-dark);
}

.dz-fin-cmp-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

.dz-fin-cmp-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.dz-fin-cmp-bar-line {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(72px, auto);
    gap: 8px;
    align-items: center;
}

.dz-fin-cmp-side-tag {
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.dz-fin-cmp-side-tag.is-a { color: var(--brand); }
.dz-fin-cmp-side-tag.is-b { color: #0D9488; }

.dz-fin-cmp-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(42, 38, 34, 0.06);
    overflow: hidden;
}

.dz-fin-cmp-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.dz-fin-cmp-fill.is-a {
    background: linear-gradient(90deg, #4C1D95, var(--brand));
}

.dz-fin-cmp-fill.is-b {
    background: linear-gradient(90deg, #0F766E, #2DD4BF);
}

.dz-fin-cmp-val {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: end;
    white-space: nowrap;
}

.dz-fin-cmp-val.is-a { color: var(--brand-dark); }
.dz-fin-cmp-val.is-b { color: #0F766E; }

.dz-fin-cmp-delta {
    text-align: end;
    min-width: 0;
}

.dz-fin-cmp-delta-main {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}

.dz-fin-cmp-delta-money {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    direction: ltr; /* ریال left · number right */
}

.dz-fin-cmp-delta-unit {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.85;
}

.dz-fin-cmp-delta-num {
    unicode-bidi: isolate;
}

.dz-fin-cmp-delta-sub {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Amber — distinct from brand purple (A) and teal (B) */
.dz-fin-cmp-delta.is-lead .dz-fin-cmp-delta-main { color: #B45309; }
.dz-fin-cmp-delta.is-flat .dz-fin-cmp-delta-main { color: var(--muted); }

.dz-finance-matrix-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dz-finance-matrix-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(53, 0, 102, 0.04);
    border: 1px solid rgba(53, 0, 102, 0.08);
}

.dz-finance-matrix-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dz-finance-matrix-legend-ico {
    color: var(--brand);
    opacity: 0.75;
}

.dz-finance-matrix-legend-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

.dz-finance-matrix-legend-scale {
    display: inline-flex;
    gap: 3px;
}

.dz-finance-matrix-legend-scale i {
    display: block;
    width: 18px;
    height: 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--brand) calc(var(--heat) * 55%), #F3EEE9);
}

.dz-finance-matrix-peak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--brand-dark);
    font-variant-numeric: tabular-nums;
}

.dz-finance-matrix-peak .mud-icon-root {
    color: var(--brand);
    font-size: 16px !important;
}

.dz-finance-matrix-peak strong {
    font-weight: 800;
}

.dz-finance-matrix-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px 6px;
}

.dz-finance-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    font-size: 12px;
    min-width: 640px;
}

.dz-finance-matrix th,
.dz-finance-matrix td {
    padding: 0;
    border: 0;
    text-align: center;
    vertical-align: middle;
}

.dz-finance-matrix thead th {
    background: transparent;
    font-weight: 700;
    color: var(--muted);
    padding: 0 0 4px;
    white-space: normal;
}

.dz-finance-matrix-axis {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.dz-finance-matrix-axis .mud-icon-root {
    font-size: 14px !important;
    color: var(--brand);
    opacity: 0.7;
}

.dz-finance-matrix-axis-sep {
    margin-inline: 6px;
    color: rgba(53, 0, 102, 0.3);
    font-weight: 700;
}

.dz-finance-matrix-colhead {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 84px;
    max-width: 112px;
    margin-inline: auto;
    padding: 4px 2px;
}

.dz-finance-matrix-colico {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 148, 136, 0.1);
    color: #0F766E;
}

.dz-finance-matrix-colico .mud-icon-root {
    font-size: 15px !important;
}

.dz-finance-matrix-colname {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
    max-height: 2.7em;
}

.dz-finance-matrix-colsub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
    max-height: 2.6em;
}

.dz-finance-matrix-corner {
    text-align: start !important;
    min-width: 188px;
    width: 188px;
    padding: 0 10px 8px 0 !important;
    background: transparent !important;
    white-space: nowrap;
}

.dz-finance-matrix tbody th {
    text-align: start;
    font-weight: 600;
    padding-inline-end: 8px;
    width: 188px;
    min-width: 188px;
    max-width: 188px;
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    background: linear-gradient(90deg, #FFFCFA 82%, rgba(255, 252, 250, 0.92) 100%);
}

html[dir="rtl"] .dz-finance-matrix tbody th,
.mud-application-layout-rtl .dz-finance-matrix tbody th {
    background: linear-gradient(270deg, #FFFCFA 82%, rgba(255, 252, 250, 0.92) 100%);
}

.dz-finance-matrix-rowhead {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 4px 2px;
    text-align: start;
}

.dz-finance-matrix-rowico {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(53, 0, 102, 0.08);
    color: var(--brand);
    margin-top: 1px;
}

.dz-finance-matrix-rowico .mud-icon-root {
    font-size: 15px !important;
}

.dz-finance-matrix-rowmeta {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dz-finance-matrix-rowname {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
    max-height: 2.8em;
}

.dz-finance-matrix-rowamt {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dz-finance-matrix tbody tr:hover td.has-value .dz-finance-matrix-cell {
    border-color: rgba(53, 0, 102, 0.22);
}

.dz-finance-matrix tbody tr:hover .dz-finance-matrix-rowname {
    color: var(--brand-dark);
}

.dz-finance-matrix td {
    min-width: 78px;
}

.dz-finance-matrix-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    padding: 8px 6px;
    border-radius: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    background: #F3EEE9;
    color: var(--muted);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.dz-finance-matrix-cell-val {
    letter-spacing: -0.01em;
}

.dz-finance-matrix td.has-value .dz-finance-matrix-cell {
    color: var(--brand-dark);
    background: color-mix(in srgb, var(--brand) calc(var(--heat, 0.35) * 42%), #FFF8F4);
    border-color: color-mix(in srgb, var(--brand) calc(var(--heat, 0.35) * 28%), transparent);
}

.dz-finance-matrix td.has-value:hover .dz-finance-matrix-cell {
    border-color: rgba(53, 0, 102, 0.32);
    box-shadow: 0 4px 12px rgba(53, 0, 102, 0.1);
    transform: translateY(-1px);
}

.dz-finance-matrix td.is-peak .dz-finance-matrix-cell {
    border-color: rgba(53, 0, 102, 0.35);
    box-shadow: inset 0 0 0 1px rgba(53, 0, 102, 0.12);
}

.dz-finance-matrix-peak-ico {
    color: #B45309 !important;
    font-size: 13px !important;
}

.dz-finance-matrix-cell.is-dash {
    font-weight: 500;
    background: rgba(243, 238, 233, 0.4);
    color: rgba(42, 38, 34, 0.28);
}

.dz-finance-matrix-cell.is-dash .mud-icon-root {
    font-size: 14px !important;
}

.dz-finance-matrix td.is-empty .dz-finance-matrix-cell {
    background: rgba(243, 238, 233, 0.4);
}

@media (max-width: 980px) {
    .dz-finance-kpi-grid,
    .dz-finance-kpi-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dz-finance-gbar-groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dz-fin-cmp-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dz-fin-cmp-delta {
        text-align: start;
        padding-top: 2px;
        border-top: 1px dashed rgba(53, 0, 102, 0.1);
    }

    .dz-finance-band-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dz-finance-rank-cols,
    .dz-finance-rank-cols.is-scoped {
        grid-template-columns: 1fr;
    }

    .dz-finance-local-filters {
        grid-template-columns: 1fr;
    }

    .dz-finance-compare-grid.has-delta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dz-finance-toolbar {
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dz-finance-chip-group {
        flex-shrink: 0;
        margin-inline-start: 8px;
        order: 0;
    }

    .dz-finance-chip {
        flex: 0 0 auto;
        text-align: center;
        padding: 7px 10px;
    }

    .dz-finance-range {
        width: auto;
        flex-wrap: nowrap;
    }

    .dz-finance-range-field {
        flex: 0 0 152px;
        width: 152px;
        max-width: 168px;
        min-width: 152px;
    }

    .dz-finance-scoped-branch {
        flex: 0 0 160px;
        width: 160px;
        min-width: 150px;
        max-width: 160px;
    }

    .dz-finance-apply {
        width: auto;
    }

    .dz-finance-donut-row,
    .dz-finance-compare-grid,
    .dz-finance-compare-pickers,
    .dz-finance-kpi-grid,
    .dz-finance-kpi-grid-3 {
        grid-template-columns: 1fr;
    }

    .dz-finance-gbar-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
    }

    .dz-finance-gbar-pair {
        height: 110px;
    }

    .dz-fin-cmp-bar-line {
        grid-template-columns: 24px minmax(0, 1fr) minmax(64px, auto);
    }

    .dz-finance-legion-pick {
        grid-template-columns: 1fr;
    }

    .dz-finance-band-grid {
        grid-template-columns: 1fr;
    }

    .dz-finance-band-pct {
        font-size: 22px;
    }

    .dz-finance-ranklist-top {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .dz-finance-ranklist-stats {
        justify-content: space-between;
        width: 100%;
    }

    .dz-finance-ranklist-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
