

.pms-tabs {
    border-radius: 18px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.pms-tabs-panel {
    padding: 18px !important;
    background: var(--mud-palette-surface);
}

.pms-tabs .mud-tabs-toolbar {
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-divider);
}

.pms-tabs .mud-tab {
    min-height: 54px;
    color: var(--mud-palette-text-secondary);
    font-weight: 800;
    text-transform: none;
}

    .pms-tabs .mud-tab.mud-tab-active {
        color: #7C3AED;
    }

.pms-tabs .mud-tabs-slider {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    height: 3px;
    border-radius: 999px;
}

.pms-card-title .mud-typography-h6 {
        font-weight: 900;
        color: var(--mud-palette-text-primary);
        line-height: 1.1;
    }

    .pms-card-title .mud-typography-caption {
        color: var(--mud-palette-text-secondary);
        font-weight: 600;
    }


.pms-tabs-panel .pms-card-content {
    padding: 18px;
    display: flex;
    /* flex-start (not center) — some fields have HelperText under them and are taller than
       others; centering by row height made the shorter fields' inputs drift out of line with
       the taller ones'. Top-aligning keeps every input box level regardless of helper text. */
    align-items: flex-start;
    gap: 10px;
}

/* The add/edit forms now live in modal dialogs, which MudBlazor teleports out of .pms-tabs-panel
   to the dialog provider root — so the field layout must be re-declared for dialog content. Inside
   the dialog every field goes full-width in a single clean column (matching the reference design),
   regardless of the MudItem sm-* widths used for the old inline card layout. */
.mud-dialog .pms-card-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 4px 0;
}

    .mud-dialog .pms-card-content > .mud-grid-item {
        max-width: 100%;
        flex: 0 0 auto;
        padding: 0;
    }

    /* "Активен" stays a compact chip on the left, not a full-width row. */
    .mud-dialog .pms-check-box {
        width: fit-content;
        margin-top: 4px;
    }

/* Toolbar above each tab's table that holds the "Добавить …" button (replaces the old inline
   form card at the top of the tab). */
.pms-tab-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.pms-check-box {
    /* Matches MudBlazor's own .mud-input-control.mud-input-outlined-with-label rule
       (margin-top: 8px) — every outlined+labelled field around it reserves exactly this
       much space above its border, so this is the real value, not an eyeballed guess. */
    margin-top: 8px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 14px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-divider);
}
    .pms-check-box span{
        padding: 7px;
    }

    .pms-form-actions {
        margin-top: 4px;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

.pms-primary-button {
    height: 40px;
    padding: 0 20px !important;
    border-radius: 12px !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    text-transform: none !important;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA) !important;
    box-shadow: 0 10px 24px rgba(139, 92, 246, .28);
    white-space: nowrap;
}

    .pms-primary-button:hover {
        box-shadow: 0 14px 30px rgba(139, 92, 246, .36);
    }

.pms-secondary-button {
    height: 40px;
    padding: 0 18px !important;
    border-radius: 12px !important;
    color: #7C3AED !important;
    font-weight: 700 !important;
    text-transform: none !important;
    background: rgba(139, 92, 246, .08) !important;
    white-space: nowrap;
}

    .pms-secondary-button:hover {
        background: rgba(139, 92, 246, .14) !important;
    }

.pms-data-table {
    margin-bottom: 10px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

    .pms-data-table .mud-table-head {
        background: linear-gradient(135deg, rgba(139, 92, 246, .08), rgba(167, 139, 250, .04));
    }

.pms-data-table .mud-table-head .mud-table-cell {
        color: var(--mud-palette-text-secondary);
        font-weight: 900;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .04em;
        white-space: nowrap;
    }

    .pms-data-table .mud-table-body .mud-table-cell {
        color: var(--mud-palette-text-secondary);
        font-weight: 500;
        vertical-align: middle;
    }

    .pms-data-table .mud-table-row:hover {
        background: rgba(139, 92, 246, .035) !important;
    }

.pms-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

    .pms-name-cell strong {
        color: var(--mud-palette-text-primary);
        font-weight: 900;
    }

.pms-name-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7C3AED;
    background: rgba(139, 92, 246, .10);
    border: 1px solid rgba(139, 92, 246, .16);
}

.pms-code-chip,
.pms-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-divider);
    font-weight: 800;
    white-space: nowrap;
}

.pms-status-chip {
    color: #7C3AED;
    background: rgba(139, 92, 246, .08);
    border-color: rgba(139, 92, 246, .18);
}

.pms-active-chip,
.pms-inactive-chip {
    min-width: 64px;
    justify-content: center;
    border-radius: 999px !important;
    font-weight: 800 !important;
}

.pms-active-chip {
    color: #15803D !important;
    background: rgba(34, 197, 94, .12) !important;
    border: 1px solid rgba(34, 197, 94, .25);
}

.pms-inactive-chip {
    color: var(--mud-palette-text-secondary) !important;
    background: var(--mud-palette-background-gray) !important;
    border: 1px solid var(--mud-palette-divider);
}

.pms-edit-action-button {
    height: 34px;
    padding: 0 12px !important;
    border-radius: 10px !important;
    color: #7C3AED !important;
    background: rgba(139, 92, 246, .08) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    white-space: nowrap;
}

    .pms-edit-action-button:hover {
        background: rgba(139, 92, 246, .14) !important;
    }

@media (max-width: 1200px) {
    .pms-data-table {
        overflow-x: auto;
    }

        .pms-data-table .mud-table-root {
            min-width: 980px;
        }
}

@media (max-width: 960px) {
    .pms-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pms-primary-button,
    .pms-secondary-button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .pms-page-header {
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .pms-page-header-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }

    .pms-tabs-panel {
        padding: 14px !important;
    }

    .pms-card-content {
        padding: 14px;
    }

    .pms-card-title {
        padding: 14px;
    }
}
