@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Thin.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-ThinItalic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-ThinItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Light.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-LightItalic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Regular.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Italic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Medium.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-MediumItalic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Bold.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-BoldItalic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-Black.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cera Pro';
    src: url('../fonts/CeraPro/CeraPro-BlackItalic.woff') format('woff'),
        url('../fonts/CeraPro/CeraPro-BlackItalic.ttf') format('truetype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

html, body {
    font-family: 'Cera Pro', Helvetica, Arial, sans-serif;
}

.pms-back-link {
    margin: 60px 0 12px 0 !important;
    padding: 0 !important;
    color: #7C3AED !important;
    font-weight: 700 !important;
    text-transform: none !important;
}

/* Accounting reports (Кассовый отчёт, Реализация, Расходы) — chip row showing the breakdown
   total (by payment method / charge type / category) above the detail table. */
.report-totals-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.report-debt-cell {
    color: #dc2626;
    font-weight: 800;
}

.report-clickable-row {
    cursor: pointer;
}
/* ---------------------------------------------------------------------- */
/* Shared across multiple pages — consolidated here instead of being       */
/* duplicated identically in every per-page CSS file.                      */
/* ---------------------------------------------------------------------- */

.camp-occupancy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.camp-occupancy span {
    font-weight: 800;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.camp-occupancy-bar {
    flex: 1;
    border-radius: 999px;
}

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

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

.dictionary-form-actions {
    display: flex;
    align-items: center;
}

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

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

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

.dictionary-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);
}

.dictionary-row-actions, .dictionary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dictionary-sort-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    min-width: 42px;
    color: #7C3AED;
    background: rgba(139, 92, 246, .08);
    border: 1px solid rgba(139, 92, 246, .18);
    font-weight: 800;
    white-space: nowrap;
}

.dictionary-switch-cell {
    display: flex;
    align-items: center;
    min-height: 38px;
}

.pms-access-dialog {
    border-radius: 20px !important;
    overflow: hidden;
}

.pms-access-dialog .mud-checkbox .mud-icon-root {
    color: #8B5CF6 !important;
}

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

.pms-card-title {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(139, 92, 246, .08), rgba(167, 139, 250, .04));
    border-bottom: 1px solid var(--mud-palette-divider);
}

/* Small icon badge in a card/section title. Consolidated here — was duplicated identically across
   many per-page CSS files. (Reservation/detail.css keeps its own smaller 32px override.) */
.pms-card-title-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 0;
    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-data-table .mud-table-cell {
        border-bottom: 1px solid var(--mud-palette-divider);
    }

.pms-dialog-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 0;
}

.pms-dialog-subtitle {
    margin-top: 5px;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.pms-dialog-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 4px 0;
}

.pms-dialog-title-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    box-shadow: 0 10px 24px rgba(139, 92, 246, .26);
}

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

.pms-empty-alert {
    border-radius: 16px;
    background: rgba(139, 92, 246, .08) !important;
    color: #6D28D9 !important;
    border: 1px solid rgba(139, 92, 246, .16);
    font-weight: 600;
}

.pms-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pms-filter-card {
    padding: 18px;
}

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

.pms-form-card {
    margin-bottom: 20px;
    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-group-title {
    margin-bottom: 12px;
    color: var(--mud-palette-text-primary);
    font-weight: 900;
}

.pms-info-alert {
    border-radius: 16px;
    background: rgba(139, 92, 246, .08) !important;
    color: #6D28D9 !important;
    border: 1px solid rgba(139, 92, 246, .16);
    font-weight: 600;
}

.pms-input {
    background: var(--mud-palette-surface);
    border-radius: 14px;
}

.pms-loader-card {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    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);
}

.pms-loader-card-main {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pms-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 20px 0;
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.pms-page-header-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    box-shadow: 0 12px 28px rgba(139, 92, 246, .28);
}

.pms-page-subtitle {
    color: var(--mud-palette-text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

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

.pms-permission-group {
    padding: 16px;
    border-radius: 18px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

.pms-permissions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pms-primary-button, .pms-primary-small-button, .pms-outline-small-button {
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    white-space: nowrap;
}

.pms-primary-small-button {
    height: 34px;
    padding: 0 14px !important;
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA) !important;
    box-shadow: 0 8px 18px rgba(139, 92, 246, .22);
}

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

.pms-section-subtitle {
    color: var(--mud-palette-text-secondary);
    margin-top: 4px;
    font-weight: 600;
}

.pms-sort-input {
    min-width: 110px;
}

.pms-table-input {
    min-width: 170px;
    background: var(--mud-palette-surface);
    border-radius: 12px;
}

.pms-toolbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #7C3AED;
    background: rgba(139, 92, 246, .08);
    border: 1px solid rgba(139, 92, 246, .18);
    font-weight: 900;
    white-space: nowrap;
}

.settings-card-content {
    height: 100%;
    min-height: 116px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 14px;
    padding: 20px !important;
    position: relative;
    z-index: 1;
}

.settings-card-text {
    min-width: 0;
}

/* ── Shared modal header (PmsDialogTitle) ─────────────────────────────────────────
   Icon badge + title + subtitle on a light-purple bar; matches the "Добавить
   сотрудника" dialog. Bleeds to the edges of MudDialog's title area so the bar
   spans the whole header behind the close button. */
.mud-dialog-title:has(.pms-dialog-header) {
    background: rgba(139, 92, 246, .08);
    border-bottom: 1px solid rgba(139, 92, 246, .12);
    /* Flat, square bottom edge — the bar spans the full header width with a straight line. */
    border-radius: 0;
    margin: 0;
    padding: 16px 20px;
}

.pms-dialog-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 12px;
    width: 100%;
}

/* Dialog action buttons — same look everywhere as the reference screenshot:
   "Отмена" a soft light-purple, the primary a purple gradient. */
.pms-dialog-cancel {
    height: 42px;
    padding: 0 20px;
    border-radius: 12px;
    color: #7C3AED;
    font-weight: 700;
    text-transform: none;
    background: rgba(139, 92, 246, .08);
}

    .pms-dialog-cancel:hover {
        background: rgba(139, 92, 246, .16);
    }

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

    .pms-dialog-submit:hover {
        box-shadow: 0 12px 28px rgba(139, 92, 246, .36);
    }

.pms-dialog-header-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7C3AED;
    background: rgba(139, 92, 246, .12);
    border: 1px solid rgba(139, 92, 246, .18);
}

.pms-dialog-header-text {
    min-width: 0;
}

.pms-dialog-header-title {
    font-weight: 900;
    line-height: 1.15;
    color: var(--mud-palette-text-primary);
}

.pms-dialog-header-subtitle {
    display: block;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
    line-height: 1.2;
}

/* Top bar on pages whose secondary filters moved into a right-side FilterDrawer: the primary
   "Объект" select stays on the left, the "Фильтры" launch button + reset sit on the right. */
.pms-filter-launch-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

    .pms-filter-launch-bar .pms-filter-object {
        width: 280px;
        max-width: 42%;
    }

.pms-filter-launch-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* .mud-popover is position:absolute with no positioned ancestor wrapping it (MudBlazor portals it
   straight into the popover provider), so a percentage min-width here resolves against the
   viewport, not the select's own trigger width — that's why "min-width:100%" used to blow this
   popover up to nearly the full window instead of sizing to its (usually much narrower) content.
   MudBlazor already sets its own inline min-width matching the trigger; width:max-content alone
   is enough to let long item content (e.g. a tariff name + pricing chip) widen it past that. */
.pms-select-popover-auto { width: max-content !important; max-width: 90vw !important; }
