/* ============================================================
   FONTES MONOESPAÇADAS DO APPGERMED
   ------------------------------------------------------------
   Os arquivos ficam em:
       AppGermed.Client/wwwroot/fonts/

   O Editor usa exatamente os mesmos TTFs que o PDF utiliza na API.
   ============================================================ */

@font-face {
    font-family: "Roboto Mono";
    src: url("../fonts/RobotoMono-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Mono";
    src: url("../fonts/RobotoMono-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Mono";
    src: url("../fonts/RobotoMono-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Roboto Mono";
    src: url("../fonts/RobotoMono-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("../fonts/DejaVuSansMono.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("../fonts/DejaVuSansMono-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("../fonts/DejaVuSansMono-Oblique.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("../fonts/DejaVuSansMono-BoldOblique.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

/* ============================================================
   AppGermed Components UI
   Identidade Visual 2026
   ------------------------------------------------------------
   Responsável por componentes visuais globais MudBlazor:
   - Inputs / TextFields / NumericFields
   - Select / Autocomplete / MultiSelect
   - DatePicker / TimePicker
   - CheckBox / Switch
   - Chips
   - Totalizadores / Valores
   - Estruturas reutilizáveis de formulários
   - Cabeçalhos e rodapés internos de páginas

   Não colocar aqui:
   - MainLayout / NavMenu
   - Login / AppBar
   - Estrutura geral do Shell
   - Dashboards específicos
   ============================================================ */

/* ============================================================
   01) TOKENS DO COMPONENTE
   ============================================================ */

:root {
    --ag-comp-primary: #5B4BDF;
    --ag-comp-primary-dark: #3b38c8;
    --ag-comp-primary-soft: #eef4ff;
    --ag-comp-primary-selected: #dbe6ff;
    --ag-comp-text: #111827;
    --ag-comp-muted: #6b7280;
    --ag-comp-border: #d1d5db;
    --ag-comp-border-focus: #5B4BDF;
    --ag-comp-bg-hover: #f8fafc;
    --ag-comp-readonly-bg: #f3f4f6;
    --ag-comp-warning-bg: #fff8e6;
    --ag-comp-warning-bg-hover: #fff3d1;
    --ag-comp-radius: 12px;
    --ag-comp-transition: all .16s ease-in-out;
}

/* ============================================================
   02) TEXTFIELD / NUMERICFIELD / INPUTS GLOBAIS
   ============================================================ */

.mud-input-control .mud-input-slot,
.mud-input-control input,
.mud-input-control textarea,
.mud-select-input,
.mud-autocomplete-input {
    font-weight: 750 !important;
    color: var(--ag-comp-text) !important;
}

.mud-input-label {
    font-weight: 650 !important;
    color: #4b5563 !important;
}

.mud-input-control:focus-within .mud-input-label {
    color: var(--ag-comp-primary) !important;
    font-weight: 800 !important;
}

.mud-input-control .mud-input-outlined-border,
.mud-input-control .mud-field-outline {
    transition: var(--ag-comp-transition);
}

.mud-input-control:hover .mud-input-outlined-border,
.mud-input-control:hover .mud-field-outline {
    border-color: #9ca3af !important;
}

.mud-input-control:focus-within .mud-input-outlined-border,
.mud-input-control:focus-within .mud-field-outline {
    border-color: var(--ag-comp-border-focus) !important;
}

.mud-input-root.mud-disabled input,
.mud-input-root.mud-disabled textarea,
.mud-input-root.mud-disabled .mud-select-input,
.mud-input-root.mud-disabled .mud-autocomplete-input,
.mud-input-root input[readonly],
.mud-input-root textarea[readonly],
.mud-input-root .mud-select-input[readonly] {
    font-weight: 750 !important;
    color: var(--ag-comp-text) !important;
    -webkit-text-fill-color: var(--ag-comp-text) !important;
}

.mud-input-root.mud-disabled,
.mud-input-control .mud-input-root:has(input[readonly]),
.mud-input-control .mud-input-root:has(textarea[readonly]) {
    background-color: var(--ag-comp-readonly-bg) !important;
}

/* ============================================================
   03) SELECT / AUTOCOMPLETE / MULTISELECT GLOBAL
   ============================================================ */

.mud-popover .mud-list {
    padding: 4px 0 !important;
    scrollbar-width: thin;
}

    .mud-popover .mud-list .mud-list-item {
        min-height: 46px !important;
        padding: 8px 14px !important;
        color: #374151 !important;
        font-weight: 650 !important;
        border-left: 4px solid transparent !important;
        transition: var(--ag-comp-transition);
    }

        .mud-popover .mud-list .mud-list-item:hover {
            background: #f6f8ff !important;
            border-left-color: #8da2ff !important;
            color: #1f2937 !important;
            transform: translateX(2px);
        }

        .mud-popover .mud-list .mud-list-item.mud-selected-item,
        .mud-popover .mud-list .mud-list-item[aria-selected="true"] {
            background: linear-gradient(90deg, var(--ag-comp-primary-selected) 0%, #eef3ff 100%) !important;
            color: var(--ag-comp-primary-dark) !important;
            font-weight: 850 !important;
            border-left: 5px solid var(--ag-comp-primary) !important;
            box-shadow: inset 0 0 0 1px rgba(91,75,223,.12), inset 0 0 18px rgba(91,75,223,.05);
        }

        .mud-popover .mud-list .mud-list-item .mud-typography {
            font-weight: inherit !important;
        }

        .mud-popover .mud-list .mud-list-item.mud-selected-item .mud-typography,
        .mud-popover .mud-list .mud-list-item[aria-selected="true"] .mud-typography {
            color: var(--ag-comp-primary-dark) !important;
            font-weight: 850 !important;
        }

    .mud-popover .mud-list::-webkit-scrollbar {
        width: 7px;
    }

    .mud-popover .mud-list::-webkit-scrollbar-track {
        background: #f8fafc;
    }

    .mud-popover .mud-list::-webkit-scrollbar-thumb {
        background: #c7d2fe;
        border-radius: 999px;
    }

        .mud-popover .mud-list::-webkit-scrollbar-thumb:hover {
            background: #a5b4fc;
        }

/* Ícone circular no hover/focus de Select/Autocomplete */

.mud-input-control:hover .mud-input-adornment-end,
.mud-input-control:focus-within .mud-input-adornment-end {
    background: #eef0f3 !important;
    border-radius: 999px !important;
    min-width: 48px !important;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: -6px !important;
}

    .mud-input-control:hover .mud-input-adornment-end .mud-icon-root,
    .mud-input-control:focus-within .mud-input-adornment-end .mud-icon-root {
        color: var(--ag-comp-muted) !important;
    }

    .mud-input-control:hover .mud-input-adornment-end .mud-icon-button,
    .mud-input-control:focus-within .mud-input-adornment-end .mud-icon-button {
        background: transparent !important;
    }

/* ============================================================
   04) DATEPICKER / TIMEPICKER
   ============================================================ */

.mud-picker .mud-picker-toolbar {
    background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%) !important;
    color: var(--ag-comp-primary-dark) !important;
}

.mud-picker .mud-picker-calendar .mud-button-root,
.mud-picker .mud-picker-content .mud-button-root {
    font-weight: 700 !important;
}

.mud-picker .mud-picker-calendar .mud-selected,
.mud-picker .mud-picker-content .mud-selected {
    background-color: var(--ag-comp-primary) !important;
    color: #ffffff !important;
    font-weight: 850 !important;
}

.mud-picker .mud-picker-calendar .mud-button-root:hover,
.mud-picker .mud-picker-content .mud-button-root:hover {
    background-color: var(--ag-comp-primary-soft) !important;
}

/* ============================================================
   05) CHECKBOX / RADIO / SWITCH
   ============================================================ */

.mud-checkbox .mud-icon-button,
.mud-radio .mud-icon-button {
    transition: var(--ag-comp-transition);
}

.mud-checkbox:hover .mud-icon-button,
.mud-radio:hover .mud-icon-button {
    background-color: var(--ag-comp-primary-soft) !important;
}

.mud-checkbox .mud-typography,
.mud-radio .mud-typography,
.mud-switch .mud-typography {
    font-weight: 700 !important;
    color: #374151 !important;
}

.mud-checkbox .mud-icon-root,
.mud-radio .mud-icon-root {
    font-size: 1.35rem !important;
}

.mud-switch .mud-switch-track {
    transition: var(--ag-comp-transition);
}

.mud-switch:hover .mud-switch-track {
    filter: brightness(.98);
}

/* ============================================================
   06) CHIPS
   ============================================================ */

.mud-chip {
    font-weight: 750 !important;
    border-radius: 999px !important;
}

    .mud-chip.mud-chip-size-small {
        min-height: 24px !important;
        font-size: .72rem !important;
    }

    .mud-chip.mud-chip-variant-outlined {
        border-width: 1.5px !important;
    }

/* ============================================================
   06.1) STATUS DOS PROCEDIMENTOS / AMOSTRAS / GUIAS
   Utilizado por:
   - Atendimento
   - Gestão de Amostras
   - Gestão de Apoio
   ============================================================ */

.ag-status-chip {
    width: 78px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .6px;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.ag-status-warning {
    background: #FFF8DD !important;
    border-color: #F0C040 !important;
    color: #8A6A00 !important;
}

.ag-status-success {
    background: #EAFBF0 !important;
    border-color: #34A853 !important;
    color: #1E6A31 !important;
}

.ag-status-info {
    background: #EAF4FF !important;
    border-color: #3A86FF !important;
    color: #0F4FA8 !important;
}

.ag-status-secondary {
    background: #F3EDFF !important;
    border-color: #8B5CF6 !important;
    color: #6B21A8 !important;
}

.ag-status-orange {
    background: #FFF2E8 !important;
    border-color: #FF9800 !important;
    color: #C85A00 !important;
}

.ag-status-error {
    background: #FFECEC !important;
    border-color: #E53935 !important;
    color: #B71C1C !important;
}

.ag-status-default {
    background: #F4F4F5 !important;
    border-color: #C7C7C7 !important;
    color: #555555 !important;
}

/* ============================================================
   07) BOTÕES
   ------------------------------------------------------------
   Sem estilo global para MudButton.
   Os botões continuam controlados pelas páginas e pelo MudBlazor.
   ============================================================ */

/* ============================================================
   08) TOTALIZADORES / VALORES / CAMPOS FINANCEIROS
   ============================================================ */

.ag-totalizadores,
.atp-create-totalizadores {
    padding: 20px 12px 12px 12px !important;
    border-top: 1px solid rgba(17, 24, 39, .12) !important;
}

    .ag-totalizadores > div,
    .atp-create-totalizadores > div {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(120px, 1fr)) !important;
        gap: 12px !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .ag-totalizadores .mud-input-control,
    .atp-create-totalizadores .mud-input-control {
        width: 100% !important;
        margin: 0 !important;
    }

    .ag-totalizadores .mud-field,
    .atp-create-totalizadores .mud-field {
        min-height: 56px !important;
        height: 56px !important;
        display: flex !important;
        align-items: center !important;
    }

    .ag-totalizadores .mud-input-slot,
    .atp-create-totalizadores .mud-input-slot {
        font-weight: 800 !important;
    }

.ag-valor-editavel .mud-input-root,
.ag-valor-editavel .mud-field,
.atp-create-financeiro-editavel .mud-input-root,
.atp-create-financeiro-editavel .mud-field {
    background-color: var(--ag-comp-warning-bg) !important;
}

    .ag-valor-editavel .mud-input-root:hover,
    .ag-valor-editavel .mud-field:hover,
    .atp-create-financeiro-editavel .mud-input-root:hover,
    .atp-create-financeiro-editavel .mud-field:hover {
        background-color: var(--ag-comp-warning-bg-hover) !important;
    }

.ag-valor-readonly .mud-input-root,
.ag-valor-readonly .mud-field {
    background-color: #f8fafc !important;
}

.ag-valor-negativo input,
.ag-valor-negativo .mud-input-slot {
    color: #dc2626 !important;
    -webkit-text-fill-color: #dc2626 !important;
    font-weight: 850 !important;
}

.ag-valor-positivo input,
.ag-valor-positivo .mud-input-slot {
    color: #047857 !important;
    -webkit-text-fill-color: #047857 !important;
    font-weight: 850 !important;
}

@media (max-width: 1366px) {
    .ag-totalizadores > div,
    .atp-create-totalizadores > div {
        grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .ag-totalizadores > div,
    .atp-create-totalizadores > div {
        grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .ag-totalizadores > div,
    .atp-create-totalizadores > div {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   09) UTILITÁRIOS VISUAIS DE COMPONENTES
   ============================================================ */

.ag-component-muted {
    color: var(--ag-comp-muted) !important;
}

.ag-component-strong {
    font-weight: 850 !important;
}

.ag-outline-field {
    border: 1px solid rgba(0,0,0,.23);
    border-radius: 4px;
    transition: var(--ag-comp-transition);
}

    .ag-outline-field:hover {
        border-color: #111827;
    }

/* ============================================================
   BOTÕES DE AÇÃO AO LADO DOS CAMPOS
   Utilizar:
   MudItem  -> Class="ag-field-action"
   MudButton -> Class="ag-field-action-button"
   ============================================================ */

.ag-field-action {
    display: flex;
    align-items: flex-end;
}

.ag-field-action-button {
    width: 100%;
    height: 56px;
    margin-bottom: 1px;
}

/* ============================================================
   10) CAMPO SOMENTE LEITURA (AZUL)
   Utilizar: Class="ag-field-readonly"
   ============================================================ */

.ag-field-readonly .mud-field {
    background: #eef2ff !important;
    border-radius: 4px !important;
}

.ag-field-readonly input,
.ag-field-readonly textarea,
.ag-field-readonly .mud-input-slot {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 800 !important;
}

.ag-field-readonly .mud-input-label {
    color: #4b5563 !important;
    font-weight: 700 !important;
}


/* ============================================================
   11) CAMPO DESABILITADO (CINZA)
   Utilizar: Class="ag-field-disabled"
   ============================================================ */

.ag-field-disabled .mud-field {
    background: #f3f4f6 !important;
    border-radius: 4px !important;
}

.ag-field-disabled input,
.ag-field-disabled textarea,
.ag-field-disabled .mud-input-slot {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    font-weight: 700 !important;
}

.ag-field-disabled .mud-input-label {
    color: #9ca3af !important;
    font-weight: 700 !important;
}

/* ============================================================
   12) ATENDIMENTO PACIENTE
   Cabeçalho, container e rodapé das telas de inclusão/edição
   ============================================================ */

.ag-atendimento-container {
    width: 100%;
    padding: 8px 16px 16px;
}

.ag-atendimento-edit-shell {
    width: 100%;
    margin: 0;
    padding: 16px;
    overflow: visible;
}


/* ------------------------------------------------------------
   12.1) Cabeçalho da página
   ------------------------------------------------------------ */

.ag-atendimento-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    gap: 24px;
}

.ag-atendimento-page-header__title {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
}

.ag-atendimento-page-header__avatar {
    flex: 0 0 auto;
    margin-right: 12px;
}

.ag-atendimento-page-header__title-text {
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.ag-atendimento-page-header__content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
}

.ag-atendimento-page-header__field {
    flex: 0 0 auto;
    min-width: 0;
}

.ag-atendimento-page-header__field--empresa {
    width: 320px;
}

.ag-atendimento-page-header__field--data {
    width: 150px;
}

.ag-atendimento-page-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 8px;
    white-space: nowrap;
}

    .ag-atendimento-page-header__actions .mud-button-root {
        min-height: 40px;
    }

.ag-atendimento-page-header__divider {
    margin-top: 14px;
    margin-bottom: 8px;
}


/* ------------------------------------------------------------
   12.2) Rodapé da página
   ------------------------------------------------------------ */

.ag-atendimento-footer {
    width: 100%;
    margin-top: 20px;
}

.ag-atendimento-footer__divider {
    margin-bottom: 18px;
}

.ag-atendimento-footer__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    padding-bottom: 4px;
}


/* ------------------------------------------------------------
   12.3) Responsividade
   ------------------------------------------------------------ */

@media (max-width: 1600px) {
    .ag-atendimento-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ag-atendimento-edit-shell {
        padding: 14px;
    }

    .ag-atendimento-page-header {
        gap: 18px;
    }

    .ag-atendimento-page-header__field--empresa {
        width: 280px;
    }

    .ag-atendimento-page-header__field--data {
        width: 142px;
    }
}

@media (max-width: 1366px) {
    .ag-atendimento-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ag-atendimento-page-header__content {
        width: 100%;
        flex-basis: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ag-atendimento-page-header__field--empresa {
        flex: 1 1 280px;
        width: auto;
    }

    .ag-atendimento-page-header__field--data {
        flex: 0 1 150px;
        width: 150px;
    }

    .ag-atendimento-page-header__actions {
        margin-left: auto;
    }
}

@media (max-width: 960px) {
    .ag-atendimento-container {
        padding: 8px;
    }

    .ag-atendimento-edit-shell {
        padding: 12px;
    }

    .ag-atendimento-page-header {
        gap: 14px;
    }

    .ag-atendimento-page-header__content {
        flex-wrap: wrap;
    }

    .ag-atendimento-page-header__field--empresa {
        width: 100%;
        flex-basis: 100%;
    }

    .ag-atendimento-page-header__field--data {
        flex: 1 1 180px;
        width: auto;
    }

    .ag-atendimento-page-header__actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .ag-atendimento-page-header__title-text {
        font-size: 1.5rem;
    }

    .ag-atendimento-page-header__field--data {
        width: 100%;
        flex-basis: 100%;
    }

    .ag-atendimento-page-header__actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

        .ag-atendimento-page-header__actions .mud-button-root,
        .ag-atendimento-footer__actions .mud-button-root {
            flex: 1 1 0;
        }

    .ag-atendimento-footer__actions {
        align-items: stretch;
        flex-wrap: wrap;
    }
}

/* ------------------------------------------------------------
   12.4) Grid de procedimentos do Atendimento
   ------------------------------------------------------------ */

/*
   Coluna APOIO
   ------------------------------------------------------------
   Mantém o MudSelect no padrão do MudBlazor, com:
   - texto alinhado à esquerda;
   - conteúdo centralizado verticalmente;
   - seta fixa à direita;
   - largura contida dentro da coluna INFO.
*/

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-header,
.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-cell {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-header {
    text-align: center !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-cell {
    padding-left: 5px !important;
    padding-right: 5px !important;
    vertical-align: middle !important;
    overflow: hidden !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-select-compacto,
.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-select-compacto > .mud-input-control,
.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-apoio-select-compacto .mud-input-root {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    box-sizing: border-box !important;
}

    /*
   Estrutura interna do select:
   texto à esquerda e seta à direita.
*/
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto .mud-input-slot {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
        padding: 0 2px !important;
        overflow: hidden !important;
    }

    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto .mud-select-input {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        padding-left: 10px !important;
        padding-right: 4px !important;
        margin: 0 !important;
        text-align: left !important;
        line-height: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /*
   Neutraliza somente nessa combo compacta o adornment circular
   global de 48px. A seta continua visível no padrão MudBlazor.
*/
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto .mud-input-adornment-end,
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto:hover .mud-input-adornment-end,
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto:focus-within .mud-input-adornment-end,
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto .mud-input-control:hover .mud-input-adornment-end,
    .ag-atendimento-edit-shell
    .ag-procedimentos-grid
    .ag-apoio-select-compacto .mud-input-control:focus-within .mud-input-adornment-end {
        position: static !important;
        flex: 0 0 24px !important;
        width: 24px !important;
        min-width: 24px !important;
        height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
    }

        .ag-atendimento-edit-shell
        .ag-procedimentos-grid
        .ag-apoio-select-compacto
        .mud-input-adornment-end .mud-icon-button {
            width: 24px !important;
            min-width: 24px !important;
            height: 32px !important;
            padding: 4px !important;
            margin: 0 !important;
            background: transparent !important;
        }

/*
   Descrição do exame
   ------------------------------------------------------------
   Mantém espaço suficiente para a coluna APOIO sem quebrar a grid.
*/

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-procedimento-descricao-cell,
.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-procedimento-descricao-header {
    max-width: 228px;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-procedimento-descricao-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   13) DIGITAÇÃO DE RESULTADOS
   ============================================================ */
.ag-result-page {
    height: calc(100vh - 96px);
    min-height: 640px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden
}

.ag-result-page-header {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 2px 4px 0
}

.ag-result-header-identity {
    grid-template-columns: 126px 1px minmax(260px,1fr) 1px 180px 1px 128px !important;
    min-height: 58px !important;
    padding: 6px 12px !important
}

.ag-result-header-actions, .ag-result-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap
}

.ag-result-summary {
    display: grid;
    grid-template-columns: repeat(6,minmax(110px,1fr));
    gap: 8px
}

.ag-result-summary-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 9px;
    background: #fff
}

    .ag-result-summary-item strong {
        font-size: 1rem
    }

    .ag-result-summary-item span {
        color: var(--ag-comp-muted);
        font-size: .72rem
    }

.ag-result-body {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 280px minmax(0,1fr);
    border: 1px solid rgba(148,163,184,.26);
    border-radius: 12px;
    overflow: hidden;
    background: #fff
}

    .ag-result-body.with-context {
        grid-template-columns: 280px minmax(0,1fr) 330px
    }

.ag-result-exams {
    min-height: 0;
    padding: 10px;
    border-right: 1px solid rgba(148,163,184,.22);
    background: #fbfcfe;
    overflow: hidden
}

.ag-result-main {
    min-width: 0;
    min-height: 0;
    overflow: auto
}

.ag-result-context {
    min-width: 0;
    min-height: 0;
    border-left: 1px solid rgba(148,163,184,.22);
    background: #fbfcfe;
    overflow: auto
}

    .ag-result-context.is-hidden {
        display: none
    }

.ag-result-context-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(148,163,184,.22)
}

.ag-result-context-body {
    padding: 12px
}

.ag-result-sidebar {
    height: 100%;
    min-height: 0
}

.ag-result-sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px
}

    .ag-result-sidebar-head > div {
        display: flex;
        flex-direction: column
    }

    .ag-result-sidebar-head span {
        color: var(--ag-comp-muted);
        font-size: .72rem
    }

.ag-result-exam-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 !important;
    padding: 0 3px 3px 0;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden
}

.ag-result-exam-item {
    width: 100%;
    min-height: 60px;
    border: 1px solid rgba(148,163,184,.30);
    border-radius: 9px;
    padding: 5px 8px;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) 18px;
    gap: 7px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition: var(--ag-comp-transition)
}

    .ag-result-exam-item:hover {
        border-color: rgba(91,75,223,.35);
        filter: brightness(.99)
    }

    .ag-result-exam-item.is-selected {
        border-color: var(--ag-comp-primary);
        box-shadow: inset 3px 0 0 var(--ag-comp-primary)
    }

    .ag-result-exam-item.is-disabled {
        /*
           Exames históricos/finalizados continuam bloqueados para edição,
           porém as cores do status permanecem 100% visíveis para o usuário.
           O bloqueio funcional continua sendo controlado pela página/componente.
        */
        opacity: 1 !important;
        filter: none !important;
    }

.ag-result-exam--warning {
    background: #FFF8DD
}

.ag-result-exam--info {
    background: #EAF4FF
}

.ag-result-exam--default {
    background: #F4F4F5
}

.ag-result-exam--error {
    background: #FFECEC
}

.ag-result-exam--secondary {
    background: #F3EDFF
}

.ag-result-status-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px
}

    .ag-result-status-visual .ag-status-chip {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        border-radius: 999px !important;
        padding: 0 !important
    }

        .ag-result-status-visual .ag-status-chip .mud-icon-root {
            font-size: 16px !important
        }

.ag-result-status-code {
    font-size: .60rem;
    font-weight: 900;
    line-height: 1
}

.ag-result-exam-title strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    font-size: .80rem;
    font-weight: 850
}

.ag-result-exam-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
    color: var(--ag-comp-muted);
    font-size: .64rem
}

.ag-result-status-result {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.ag-result-exam-open {
    display: flex;
    align-items: center;
    justify-content: center
}

.ag-result-exam-progress {
    height: 3px !important;
    margin-top: 4px
}

.ag-result-editor {
    min-width: 0;
    min-height: 100%
}

.ag-result-editor-head {
    display: grid;
    grid-template-columns: minmax(260px,.85fr) minmax(360px,1.05fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 74px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(148,163,184,.22)
}

.ag-result-editor-identification {
    min-width: 0
}

.ag-result-editor-subtitle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
    color: var(--ag-comp-muted);
    font-size: .72rem;
}

    /*
   Cabeçalho da digitação:
   o subtítulo não utiliza separadores verticais nem pseudo-elementos.
   Esta regra também neutraliza estilos antigos existentes em componentes.
*/
    .ag-result-editor-subtitle > span {
        padding-right: 0 !important;
        border-right: 0 !important;
    }

        .ag-result-editor-subtitle > span::before,
        .ag-result-editor-subtitle > span::after {
            content: none !important;
            display: none !important;
        }

.ag-result-exam-context {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--ag-comp-muted);
    font-size: .72rem
}

    .ag-result-exam-context strong {
        color: #4b5563;
        font-weight: 800
    }

.ag-result-exam-support {
    color: #5e35b1;
    font-weight: 750
}

.ag-result-groups {
    padding: 10px 14px 16px
}

.ag-result-group {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 10px;
    background: #fff
}

.ag-result-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 12px;
    background: #fbfcfe;
    border-bottom: 1px solid rgba(148,163,184,.20)
}

    .ag-result-group-head > div {
        display: flex;
        flex-direction: column
    }

    .ag-result-group-head span {
        color: var(--ag-comp-muted);
        font-size: .72rem
    }

.ag-result-field {
    display: grid;
    grid-template-columns: minmax(145px,15%) 82px 32px minmax(440px,1fr) minmax(205px,21%) 34px;
    align-items: center;
    gap: 7px;
    min-height: 60px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(148,163,184,.18)
}

    .ag-result-field:last-child {
        border-bottom: 0
    }

.ag-result-field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0
}

    .ag-result-field-label strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #263238;
        font-size: .80rem;
        font-weight: 850
    }

.ag-result-field-type {
    min-width: 0
}

.ag-result-type-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
    font-size: .71rem;
    font-weight: 750
}

.ag-result-type-code-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start
}

.ag-result-type-code {
    width: 28px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c7d2fe;
    border-radius: 5px;
    background: #fff;
    color: #4338ca;
    font-size: .70rem;
    font-weight: 900
}

.ag-result-field-input {
    min-width: 0;
    width: 100%
}

/* ------------------------------------------------------------
   13.1) CAMPOS EDITÁVEIS DA DIGITAÇÃO DE RESULTADOS
   ------------------------------------------------------------
   Padrão único para campos simples, observação/texto livre,
   observação/conclusão, múltiplos resultados e repetitivos/dinâmicos
   (ex.: Isolado / Antibiograma).

   Todos utilizam .ag-result-entry-shell.
   ------------------------------------------------------------ */

.ag-result-entry-shell {
    border-left: 3px solid #60a5fa !important;
    border-radius: 6px !important;
    background: linear-gradient( 135deg, rgba(219, 234, 254, .62) 0%, rgba(239, 246, 255, .44) 48%, rgba(255, 255, 255, .96) 100%) !important;
    transition: background .16s ease-in-out, border-color .16s ease-in-out, box-shadow .16s ease-in-out !important;
}

    .ag-result-entry-shell:hover {
        border-left-color: #4f7df3 !important;
        background: linear-gradient( 135deg, rgba(219, 234, 254, .76) 0%, rgba(239, 246, 255, .54) 48%, rgba(255, 255, 255, .98) 100%) !important;
    }

    .ag-result-entry-shell:focus-within {
        border-left-color: var(--ag-comp-primary) !important;
        background: linear-gradient( 135deg, rgba(219, 234, 254, .86) 0%, rgba(239, 246, 255, .62) 48%, rgba(255, 255, 255, 1) 100%) !important;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .14), 0 4px 14px rgba(59, 130, 246, .06) !important;
    }

    .ag-result-entry-shell .mud-input-root,
    .ag-result-entry-shell .mud-field {
        background: transparent !important;
    }

/* Containers externos dos resultados múltiplos e repetitivos.
   É este fundo que aparece em Isolado / Antibiótico. */
.ag-repeat-card,
.ag-result-multi-item {
    background: linear-gradient( 135deg, rgba(219, 234, 254, .62) 0%, rgba(239, 246, 255, .44) 48%, rgba(255, 255, 255, .96) 100%) !important;
    border-color: rgba(96, 165, 250, .38) !important;
    transition: background .16s ease-in-out, border-color .16s ease-in-out, box-shadow .16s ease-in-out !important;
}

    .ag-repeat-card:hover,
    .ag-result-multi-item:hover {
        background: linear-gradient( 135deg, rgba(219, 234, 254, .76) 0%, rgba(239, 246, 255, .54) 48%, rgba(255, 255, 255, .98) 100%) !important;
        border-color: rgba(79, 125, 243, .46) !important;
    }

    .ag-repeat-card:focus-within,
    .ag-result-multi-item:focus-within {
        background: linear-gradient( 135deg, rgba(219, 234, 254, .86) 0%, rgba(239, 246, 255, .62) 48%, rgba(255, 255, 255, 1) 100%) !important;
        border-color: var(--ag-comp-primary) !important;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .14), 0 4px 14px rgba(59, 130, 246, .06) !important;
    }

.ag-result-number input {
    text-align: right;
    font-weight: 800
}

.ag-result-readonly {
    width: 100%
}

.ag-result-field-reference-value {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15
}

.ag-result-reference-caption {
    color: var(--ag-comp-muted);
    font-size: .62rem;
    text-transform: uppercase
}

.ag-result-reference-text {
    white-space: normal;
    overflow-wrap: anywhere;
    color: #374151;
    font-size: .73rem;
    font-weight: 650
}

.ag-result-field-history {
    display: flex;
    justify-content: center
}

.ag-result-notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px
}

.ag-result-note-box {
    min-height: 110px;
    padding: 10px;
    border: 1px solid rgba(148,163,184,.30);
    border-radius: 8px
}

.ag-result-empty, .ag-result-empty-model {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ag-comp-muted)
}

@media(max-width:1600px) {
    .ag-result-page-header {
        gap: 10px
    }

    .ag-result-header-identity {
        grid-template-columns: 116px 1px minmax(230px,1fr) 1px 160px 1px 118px !important
    }

    .ag-result-body {
        grid-template-columns: 260px minmax(0,1fr)
    }

        .ag-result-body.with-context {
            grid-template-columns: 260px minmax(0,1fr) 300px
        }

    .ag-result-editor-head {
        grid-template-columns: minmax(220px,.80fr) minmax(300px,1fr) auto;
        gap: 10px
    }

    .ag-result-field {
        grid-template-columns: minmax(125px,14%) 74px 30px minmax(300px,1fr) minmax(170px,20%) 32px
    }
}

@media(max-width:1366px) {
    .ag-result-page-header {
        grid-template-columns: 1fr
    }

    .ag-result-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap
    }

    .ag-result-header-identity {
        grid-template-columns: 108px 1px minmax(220px,1fr) 1px 150px 1px 112px !important
    }

    .ag-result-summary {
        grid-template-columns: repeat(3,minmax(110px,1fr))
    }

    .ag-result-body {
        grid-template-columns: 240px minmax(0,1fr)
    }

        .ag-result-body.with-context {
            grid-template-columns: 240px minmax(0,1fr) 280px
        }

    .ag-result-editor-head {
        grid-template-columns: minmax(220px,.80fr) minmax(260px,1fr);
    }

    .ag-result-editor-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap
    }

    .ag-result-field {
        grid-template-columns: minmax(120px,14%) 72px 28px minmax(260px,1fr) minmax(160px,20%) 30px
    }
}

@media(max-width:1050px) {
    .ag-result-page {
        height: auto;
        min-height: 0;
        overflow: visible
    }

    .ag-result-page-header, .ag-result-editor-head {
        grid-template-columns: 1fr
    }

    .ag-result-editor-actions {
        grid-column: auto
    }

    .ag-result-header-actions, .ag-result-editor-actions {
        justify-content: flex-start;
        flex-wrap: wrap
    }

    .ag-result-summary {
        grid-template-columns: repeat(3,minmax(110px,1fr))
    }

    .ag-result-body, .ag-result-body.with-context {
        grid-template-columns: 230px minmax(0,1fr)
    }

    .ag-result-context {
        display: none
    }

    .ag-result-field {
        grid-template-columns: minmax(120px,14%) 70px 28px minmax(220px,1fr) minmax(150px,20%) 30px
    }
}

@media(max-width:760px) {
    .ag-result-header-identity {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px
    }

        .ag-result-header-identity > .mud-divider {
            display: none
        }

    .ag-result-summary {
        grid-template-columns: repeat(2,minmax(100px,1fr))
    }

    .ag-result-body, .ag-result-body.with-context, .ag-result-field {
        grid-template-columns: 1fr
    }

    .ag-result-exams {
        border-right: 0;
        border-bottom: 1px solid rgba(148,163,184,.22)
    }

    .ag-result-exam-list {
        max-height: 260px
    }

    .ag-result-notes {
        grid-template-columns: 1fr
    }
}

@media(max-width:520px) {
    .ag-result-header-identity,
    .ag-result-summary {
        grid-template-columns: 1fr !important
    }

    .ag-result-header-actions,
    .ag-result-editor-actions {
        gap: 6px
    }

    .ag-result-groups,
    .ag-result-context-body {
        padding-left: 8px;
        padding-right: 8px
    }
}


/* ============================================================
   14) MANUTENÇÕES LONGAS / FOCO VISUAL DE EDIÇÃO
   ------------------------------------------------------------
   Uso:
   - Container do formulário: Class="ag-maintenance-form"
   - Bloco/seção: Class="ag-maintenance-focus"
   - Seção grande: adicionar "ag-maintenance-focus--section"
   - Campo compacto: adicionar "ag-maintenance-focus--field"

   Padrão reutilizável para qualquer módulo.
   ============================================================ */

.ag-maintenance-form .ag-maintenance-focus {
    position: relative;
    border-radius: 10px;
    transition: background .18s ease-in-out, box-shadow .18s ease-in-out, border-color .18s ease-in-out;
}

    .ag-maintenance-form .ag-maintenance-focus:focus-within {
        background: linear-gradient( 135deg, rgba(219, 234, 254, .62) 0%, rgba(239, 246, 255, .44) 48%, rgba(255, 255, 255, .96) 100%);
        box-shadow: 0 0 0 1px rgba(59, 130, 246, .16), 0 7px 20px rgba(59, 130, 246, .07);
    }

        .ag-maintenance-form .ag-maintenance-focus:focus-within::before {
            content: "";
            position: absolute;
            top: 8px;
            bottom: 8px;
            left: 0;
            width: 3px;
            border-radius: 999px;
            background: linear-gradient( 180deg, #60a5fa 0%, var(--ag-comp-primary) 100%);
            opacity: .90;
        }

        .ag-maintenance-form
        .ag-maintenance-focus:focus-within
        .mud-input-control:focus-within
        .mud-input-outlined-border,
        .ag-maintenance-form
        .ag-maintenance-focus:focus-within
        .mud-input-control:focus-within
        .mud-field-outline {
            border-color: #4f7df3 !important;
            border-width: 2px !important;
        }

        .ag-maintenance-form
        .ag-maintenance-focus:focus-within
        .mud-input-control:focus-within
        .mud-input-label {
            color: #315dd8 !important;
        }

.ag-maintenance-focus--section {
    padding: 10px 12px;
}

.ag-maintenance-focus--field {
    padding: 5px 7px;
}


/* ============================================================
   13) ATENDIMENTO PACIENTE - ESTILOS CONSOLIDADOS DAS PÁGINAS
   Origem: Razor atuais de 20/09/2026.
   Mantidos no final para preservar a precedência que os <style>
   locais possuíam sobre os estilos globais.
   ============================================================ */


/* ---------- AtendimentoPacCreate(20260920-002435).razor ---------- */
.ag-atendimento-edit-shell .ag-atendimento-status-icone {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    line-height: 1 !important;
}

    .ag-atendimento-edit-shell .ag-atendimento-status-icone .mud-icon-root {
        font-size: 20px !important;
    }
/* 105 - Resultado Assinado/Enviado ao Apoio */
.ag-atendimento-edit-shell .ag-status-darkpurple {
    background: #ede9fe !important;
    border-color: #5b21b6 !important;
    color: #4c1d95 !important;
}
/* Inclusão: aproxima o resumo do título, no mesmo padrão operacional do Edit. */
.ag-create-resumo-row {
    margin-top: -10px;
}

.ag-atendimento-resumo-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(132px, 1.15fr) minmax(78px, .70fr) minmax(260px, 3.60fr) minmax(136px, 1.20fr) minmax(136px, 1.20fr) minmax(88px, .80fr) minmax(88px, .80fr);
    gap: 12px;
    align-items: stretch;
}

    .ag-atendimento-resumo-grid > div {
        min-width: 0;
    }

.ag-create-exames-card {
    width: 100%;
    padding: 14px;
    border-radius: 12px !important;
    border-color: rgba(25, 118, 210, .22) !important;
    background: linear-gradient(180deg, rgba(239,246,255,.55) 0%, #ffffff 34%);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}

.ag-create-exames-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

@@media (max-width: 1050px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: span 2;
        }
}

@@media (max-width: 760px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: 1 / -1;
        }
}

@@media (max-width: 520px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: 1fr;
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: auto;
        }
}

.ag-atendimento-edit-shell .mud-table-cell {
    vertical-align: middle;
}

/* =========================================================
           PAINEL LATERAL DAS ABAS
           ========================================================= */

.ag-atendimento-edit-shell .ag-tabs-vertical {
    border: 1px solid #d8dde5;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .06);
}

    .ag-atendimento-edit-shell .ag-tabs-vertical > .mud-tabs-tabbar {
        min-width: 188px;
        padding: 10px 8px;
        background: #fbfcfe;
        border-right: 1px solid #d8dde5;
    }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab {
        width: 100%;
        min-height: 47px;
        margin: 2px 0;
        padding: 0 12px;
        border-radius: 7px;
        justify-content: flex-start;
        text-align: left;
    }

        .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab .mud-tab-content {
            width: 100%;
            justify-content: flex-start;
            text-align: left;
        }

        .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab:hover {
            background: #f1f5ff;
        }

        .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab.mud-tab-active {
            background: #eaf1ff;
            font-weight: 800;
        }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tabs-panels {
        min-width: 0;
        width: calc(100% - 190px) !important;
        max-width: calc(100% - 190px) !important;
        flex: 1 1 calc(100% - 190px) !important;
        background: #ffffff;
    }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab-panel,
    .ag-atendimento-edit-shell .ag-observacoes-tab,
    .ag-atendimento-edit-shell .ag-observacoes-grid {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

        .ag-atendimento-edit-shell .ag-observacoes-grid > .mud-grid-item,
        .ag-atendimento-edit-shell .ag-observacoes-grid .mud-input-control,
        .ag-atendimento-edit-shell .ag-observacoes-grid .mud-input-root {
            width: 100% !important;
            max-width: none !important;
        }


/* ---------- AtendimentoPacEdit(20260920-002432).razor ---------- */
.ag-atendimento-edit-shell .mud-table-cell {
    vertical-align: middle;
}

/* =========================================================
       PAINEL LATERAL DAS ABAS
       ========================================================= */

.ag-atendimento-edit-shell .ag-tabs-vertical {
    border: 1px solid #d8dde5;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .06);
}

    .ag-atendimento-edit-shell .ag-tabs-vertical > .mud-tabs-tabbar {
        min-width: 188px;
        padding: 10px 8px;
        background: #fbfcfe;
        border-right: 1px solid #d8dde5;
    }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab {
        min-height: 47px;
        margin: 2px 0;
        padding: 0 12px;
        border-radius: 7px;
    }

        .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab:hover {
            background: #f1f5ff;
        }

        .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab.mud-tab-active {
            background: #eaf1ff;
            font-weight: 800;
        }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tabs-panels {
        min-width: 0;
        width: calc(100% - 190px) !important;
        max-width: calc(100% - 190px) !important;
        flex: 1 1 calc(100% - 190px) !important;
        background: #ffffff;
    }

    .ag-atendimento-edit-shell .ag-tabs-vertical .mud-tab-panel,
    .ag-atendimento-edit-shell .ag-observacoes-tab,
    .ag-atendimento-edit-shell .ag-observacoes-grid {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

        .ag-atendimento-edit-shell .ag-observacoes-grid > .mud-grid-item,
        .ag-atendimento-edit-shell .ag-observacoes-grid .mud-input-control,
        .ag-atendimento-edit-shell .ag-observacoes-grid .mud-input-root {
            width: 100% !important;
            max-width: none !important;
        }

/* =========================================================
                                                                                                                                           SELEÇÃO E COMBO DE APOIO
                                                                                                                                           ========================================================= */

.ag-atendimento-edit-shell .ag-procedimento-row-selected > td {
    background: rgba(var(--mud-palette-primary-rgb), .10) !important;
    font-weight: 600;
}

.ag-atendimento-edit-shell .ag-procedimentos-selecao tbody tr {
    cursor: pointer;
}

.ag-atendimento-edit-shell .ag-apoio-select-compacto {
    min-width: 135px;
    width: 100%;
}

    .ag-atendimento-edit-shell .ag-apoio-select-compacto .mud-input-control {
        margin: 0 !important;
    }

    .ag-atendimento-edit-shell .ag-apoio-select-compacto .mud-input-root,
    .ag-atendimento-edit-shell .ag-apoio-select-compacto .mud-field {
        min-height: 34px !important;
        height: 34px !important;
    }

    .ag-atendimento-edit-shell .ag-apoio-select-compacto .mud-input-slot {
        min-height: 32px !important;
        height: 32px !important;
        display: flex;
        align-items: center;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
        font-weight: 700;
    }

    .ag-atendimento-edit-shell .ag-apoio-select-compacto .mud-input-adornment {
        height: 32px !important;
    }

/* =========================================================
                                                                                                                                       DESCRIÇÃO DO PROCEDIMENTO, PLANO E DADOS DO APOIO
                                                                                                                                       ========================================================= */

.ag-atendimento-edit-shell .ag-procedimentos-grid table {
    table-layout: fixed !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-procedimento-descricao-header {
    width: auto !important;
    min-width: 260px !important;
}

.ag-atendimento-edit-shell .ag-procedimento-descricao-cell {
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
}

.ag-atendimento-edit-shell .ag-procedimento-descricao-text {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ag-atendimento-edit-shell .ag-plano-chip {
    min-width: 56px;
    justify-content: center;
    font-weight: 800;
}

.ag-atendimento-edit-shell .ag-dados-apoio-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #d32f2f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .35px;
    cursor: help;
}

    .ag-atendimento-edit-shell .ag-dados-apoio-info .mud-icon-root {
        font-size: 17px !important;
    }

.ag-atendimento-edit-shell .ag-medico-chip {
    min-width: 60px;
    max-width: 70px;
    justify-content: center;
    font-size: 11px !important;
    font-weight: 700;
    white-space: nowrap;
}

    .ag-atendimento-edit-shell .ag-medico-chip .mud-chip-icon {
        font-size: 16px !important;
        margin-left: 5px !important;
        margin-right: 2px !important;
    }

/* =========================================================
                                                                                                                                           GRIDS QUADRICULADAS
                                                                                                                                           Procedimentos e Amostras
                                                                                                                                           ========================================================= */

.ag-atendimento-edit-shell .ag-procedimentos-grid table,
.ag-atendimento-edit-shell .ag-amostras-grid table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

.ag-atendimento-edit-shell .ag-procedimentos-grid thead th,
.ag-atendimento-edit-shell .ag-amostras-grid thead th {
    background: #fafafa !important;
    border-top: 1px solid #d7dce2 !important;
    border-bottom: 1px solid #d7dce2 !important;
    border-right: 1px solid #dfe3e8 !important;
    font-weight: 750 !important;
    white-space: nowrap;
}

    .ag-atendimento-edit-shell .ag-procedimentos-grid thead th:first-child,
    .ag-atendimento-edit-shell .ag-amostras-grid thead th:first-child {
        border-left: 1px solid #d7dce2 !important;
    }

.ag-atendimento-edit-shell .ag-procedimentos-grid tbody td,
.ag-atendimento-edit-shell .ag-amostras-grid tbody td {
    border-bottom: 1px solid #e1e5ea !important;
    border-right: 1px solid #e1e5ea !important;
    background: #ffffff;
}

    .ag-atendimento-edit-shell .ag-procedimentos-grid tbody td:first-child,
    .ag-atendimento-edit-shell .ag-amostras-grid tbody td:first-child {
        border-left: 1px solid #e1e5ea !important;
    }

.ag-atendimento-edit-shell .ag-procedimentos-grid tbody tr:hover > td,
.ag-atendimento-edit-shell .ag-amostras-grid tbody tr:hover > td {
    background: #f8fbff !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
.ag-procedimento-row-selected > td {
    background: rgba(var(--mud-palette-primary-rgb), .10) !important;
}

.ag-atendimento-edit-shell .ag-procedimentos-grid tbody td {
    height: 48px;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.ag-atendimento-edit-shell .ag-amostras-grid tbody td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* =========================================================
                                                                                                                                           CÉLULA DE STATUS
                                                                                                                                           ========================================================= */

.ag-atendimento-edit-shell .ag-status-cell {
    padding: 6px 8px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.ag-atendimento-edit-shell .ag-status-cell-warning {
    background: #fffaf0 !important;
}

.ag-atendimento-edit-shell .ag-status-cell-success {
    background: #f2fbf5 !important;
}

.ag-atendimento-edit-shell .ag-status-cell-info {
    background: #f2f7ff !important;
}

.ag-atendimento-edit-shell .ag-status-cell-secondary {
    background: #f7f3ff !important;
}

.ag-atendimento-edit-shell .ag-status-cell-orange {
    background: #fff6ef !important;
}

.ag-atendimento-edit-shell .ag-status-cell-error {
    background: #fff3f3 !important;
}

.ag-atendimento-edit-shell .ag-status-cell-default {
    background: #f7f7f8 !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-warning,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-warning {
    background: #fff7df !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-success,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-success {
    background: #eaf8ef !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-info,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-info {
    background: #eaf3ff !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-secondary,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-secondary {
    background: #f1eaff !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-orange,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-orange {
    background: #fff0e3 !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-error,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-error {
    background: #ffeaea !important;
}

.ag-atendimento-edit-shell
.ag-procedimentos-grid
tbody tr:hover > td.ag-status-cell-default,
.ag-atendimento-edit-shell
.ag-amostras-grid
tbody tr:hover > td.ag-status-cell-default {
    background: #f0f0f2 !important;
}

/* =========================================================
                                                                                                                                           AVATAR / INDICADOR DO STATUS
                                                                                                                                           ========================================================= */

.ag-atendimento-edit-shell .ag-status-chip {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

    .ag-atendimento-edit-shell .ag-status-chip .mud-icon-root {
        font-size: 20px !important;
    }

.ag-atendimento-edit-shell .ag-status-warning {
    background: #fff8dd !important;
    border-color: #f0c040 !important;
    color: #8a6a00 !important;
}

.ag-atendimento-edit-shell .ag-status-success {
    background: #eafbf0 !important;
    border-color: #34a853 !important;
    color: #1e6a31 !important;
}

.ag-atendimento-edit-shell .ag-status-info {
    background: #eaf4ff !important;
    border-color: #3a86ff !important;
    color: #0f4fa8 !important;
}

.ag-atendimento-edit-shell .ag-status-secondary {
    background: #f3edff !important;
    border-color: #8b5cf6 !important;
    color: #6b21a8 !important;
}

/* 105 - Resultado Assinado/Enviado ao Apoio */
.ag-atendimento-edit-shell .ag-status-darkpurple {
    background: #ede9fe !important;
    border-color: #5b21b6 !important;
    color: #4c1d95 !important;
}

.ag-atendimento-edit-shell .ag-status-orange {
    background: #fff2e8 !important;
    border-color: #ff9800 !important;
    color: #c85a00 !important;
}

.ag-atendimento-edit-shell .ag-status-error {
    background: #ffecec !important;
    border-color: #e53935 !important;
    color: #b71c1c !important;
}

.ag-atendimento-edit-shell .ag-status-default {
    background: #f4f4f5 !important;
    border-color: #c7c7c7 !important;
    color: #555555 !important;
}

@@media (max-width: 960px) {
    .ag-atendimento-edit-shell .ag-tabs-vertical > .mud-tabs-tabbar {
        min-width: 165px;
    }
}
/* AtendimentoEdit - navegação vertical:
                                                                       ícone e texto alinhados à esquerda como no layout operacional original. */
.ag-tabs-vertical .mud-tab {
    justify-content: flex-start !important;
    text-align: left !important;
}

    .ag-tabs-vertical .mud-tab .mud-tab-wrapper {
        width: 100% !important;
        justify-content: flex-start !important;
        align-items: center !important;
        text-align: left !important;
    }

    .ag-tabs-vertical .mud-tab .mud-icon-root,
    .ag-tabs-vertical .mud-tab svg {
        flex: 0 0 auto !important;
        margin-left: 0 !important;
    }

    .ag-tabs-vertical .mud-tab .mud-tab-label {
        text-align: left !important;
    }

.ag-procedimento-apelido-text {
    font-weight: 700 !important;
}
/* AtendimentoEdit - MENU LATERAL */
.ag-tabs-vertical .mud-tabs-tabbar {
    min-width: 190px !important;
    width: 190px !important;
}

.ag-tabs-vertical .mud-tab {
    width: 100% !important;
    min-width: 100% !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding-left: 18px !important;
    padding-right: 8px !important;
}

    .ag-tabs-vertical .mud-tab .mud-icon-root {
        margin-left: 0 !important;
        margin-right: 12px !important;
        flex: 0 0 auto !important;
    }

/* Garante o negrito do apelido também contra CSS global da tabela. */
.ag-procedimentos-grid tbody tr td:nth-child(3) {
    font-weight: 800 !important;
}

.ag-atendimento-resumo-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(132px, 1.15fr) minmax(78px, .70fr) minmax(260px, 3.60fr) minmax(136px, 1.20fr) minmax(136px, 1.20fr) minmax(88px, .80fr) minmax(88px, .80fr);
    gap: 12px;
    align-items: stretch;
}

    .ag-atendimento-resumo-grid > div {
        min-width: 0;
    }

@@media (max-width: 1350px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: minmax(132px, 1.15fr) minmax(78px, .70fr) minmax(240px, 3fr) repeat(2, minmax(132px, 1.15fr)) repeat(2, minmax(86px, .75fr));
        gap: 10px;
    }
}

@@media (max-width: 1050px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: span 2;
        }
}

@@media (max-width: 760px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: 1 / -1;
        }
}

@@media (max-width: 520px) {
    .ag-atendimento-resumo-grid {
        grid-template-columns: 1fr;
    }

        .ag-atendimento-resumo-grid > .ag-head-paciente {
            grid-column: auto;
        }
}


/* ---------- AtendimentoPacPage(20260920-002432).razor ---------- */
.ag-at-search-toolbar {
    display: grid !important;
    grid-template-columns: minmax(360px, 1fr) 210px 250px !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
}

.ag-at-search-main,
.ag-at-search-delivery,
.ag-at-search-status {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: stretch;
    grid-column: auto !important;
}

    .ag-at-search-main ::deep .mud-input-control,
    .ag-at-search-delivery ::deep .mud-input-control,
    .ag-at-search-status ::deep .mud-input-control {
        width: 100%;
        margin-top: 0;
    }

    .ag-at-search-main ::deep .mud-input,
    .ag-at-search-delivery ::deep .mud-input,
    .ag-at-search-status ::deep .mud-input {
        min-height: 56px;
    }

    .ag-at-search-status ::deep .mud-input-adornment-end {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ag-at-search-status ::deep .mud-select-input {
        cursor: pointer;
    }

/* ============================================================
                       DESTAQUE VISUAL DO ATENDIMENTO ABERTO NO INLINE
                       ============================================================ */

.ag-at-inline-shell {
    position: relative;
    margin: 8px 4px 12px !important;
    padding: 16px 14px 18px !important;
    border: 1px solid rgba(91, 75, 223, .28) !important;
    border-left: 5px solid rgba(91, 75, 223, .82) !important;
    border-radius: 16px !important;
    background: linear-gradient( 135deg, rgba(91, 75, 223, .075) 0%, rgba(59, 130, 246, .040) 48%, rgba(255, 255, 255, .96) 100%) !important;
    box-shadow: 0 10px 28px rgba(59, 75, 160, .10), inset 0 1px 0 rgba(255, 255, 255, .92) !important;
}

    .ag-at-inline-shell::before {
        content: "ATENDIMENTO ABERTO";
        position: absolute;
        top: -10px;
        left: 22px;
        z-index: 2;
        padding: 3px 12px;
        border: 1px solid rgba(91, 75, 223, .28);
        border-radius: 999px;
        background: #ffffff;
        color: #5b4bdf;
        font-size: .66rem;
        font-weight: 850;
        letter-spacing: .45px;
        line-height: 1.2;
        box-shadow: 0 3px 10px rgba(91, 75, 223, .10);
    }

.ag-at-inline-panel {
    border: 1px solid rgba(91, 75, 223, .22) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 7px 22px rgba(31, 41, 55, .075), 0 0 0 3px rgba(91, 75, 223, .035) !important;
}

.ag-at-inline-header {
    background: linear-gradient( 90deg, rgba(91, 75, 223, .060) 0%, rgba(255, 255, 255, .98) 58%, rgba(59, 130, 246, .040) 100%) !important;
    border-bottom: 1px solid rgba(91, 75, 223, .16) !important;
}

.ag-at-inline-content {
    padding: 14px !important;
    background: linear-gradient( 180deg, rgba(248, 250, 255, .92) 0%, rgba(255, 255, 255, .98) 100%) !important;
}

.ag-at-inline-section {
    border-color: rgba(91, 75, 223, .18) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 4px 14px rgba(31, 41, 55, .045) !important;
}

.ag-at-inline-section--guides {
    border-top: 3px solid rgba(33, 150, 243, .54) !important;
}

.ag-at-inline-section--exams {
    border-top: 3px solid rgba(0, 200, 83, .54) !important;
}

@@media (max-width: 900px) {
    .ag-at-search-toolbar {
        grid-template-columns: 1fr 210px !important;
    }

    .ag-at-search-status {
        grid-column: 1 / -1 !important;
    }
}

@@media (max-width: 650px) {
    .ag-at-search-toolbar {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .ag-at-search-status {
        grid-column: auto !important;
    }
}


/* ---------- AtendimentoPacGuiaDialog(20260920-002432).razor ---------- */
.ag-guia-dialog-header {
    padding-right: 0 !important;
}


/* ---------- AtendimentoRecebimentoPage(1).razor ---------- */
.ag-valor-receber-destaque .mud-input-slot {
    background-color: #fff3cd !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
}

.ag-valor-receber-destaque input {
    color: #7a5200 !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
}

.ag-valor-receber-destaque label {
    color: #7a5200 !important;
    font-weight: 700 !important;
}
