/* ── Global reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', Roboto, sans-serif;
    background: #F5F7FA;
    -webkit-font-smoothing: antialiased;
}

/* ── MudTable overrides ──────────────────────────────────────── */
.mud-table-head .mud-table-cell {
    font-size: .72rem !important;
    font-weight: 600 !important;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: #EEF4FB !important;
    color: #37474F !important;
    border-bottom: 2px solid #c5d5e8 !important;
    white-space: nowrap;
    padding: 6px 10px !important;
}

.mud-table-body .mud-table-row:hover td {
    background: #EEF4FB !important;
}

.mud-table-body .mud-table-cell {
    padding: 5px 10px !important;
    border-bottom: 1px solid #EDF2F7 !important;
}

.mud-table-foot .mud-table-cell {
    padding: 6px 10px !important;
    background: #F0F7FF !important;
    border-top: 2px solid #c5d5e8 !important;
    font-weight: 700 !important;
}

/* ── Form fields compact ─────────────────────────────────────── */
.mud-input-control .mud-input-label {
    font-size: .78rem;
}

.mud-input.mud-input-outlined.mud-input-dense {
    font-size: .84rem;
}

/* ── Dialog ──────────────────────────────────────────────────── */
.mud-dialog {
    border-radius: 12px !important;
}

.mud-dialog-content {
    padding: 16px 24px !important;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

/* ── Nav drawer ──────────────────────────────────────────────── */
.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 8px !important;
}

.mud-nav-link.active {
    background: rgba(21, 101, 192, .12) !important;
    color: #1565C0 !important;
    font-weight: 600 !important;
}

/* ── Chips compact ───────────────────────────────────────────── */
.mud-chip-content {
    font-size: .72rem;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C5D5E8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #90A4AE; }

.mud-dialog .mud-tabs-tabbar {
    background: #f0f4fa !important;
    border-bottom: 2px solid #c5d5e8 !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 4px 4px 0 4px !important;
    height: auto !important;
    min-height: unset !important;
    flex-wrap: wrap !important;
}

/* Вътрешният flex контейнер на таб бутоните */
.mud-dialog .mud-tabs-tabbar > .mud-tabs-tabbar-inner,
.mud-dialog .mud-tabs-tabbar .mud-tabs-scroll-button-wrapper,
.mud-dialog .mud-tabs-tabbar > div {
    flex-wrap: wrap !important;
    height: auto !important;
}

.mud-dialog .mud-tab {
    font-size: .68rem !important;
    font-weight: 500 !important;
    letter-spacing: .3px !important;
    text-transform: none !important;
    min-width: 68px !important;
    max-width: 96px !important;
    padding: 4px 6px !important;
    min-height: 54px !important;   /* по-висок за 2 реда */
    height: auto !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    border-radius: 6px 6px 0 0 !important;
    border: 1px solid transparent !important;
    border-bottom: none !important;
    margin: 0 1px !important;
    transition: background .15s, border-color .15s !important;
    color: #546E7A !important;
    /* flex колона: икона горе, текст долу */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
}

/* Span-ът с текста на таба */
.mud-dialog .mud-tab > span,
.mud-dialog .mud-tab .mud-tab-text {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.2 !important;
    display: block !important;
}

.mud-dialog .mud-tab .mud-icon-root {
    font-size: .95rem !important;
    flex-shrink: 0 !important;
}

.mud-dialog .mud-tab:hover {
    background: #dce8f7 !important;
    color: #1565C0 !important;
}

.mud-dialog .mud-tab.mud-tab-active,
.mud-dialog .mud-tab[aria-selected="true"] {
    background: #ffffff !important;
    border-color: #c5d5e8 !important;
    border-bottom-color: #ffffff !important;
    color: #1565C0 !important;
    font-weight: 700 !important;
}

.mud-dialog .mud-tab-slider {
    display: none !important;
}

.mud-dialog .mud-tabs-panels {
    background: #ffffff;
    border: 1px solid #c5d5e8;
    border-top: none;
    border-radius: 0 0 8px 8px;
}


/* MudBlazor 8 – wrap tabs onto multiple rows */
.mud-dialog .mud-tabs-tabbar .mud-tabs-tabbar-content {
    flex-wrap: wrap !important;
    height: auto !important;
    overflow: visible !important;
}

.mud-dialog .mud-tabs-tabbar .mud-tabs-tabbar-content > .mud-tab-strip {
    flex-wrap: wrap !important;
    height: auto !important;
}



/* ── Login page – center input text ── */
.login-field input {
    text-align: center !important;
}
