html, body {
    font-family: 'Vazirmatn', Tahoma, 'Helvetica', 'Arial', sans-serif;
    background: #f5f7fb;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#blazor-error-ui {
    background: #fef2f2;
    color: #9f403d;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    inset-inline-start: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    inset-inline-end: 0.75rem;
    top: 0.5rem;
}

/* ── Login page ── */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b5394 0%, #1565c0 45%, #42a5f5 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.4);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0b5394, #1565c0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
}

.login-brand-sub {
    font-size: 0.75rem;
    color: #64748b;
}

/* ── Main layout polish ── */
.partner-appbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eef0f5;
}

.partner-breadcrumb {
    color: #64748b;
    font-size: 0.85rem;
    margin-inline-start: 12px;
}

.partner-breadcrumb-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.partner-breadcrumb-current {
    color: #1e293b;
    font-weight: 600;
}

.partner-sidebar {
    border-inline-end: 1px solid #eef0f5;
    background: #ffffff;
}

.partner-sidebar-brand {
    padding: 20px 24px 14px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner-sidebar-brand-tag {
    font-size: 0.7rem;
    color: #0b5394;
    font-weight: 700;
    padding: 2px 8px;
    background: #e8f0fa;
    border-radius: 999px;
}

.partner-section-label {
    padding: 12px 24px 4px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
}

.partner-kpi-card {
    background: #ffffff;
    border: 1px solid #eef0f5;
    border-radius: 16px;
    padding: 20px;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.partner-kpi-card:hover {
    box-shadow: 0 16px 30px -20px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.partner-kpi-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.partner-kpi-value {
    margin-top: 6px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
}

.partner-kpi-hint {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #64748b;
}

.partner-empty {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}

.partner-empty-icon {
    color: #94a3b8;
    margin-bottom: 8px;
}

/* ── RTL helpers ── */
/* Codes, IDs, IBANs, URLs and e-mail addresses stay left-to-right inside RTL text. */
.ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* Directional icons (arrows / chevrons) point the reading direction in RTL. */
[dir='rtl'] .rtl-flip {
    transform: scaleX(-1);
}

/* Platform logo (white round badge, readable on light and dark surfaces) */
.platform-logo {
    display: inline-block;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

/* MudBlazor pads adorned inputs with physical left/right (built for LTR), so
   under RTL the text touched the field's edge. Swap the sides. */
html[dir="rtl"] .mud-input-outlined.mud-input-adorned-start > input { padding-left: 14px; padding-right: 0; }
html[dir="rtl"] .mud-input-outlined.mud-input-adorned-end > input { padding-left: 0; padding-right: 14px; }
