html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ikony mudblazor */
.mud-input-adornment .mud-icon-root,
.mud-input-adornment-icon,
.mud-icon-root {
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex: 0 0 auto !important;
    display: inline-block !important;
}

/* ----------------------------- */
/* GLOBALNY NOWOCZESNY WYGLĄD MUDTABLE */
/* ----------------------------- */

.mud-table-root {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
}

/* nagłówki */
.mud-table-head th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #444;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 12px;
    cursor: col-resize; /* pod resizable kolumny */
}

/* wiersze */
.mud-table-body tr {
    border-bottom: 1px solid #eee;
}

/* komórki */
.mud-table-body td {
    border-right: 1px solid #f1f1f1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

    .mud-table-body td:last-child {
        border-right: none;
    }

/* efekt hover */
.mud-table-body tr:hover {
    background-color: #f0f8ff;
    transition: background-color 0.2s ease-in-out;
}

/* pager */
.mud-table-pagination {
    background: #fafafa;
    border-top: 1px solid #ddd;
    padding: 6px 10px;
}

/* liczby wyrównane do prawej */
.mud-table-body td.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* --- RESIZABLE COLUMNS: uchwyt i sztywne layoutowanie --- */

/* 1) kolumny respektują szerokość (th/td) */
.mud-table-root {
    table-layout: fixed; /* absolutnie wymagane */
    width: 100%;
}

.mud-table-head th,
.mud-table-body td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 40px; /* sensowny minimum */
}

/* 2) uchwyt do resize po prawej krawędzi nagłówka */
.mud-table-head th {
    position: relative;
}

    .mud-table-head th::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        width: 10px;
        height: 100%;
        cursor: col-resize;
        background: linear-gradient(to right, transparent 0, transparent 7px, rgba(0,0,0,.08) 7px);
        opacity: .6;
    }

    .mud-table-head th:hover::after {
        opacity: .9;
    }

/* ----------------------------- */
/* STYL NOWOCZESNEGO PAGERa MudBlazor */
/* ----------------------------- */

.mud-table-pagination {
background: #fff;
border-top: 1px solid #e0e0e0;
padding: 12px 16px;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 0.85rem;
color: #555;
}

/* licznik stron */
.mud-table-pagination .mud-table-pagination-caption {
    font-size: 0.85rem;
    color: #666;
}

/* przyciski stronicowania */
.mud-table-pagination .mud-button-root {
    border-radius: 50%;
    min-width: 34px;
    height: 34px;
    margin: 0 3px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    transition: all 0.2s ease-in-out;
}

.mud-table-pagination .mud-button-root:hover {
    background: #e9f5ff;
    border-color: #bbb;
}

.mud-table-pagination .mud-button-root.mud-disabled {
    opacity: 0.4;
    background: #fafafa;
    cursor: not-allowed;
}

/* select Rows per page */
.mud-table-pagination .mud-select {
    font-size: 0.85rem;
    min-width: 70px;
}


/* === SUDOP – KOLORY GLOBALNE === */
:root {
    --brand-primary: #2B3164;
    --sidebar-top: #212653;
    --sidebar-bot: #2b3164;
    --sidebar-text: #EAE9FF;
}

/* APPBAR */
.sudop-appbar {
    background: var(--brand-primary) !important;
    color: #2B3164 !important;
}

    .sudop-appbar .mud-icon-button,
    .sudop-appbar .mud-icon-root {
        color: #fff !important;
    }

/* DRAWER (pewniaki: ID + brak selektora >, obejmuje różne warianty DOM) */
#sudop-drawer .mud-drawer-paper {
    background: linear-gradient(180deg, var(--sidebar-top) 0%, var(--sidebar-bot) 100%) !important;
    color: var(--sidebar-text) !important;
    box-shadow: inset -1px 0 0 rgba(108,76,241,.25) !important;
}

/* Teksty/linki/ikony w sidebarze */
#sudop-drawer .nav-link,
#sudop-drawer .mud-nav-link,
#sudop-drawer .navbar-brand,
#sudop-drawer i,
#sudop-drawer .mud-icon-root {
    color: var(--sidebar-text) !important;
}

    /* Hover/active */
    #sudop-drawer .nav-link:hover,
    #sudop-drawer .mud-nav-link:hover,
    #sudop-drawer .mud-nav-link.active {
        background: rgba(255,255,255,.10) !important;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.06) !important;
        border-radius: 10px;
    }

/* Mini wariant – ukrycie etykiet */
#sudop-drawer .label.hide {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity .15s,width .15s;
}

/* Akcenty MudBlazor w kolorze brandu (reszta aplikacji) */
.mud-button-filled-primary,
.mud-chip-filled-primary,
.mud-radio-checked .mud-radio-icons,
.mud-switch-checked .mud-switch-track,
.mud-switch-checked .mud-switch-thumb,
.mud-checkbox-checked .mud-checkbox-icon {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.mud-button-outlined-primary:hover {
    border-color: var(--brand-primary) !important;
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

.mud-input:focus-within .mud-input-slot:before,
.mud-select:focus-within .mud-input-slot:before {
    border-bottom-color: var(--brand-primary) !important;
}

.mud-input:focus-within .mud-input-slot:after,
.mud-select:focus-within .mud-input-slot:after {
    border-bottom-color: var(--brand-primary) !important;
}

a, .mud-link {
    color: var(--brand-primary);
}

    a:hover, .mud-link:hover {
        color: #5b3de0;
    }

/* Przesunięcie "Sudop Manager" do lewej w headerze sidebara */
.sudop-nav .top-row {
    text-align: center; /* nadpisuje ewentualne centrowanie */
    padding-left: 0;
    padding-right: 0;
}

    .sudop-nav .top-row .container-fluid {
        display: flex;
        justify-content: flex-start; /* elementy od lewej */
        padding-left: 12px; /* opcjonalny odstęp jak wcześniej */
    }

.sudop-brand {
    margin: 0 !important; /* usuń auto-centrowanie marginesami */
    text-align: left;
    justify-content: flex-start; /* dla inline-flex z ikonką */
}
