/* AUTOMATIC BASELINE: MainLayout2 owns master-control-theme, not individual pages.
   Low specificity lets semantic variants, validation, disabled states and local designs win.
   Never infer action intent from button text or recolour destructive actions as success. */
.master-control-theme {
    font-family: "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
    color: #17324e;
}
.master-control-theme :where(.mud-typography, .mud-input, .mud-input-label, .mud-button-root, .mud-table-root) { font-family: inherit; }
.master-control-theme :where(.mud-input-outlined, .mud-input-filled) { border-radius: 10px; font-size: .92rem; }
.master-control-theme :where(.mud-input-control) { min-width: 0; }
.master-control-theme :where(.mud-input-outlined-border) { border-color: #cad9e9; }
.master-control-theme :where(.mud-input-helper-text) { font-size: .76rem; }
.master-control-theme :where(.mud-button-root:not(.mud-icon-button):not(.mud-fab)) { border-radius: 9px; text-transform: none; font-weight: 600; }
.master-control-theme :where(.mud-button-filled-primary, .mud-button-filled-success) { box-shadow: 0 3px 10px #00856620; }
.master-control-theme :where(.mud-card, .mud-table) { border-radius: 14px; }
.master-control-theme :where(.mud-table) { border: 1px solid #d9e5f1; }
.master-control-theme :where(.mud-table-container) { overflow-x: auto; max-width: 100%; }
.master-control-theme .mud-table-head .mud-table-cell { background: #eef5ff; color: #285898; font-weight: 650; }
.master-control-theme :where(.mud-table-cell) { font-size: .85rem; border-color: #e6edf5; }
.master-control-theme :where(.mud-table-body .mud-table-row:nth-child(even)) { background-color: #f9fbff; }
.master-control-theme :where(.mud-table-hover .mud-table-body .mud-table-row:hover) { background-color: #edf5ff; }
.master-control-theme :where(.mud-chip) { border-radius: 8px; }
.master-control-theme :where(.mud-checkbox, .mud-radio) { font-family: inherit; }
.master-control-theme :where(.mud-button-root:focus-visible) { outline: 3px solid #3978e8; outline-offset: 3px; }

/* Table Toolbar Baseline */
.master-control-theme :where(.mud-table-toolbar) {
    min-height: 64px;
    padding: 12px 16px;
    background: #ffffff;
}

/* Grid Row Action Buttons: Circular with Soft Pastel Backgrounds across ALL master grids */
.master-control-theme .mud-table-cell .mud-fab,
.master-control-theme .mud-table-cell .master-row-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    margin: 2px !important;
    box-shadow: none !important;
}

.master-control-theme .mud-table-cell .mud-fab .mud-icon-root,
.master-control-theme .mud-table-cell .master-row-button .mud-icon-root {
    font-size: 18px !important;
    color: inherit !important;
}

/* View / Info: Soft Blue circle */
.master-control-theme .mud-table-cell .mud-fab.mud-fab-info,
.master-control-theme .mud-table-cell .master-row-view {
    background: #e2edff !important;
    color: #245ed3 !important;
}
.master-control-theme .mud-table-cell .mud-fab.mud-fab-info:hover,
.master-control-theme .mud-table-cell .master-row-view:hover {
    background: #cfe1ff !important;
}

/* Edit / Tertiary: Soft Amber circle */
.master-control-theme .mud-table-cell .mud-fab.mud-fab-tertiary,
.master-control-theme .mud-table-cell .master-row-edit {
    background: #fff1ca !important;
    color: #936000 !important;
}
.master-control-theme .mud-table-cell .mud-fab.mud-fab-tertiary:hover,
.master-control-theme .mud-table-cell .master-row-edit:hover {
    background: #ffe8a7 !important;
}

/* Delete / Secondary / Error / Default: Soft Red circle */
.master-control-theme .mud-table-cell .mud-fab.mud-fab-secondary,
.master-control-theme .mud-table-cell .mud-fab.mud-fab-error,
.master-control-theme .mud-table-cell .mud-fab.mud-fab-default,
.master-control-theme .mud-table-cell .master-row-delete {
    background: #ffe5e9 !important;
    color: #bd304a !important;
}
.master-control-theme .mud-table-cell .mud-fab.mud-fab-secondary:hover,
.master-control-theme .mud-table-cell .mud-fab.mud-fab-error:hover,
.master-control-theme .mud-table-cell .mud-fab.mud-fab-default:hover,
.master-control-theme .mud-table-cell .master-row-delete:hover {
    background: #ffd0d9 !important;
}

@media (max-width: 600px) {
    .master-control-theme :where(.mud-table-toolbar) { flex-wrap: wrap; height: auto; gap: 10px; }
    .master-control-theme :where(.mud-table-pagination-toolbar) { flex-wrap: wrap; height: auto; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .master-control-theme :where(.mud-button-root) { transition: none; }
}

