        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            min-height: 100vh;
            padding: 1.25rem;
            overflow-x: hidden;
        }
        
        .container {
            max-width: 87.5rem;
            margin: 0 auto;
            width: 100%;
        }
        
        header {
            background: white;
            border-radius: 0.625rem;
            padding: 1.25rem 1.875rem;
            margin-bottom: 1.875rem;
            box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.1);
        }
        
        h1 {
            color: #C9A961;
            font-size: 1.75rem;
            margin: 0;
            padding: 0;
            line-height: 1.2;
            font-weight: 600;
        }

        .subtitle {
            color: #666;
            font-size: 0.875rem;
            margin: 0;
            padding: 0;
            line-height: 1.2;
        }
        
        .nav-tabs {
            display: flex;
            gap: 0.5rem;
            margin-top: 1.25rem;
            border-bottom: none;
            flex-wrap: wrap;
            overflow-x: visible;
            padding-bottom: 0.25rem;
        }

        .nav-tab {
            padding: 0.5rem 1.1rem;
            background: #faf8f4;
            border: 1px solid #e8e0d0;
            border-radius: 2rem;
            color: #5a5a5a;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            letter-spacing: 0.01em;
            transition: all 0.25s ease;
            white-space: nowrap;
            flex-shrink: 0;
            position: relative;
            box-shadow: 0 1px 2px rgba(201, 169, 97, 0.06);
        }

        .nav-tab:hover {
            color: #b8953e;
            background: #f5f0e6;
            border-color: #C9A961;
            box-shadow: 0 2px 8px rgba(201, 169, 97, 0.15);
            transform: translateY(-1px);
        }

        .nav-tab.active {
            color: #ffffff;
            background: linear-gradient(135deg, #C9A961 0%, #b8913a 100%);
            border-color: transparent;
            box-shadow: 0 3px 12px rgba(201, 169, 97, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
            font-weight: 600;
            transform: translateY(0);
        }

        .nav-tab.active:hover {
            color: #ffffff;
            background: linear-gradient(135deg, #d4b46e 0%, #C9A961 100%);
            box-shadow: 0 4px 16px rgba(201, 169, 97, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
            transform: translateY(-1px);
        }

        /* Sub-abas (Profissionais) - v2.45 */
        .sub-nav-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            border-bottom: 2px solid #e4e7f1;
            padding-bottom: 0;
        }
        .sub-nav-tab {
            padding: 10px 20px;
            border: none;
            background: transparent;
            color: #5a5f7a;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            transition: all 0.2s;
        }
        .sub-nav-tab:hover {
            color: #C9A961;
        }
        .sub-nav-tab.active {
            color: #C9A961;
            border-bottom-color: #C9A961;
        }
        .sub-tab-content {
            display: none;
        }
        .sub-tab-content.active {
            display: block;
        }

        /* Ausencias styles within medicos tab - v2.45 */
        .aus-form-card {
            background: #f8f9fb;
            border-radius: 14px;
            padding: 24px 28px;
            margin-bottom: 20px;
            border: 1px solid #e4e7f1;
            display: none;
        }
        .aus-form-card.visible { display: block; }
        .aus-form-card h3 { font-size: 18px; margin-bottom: 16px; color: #1a1d2e; }
        .aus-form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }
        .aus-form-group { display: flex; flex-direction: column; gap: 6px; }
        .aus-form-group.full-width { grid-column: 1 / -1; }
        .aus-form-group label { font-size: 13px; font-weight: 600; color: #5a5f7a; }
        .aus-form-group input,
        .aus-form-group select,
        .aus-form-group textarea {
            padding: 10px 14px;
            border: 1px solid #e4e7f1;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            color: #1a1d2e;
            transition: border-color 0.2s;
            background: #ffffff;
        }
        .aus-form-group input:focus,
        .aus-form-group select:focus,
        .aus-form-group textarea:focus {
            outline: none;
            border-color: #C9A961;
            box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
        }
        .aus-form-group textarea { resize: vertical; min-height: 70px; }
        .aus-form-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
        .aus-filters {
            background: #f8f9fb;
            border-radius: 14px;
            padding: 16px 24px;
            margin-bottom: 20px;
            border: 1px solid #e4e7f1;
            display: flex;
            gap: 16px;
            align-items: center;
            flex-wrap: wrap;
        }
        .aus-filters label { font-size: 13px; font-weight: 600; color: #5a5f7a; }
        .aus-filters select {
            padding: 8px 12px;
            border: 1px solid #e4e7f1;
            border-radius: 8px;
            font-size: 13px;
            color: #1a1d2e;
            background: #ffffff;
        }
        .aus-table-card {
            background: #ffffff;
            border-radius: 14px;
            box-shadow: 0 4px 24px rgba(139, 111, 63, 0.10);
            overflow: hidden;
        }
        .aus-table-card table { width: 100%; border-collapse: collapse; }
        .aus-table-card thead th {
            background: #f8f9fb;
            padding: 14px 16px;
            text-align: left;
            font-size: 12px;
            font-weight: 700;
            color: #5a5f7a;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid #e4e7f1;
        }
        .aus-table-card tbody td {
            padding: 14px 16px;
            font-size: 14px;
            border-bottom: 1px solid #e4e7f1;
            vertical-align: middle;
        }
        .aus-table-card tbody tr:hover { background: #f8f9fb; }
        .aus-table-card tbody tr:last-child td { border-bottom: none; }
        .aus-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
        .aus-badge-ferias { background: #e8f8f5; color: #1abc9c; }
        .aus-badge-licenca { background: #fdebd0; color: #e67e22; }
        .aus-badge-congresso { background: #ebf5fb; color: #3498db; }
        .aus-badge-folga { background: #f4ecf7; color: #8e44ad; }
        .aus-badge-outros { background: #f2f3f4; color: #7f8c8d; }
        .aus-actions-cell { display: flex; gap: 6px; }
        .aus-empty-state { text-align: center; padding: 60px 20px; color: #8b90a8; }
        .aus-empty-state .icon { font-size: 48px; margin-bottom: 12px; }
        .aus-empty-state p { font-size: 15px; }

        .nav-tab:focus-visible {
            outline: 2px solid #C9A961;
            outline-offset: 2px;
        }
        
        /* v3.11: Hide ti-only elements by default */
        .ti-only:not(.ti-show) {
            display: none !important;
        }
        /* Hide admin-only elements by default (v1.82: corrigido !important que impedia exibicao para admins) */
        .admin-only:not(.admin-show) {
            display: none !important;
        }
        
        .content {
            background: white;
            border-radius: 0.625rem;
            padding: 1.875rem;
            box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.1);
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.75rem;
            margin-bottom: 1.875rem;
        }

        .stat-card {
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            border-radius: 0.5rem;
            padding: 1rem;
            color: white;
            min-width: 0;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(139, 111, 63, 0.4);
        }

        .stat-card:active {
            transform: translateY(-1px);
        }

        /* v3.20: Modal Drill-down Dashboard */
        .drilldown-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 10000;
            justify-content: center;
            align-items: center;
            animation: drilldownFadeIn 0.2s ease;
        }
        .drilldown-overlay.active {
            display: flex;
        }
        @keyframes drilldownFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .drilldown-modal {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 950px;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: drilldownSlideUp 0.25s ease;
        }
        @keyframes drilldownSlideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .drilldown-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            border-bottom: 1px solid #eee;
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 100%);
            border-radius: 12px 12px 0 0;
            color: white;
        }
        .drilldown-header h3 {
            margin: 0;
            font-size: 18px;
        }
        .drilldown-header .drilldown-total {
            font-size: 13px;
            opacity: 0.9;
        }
        .drilldown-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            font-size: 22px;
            cursor: pointer;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .drilldown-close:hover {
            background: rgba(255,255,255,0.35);
        }
        .drilldown-search {
            padding: 12px 24px;
            border-bottom: 1px solid #eee;
        }
        .drilldown-search input {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            outline: none;
            box-sizing: border-box;
            transition: border-color 0.2s;
        }
        .drilldown-search input:focus {
            border-color: #C9A961;
        }
        .drilldown-body {
            overflow-y: auto;
            flex: 1;
            padding: 0;
        }
        .drilldown-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .drilldown-table thead th {
            position: sticky;
            top: 0;
            background: #f8f9fa;
            padding: 10px 14px;
            text-align: left;
            font-weight: 600;
            color: #555;
            border-bottom: 2px solid #e0e0e0;
            white-space: nowrap;
        }
        .drilldown-table tbody td {
            padding: 9px 14px;
            border-bottom: 1px solid #f0f0f0;
            color: #333;
        }
        .drilldown-table tbody tr:hover {
            background: #fdf8ee;
        }
        .drilldown-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 24px;
            border-top: 1px solid #eee;
            background: #f8f9fa;
            border-radius: 0 0 12px 12px;
            font-size: 13px;
            color: #666;
        }
        .drilldown-pagination {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .drilldown-pagination button {
            padding: 6px 12px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }
        .drilldown-pagination button:hover:not(:disabled) {
            background: #C9A961;
            color: white;
            border-color: #C9A961;
        }
        .drilldown-pagination button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .drilldown-loading {
            text-align: center;
            padding: 40px;
            color: #888;
        }
        .drilldown-empty {
            text-align: center;
            padding: 40px;
            color: #999;
        }
        @media (max-width: 768px) {
            .drilldown-modal {
                width: 98%;
                max-height: 92vh;
                border-radius: 10px;
            }
            .drilldown-table { font-size: 12px; }
            .drilldown-table thead th,
            .drilldown-table tbody td { padding: 8px 10px; }
        }
        
        .financial-dashboard {
            margin-bottom: 30px;
        }
        
        .financial-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .financial-row .stat-card {
            flex: 1;
        }
        
        .stat-value {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 3px;
            line-height: 1.2;
        }

        .stat-label {
            font-size: 13px;
            opacity: 0.9;
            line-height: 1.3;
        }
        
        .stat-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 10px;
            opacity: 0.9;
        }
        
        .stat-subtitle {
            font-size: 14px;
            opacity: 0.8;
            margin-top: 5px;
        }
        
        .search-box {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .search-input {
            flex: 1;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
        }
        
        .btn {
            padding: 12px 24px;
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: transform 0.2s;
        }
        
        .btn:hover {
            transform: translateY(-2px);
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        th {
            background: #f5f5f5;
            padding: 12px;
            text-align: left;
            font-weight: 600;
            color: #666;
        }
        
        td {
            padding: 12px;
            border-bottom: 1px solid #eee;
        }
        
        tr:hover {
            background: #f9f9f9;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
        }
        
        .empty {
            text-align: center;
            padding: 40px;
            color: #999;
        }
        
        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .badge-success {
            background: #4caf50;
            color: white;
        }
        
        .badge-warning {
            background: #ff9800;
            color: white;
        }
        
        .badge-info {
            background: #2196f3;
            color: white;
        }
        
        .badge-primary {
            background: #C9A961;
            color: white;
        }

        .badge-na-recepcao {
            background: #fff3cd;
            color: #856404;
        }

        .badge-em-atendimento {
            background: #e7f3ff;
            color: #0056b3;
        }

        .badge-danger {
            background: #dc3545;
            color: white;
        }

        .badge-secondary {
            background: #6c757d;
            color: white;
        }

        /* v2.66: Botoes de filtro por profissional nos agendamentos */
        .profissional-filter-container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
            min-height: 36px;
        }
        .profissional-btn {
            padding: 0.35rem 0.9rem;
            background: #faf8f4;
            border: 1px solid #e8e0d0;
            border-radius: 2rem;
            color: #5a5a5a;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.25s ease;
            white-space: nowrap;
            box-shadow: 0 1px 2px rgba(201, 169, 97, 0.06);
        }
        .profissional-btn:hover {
            color: #b8953e;
            background: #f5f0e6;
            border-color: #C9A961;
            box-shadow: 0 2px 8px rgba(201, 169, 97, 0.15);
            transform: translateY(-1px);
        }
        .profissional-btn.active {
            color: #fff;
            background: linear-gradient(135deg, #C9A961 0%, #b8913a 100%);
            border-color: transparent;
            box-shadow: 0 3px 12px rgba(201, 169, 97, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
            font-weight: 600;
        }
        .profissional-btn .badge-count {
            display: inline-block;
            background: rgba(0,0,0,0.12);
            color: inherit;
            border-radius: 10px;
            padding: 0 6px;
            font-size: 0.7rem;
            margin-left: 4px;
            font-weight: 600;
        }
        .profissional-btn.active .badge-count {
            background: rgba(255,255,255,0.25);
            color: #fff;
        }

        /* Classes de status para módulo compartilhado de agendamentos */
        .status-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        /* v6.00: paleta de status unificada (Opção B — Tailwind, aprovada pelo usuário) */
        .status-agendado {
            background: #DBEAFE;
            color: #1D4ED8;
        }

        .status-confirmado {
            background: #D1FAE5;
            color: #065F46;
        }

        .status-realizado {
            background: #DCFCE7;
            color: #166534;
        }

        .status-cancelado {
            background: #FEE2E2;
            color: #991B1B;
        }

        .status-faltou {
            background: #F3F4F6;
            color: #374151;
        }

        .status-na-recepção {
            background: #FEF3C7;
            color: #92400E;
            font-weight: 700;
            box-shadow: 0 0 8px rgba(146, 64, 14, 0.3);
        }

        .status-em-atendimento {
            background: #EDE9FE;
            color: #5B21B6;
        }

        .status-retorno {
            background: #F3E8FF;
            color: #6B21A8;
        }

        .status-reagendar {
            background: #FEF9C3;
            color: #854D0E;
            font-weight: 700;
        }

        .status-antecipado {
            background: #CFFAFE;
            color: #155E75;
        }

        /* v2.94: Alergias tag input */
        .alergias-container {
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 8px;
            background: #fff;
        }
        .alergias-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 6px;
        }
        .alergia-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: #fee2e2;
            color: #dc2626;
            border: 1px solid #fca5a5;
            border-radius: 16px;
            padding: 3px 10px;
            font-size: 13px;
            font-weight: 500;
        }
        .alergia-tag .remove-tag {
            cursor: pointer;
            font-size: 15px;
            line-height: 1;
            opacity: 0.7;
        }
        .alergia-tag .remove-tag:hover {
            opacity: 1;
        }
        .alergias-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 6px;
            max-height: 180px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .alergias-dropdown .alergia-option {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 13px;
        }
        .alergias-dropdown .alergia-option:hover {
            background: #fee2e2;
        }
        .alergia-badge-view {
            display: inline-block;
            background: #fee2e2;
            color: #dc2626;
            border: 1px solid #fca5a5;
            border-radius: 16px;
            padding: 2px 10px;
            font-size: 12px;
            font-weight: 600;
            margin: 2px 3px;
        }

        .table-container {
            overflow-x: auto;
            max-width: 100%;
        }
        
        .table-container table {
            min-width: 1200px;
            white-space: nowrap;
        }
        
        .table-container th,
        .table-container td {
            min-width: 100px;
            padding: 8px 12px;
        }
        
        .table-container th:nth-child(2), /* Produto */
        .table-container td:nth-child(2) {
            min-width: 250px;
        }
        
        .table-container th:nth-child(8), /* Setor/Sala */
        .table-container td:nth-child(8) {
            min-width: 150px;
        }
        
        .table-container th:nth-child(9), /* Usuário */
        .table-container td:nth-child(9) {
            min-width: 180px;
        }
        
        .table-container th:nth-child(10), /* Observação */
        .table-container td:nth-child(10) {
            min-width: 250px;
            white-space: normal;
            word-break: break-word;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-top: 20px;
        }
        
        .page-btn {
            padding: 8px 12px;
            border: 1px solid #ddd;
            background: white;
            color: #666;
            cursor: pointer;
            border-radius: 4px;
        }
        
        .page-btn:hover {
            background: #f5f5f5;
        }
        
        .page-btn.active {
            background: #C9A961;
            color: white;
            border-color: #C9A961;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 10px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #999;
        }
        
        .detail-row {
            display: flex;
            margin-bottom: 15px;
        }
        
        .detail-label {
            font-weight: 600;
            color: #666;
            min-width: 150px;
        }
        
        .detail-value {
            color: #333;
        }
        
        .texto-preview {
            max-width: 300px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-style: italic;
            color: #666;
        }
        
        .texto-completo {
            max-height: 200px;
            overflow-y: auto;
            padding: 10px;
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 5px;
            white-space: pre-wrap;
        }
        
        /* ESTILOS DE LOGIN */
        .login-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .login-box {
            background: white;
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            width: 100%;
            max-width: 400px;
            text-align: center;
        }
        
        .login-logo {
            color: #C9A961;
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .login-subtitle {
            color: #666;
            margin-bottom: 30px;
            font-size: 14px;
        }
        
        .login-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .login-input {
            padding: 15px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.3s;
        }
        
        .login-input:focus {
            outline: none;
            border-color: #C9A961;
        }
        
        .login-btn {
            padding: 15px;
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s;
        }
        
        .login-btn:hover {
            transform: translateY(-2px);
        }
        
        .login-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        .login-error {
            color: #dc3545;
            background: #ffeaea;
            padding: 10px;
            border-radius: 5px;
            margin-top: 15px;
            font-size: 14px;
        }
        
        .login-credentials {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-top: 20px;
            font-size: 12px;
            color: #666;
        }
        
        .logout-btn {
            background: #dc3545;
            color: white;
            border: none;
            padding: 0.5rem 0.9375rem;
            border-radius: 0.3125rem;
            cursor: pointer;
            font-size: 0.75rem;
        }

        .admin-btn {
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 50%, #6B5330 100%);
            color: white;
            border: none;
            padding: 0.5rem 0.9375rem;
            border-radius: 0.3125rem;
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.3s ease;
        }

        .admin-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
        
        .user-info {
            color: #666;
            font-size: 12px;
            display: flex;
            align-items: center;
            margin-left: auto;
        }
        
        .user-info #userInfo {
            display: flex;
            align-items: center;
            font-size: 14px;
            color: #333;
        }
        
        /* ESTILOS DE ADMINISTRAÇÃO */
        /* .admin-only não tem estilo visual - apenas controle de visibilidade via .admin-only:not(.admin-show) */
        
        .admin-section {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }
        
        .admin-warning {
            background: #f8d7da;
            border: 1px solid #f5c6cb;
            color: #721c24;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            font-size: 14px;
        }
        
        .user-management {
            display: grid;
            gap: 20px;
        }
        
        .user-form {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
        }
        
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
        }
        
        .form-group label {
            font-weight: bold;
            margin-bottom: 5px;
            color: #333;
        }
        
        .form-group input,
        .form-group select {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }
        
        /* v5.99: .btn-danger duplicado removido (era código morto, sombreado pela
           definição canônica #dc3545 mais abaixo, linha ~1416). */

        .admin-users-table {
            margin-top: 20px;
        }
        
        .admin-users-table th {
            background: #f8f9fa;
            font-weight: bold;
        }
        
        .user-actions {
            display: flex;
            gap: 5px;
        }
        
        .user-actions button {
            padding: 5px 10px;
            font-size: 12px;
            border-radius: 3px;
        }
        
        .status-badge {
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
        }
        
        .status-active {
            background: #d4edda;
            color: #155724;
        }
        
        .status-inactive {
            background: #f8d7da;
            color: #721c24;
        }
        
        .status-admin {
            background: #fff3cd;
            color: #856404;
        }

        /* v2.53: Toggle switch para configuracoes */
        .toggle-switch input:checked + span {
            background-color: #4CAF50;
        }
        .toggle-switch input:checked + span + span {
            transform: translateX(24px);
        }

        /* v0.93: Estilos para lista de checkboxes de autorizacao */
        .checkbox-lista {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 10px;
            max-height: 300px;
            overflow-y: auto;
            padding: 10px;
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .checkbox-lista label {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .checkbox-lista label:hover {
            background: #e3f2fd;
            border-color: #2196F3;
        }

        .checkbox-lista label.checked {
            background: #e8f5e9;
            border-color: #4CAF50;
        }

        .checkbox-lista input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        .checkbox-lista .medico-info {
            display: flex;
            flex-direction: column;
        }

        .checkbox-lista .medico-nome {
            font-weight: 500;
            color: #333;
        }

        .checkbox-lista .medico-tipo {
            font-size: 11px;
            color: #666;
        }

        .status-success {
            background: #d4edda;
            color: #155724;
        }
        
        .status-warning {
            background: #fff3cd;
            color: #856404;
        }
        
        .status-error {
            background: #f8d7da;
            color: #721c24;
        }
        
        /* Estilos para formulário de agendamento */
        .form-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }
        
        .form-control {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            width: 100%;
        }
        
        .form-group textarea {
            resize: vertical;
            min-height: 80px;
        }
        
        .btn-secondary {
            background: #6c757d;
            color: white;
        }
        
        .btn-secondary:hover {
            background: #545b62;
        }
        /* Patient search styles */
        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 5px 5px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .search-result-item {
            padding: 10px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .search-result-item:hover {
            background: #f8f9fa;
        }
        
        .search-result-item:last-child {
            border-bottom: none;
        }
        
        .patient-name {
            font-weight: bold;
            color: #333;
        }
        
        .patient-details {
            font-size: 12px;
            color: #666;
            margin-top: 3px;
        }
        
        .paciente-search, .procedimento-search {
            position: relative;
        }
        
        .no-results {
            padding: 10px 15px;
            color: #999;
            font-style: italic;
        }
        
        /* Button styles for actions */
        .action-buttons {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            align-items: center;
        }

        /* v3.28: Botões de ação redesenhados - Principais + Dropdown */
        .action-buttons-v2 {
            display: flex;
            gap: 4px;
            align-items: center;
            justify-content: flex-end;
        }

        .btn-action {
            width: 32px;
            height: 32px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            position: relative;
            background: #f0f0f0;
        }

        .btn-action:hover {
            transform: scale(1.1);
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

        .btn-action-icon { font-size: 14px; line-height: 1; }

        .btn-action-primary { background: #EFF6FF; color: #3B82F6; }
        .btn-action-primary:hover { background: #DBEAFE; }
        .btn-action-green { background: #F0FDF4; color: #22C55E; }
        .btn-action-green:hover { background: #DCFCE7; }
        .btn-action-amber { background: #FFFBEB; color: #F59E0B; }
        .btn-action-amber:hover { background: #FEF3C7; }
        .btn-action-whatsapp { background: #F0FDF4; color: #25D366; }
        .btn-action-whatsapp:hover { background: #DCFCE7; }
        .btn-action-more { background: #F3F4F6; color: #6B7280; font-size: 16px; font-weight: bold; }
        .btn-action-more:hover { background: #E5E7EB; }

        .dropdown-actions-wrapper { position: relative; display: inline-flex; }
        .dropdown-actions-menu {
            display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
            background: white; border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
            min-width: 170px; z-index: 1000; padding: 6px;
            animation: dropdownActFadeIn 0.15s ease;
        }
        .dropdown-actions-menu.show { display: block; }
        @keyframes dropdownActFadeIn {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .dropdown-action-item {
            display: flex; align-items: center; gap: 8px; width: 100%;
            padding: 8px 12px; border: none; background: none; cursor: pointer;
            font-size: 13px; color: #374151; border-radius: 6px;
            transition: background 0.15s; text-align: left; white-space: nowrap;
        }
        .dropdown-action-item:hover { background: #F3F4F6; }
        .dropdown-action-danger:hover { background: #FEF2F2; color: #DC2626; }
        .dropdown-action-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }

        .btn-sm {
            padding: 5px 8px;
            font-size: 12px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }
        
        .btn-danger {
            background: #dc3545;
            color: white;
        }
        
        .btn-danger:hover {
            background: #c82333;
        }

        /* Media Queries para Responsividade */
        @media screen and (max-width: 1400px) {
            .container {
                max-width: 95%;
            }
        }

        @media screen and (max-width: 1200px) {
            h1 {
                font-size: 24px;
            }

            .nav-tab {
                font-size: 0.825rem;
                padding: 0.45rem 0.95rem;
            }

            .stats-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 0.625rem;
            }

            .stat-card {
                padding: 0.875rem;
            }

            .stat-value {
                font-size: 24px;
            }

            .stat-label {
                font-size: 12px;
            }
        }

        @media screen and (max-width: 992px) {
            body {
                padding: 10px;
            }
            
            header {
                padding: 15px 20px;
            }
            
            h1 {
                font-size: 20px;
            }
            
            .subtitle {
                font-size: 12px;
            }
            
            .content {
                padding: 20px;
            }
            
            .nav-tab {
                font-size: 0.8rem;
                padding: 0.425rem 0.85rem;
            }
            
            table {
                font-size: 14px;
            }
            
            .modal-content {
                width: 95%;
                max-width: none !important;
                margin: 20px auto;
            }
            
            .login-box {
                width: 95%;
                max-width: 400px;
            }
            
            .form-row {
                grid-template-columns: 1fr;
            }
        }

        @media screen and (max-width: 768px) {
            .btn-novo-agendamento {
                display: none !important;
            }

            h1 {
                font-size: 18px;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }

            .stat-card {
                padding: 0.75rem;
            }

            .stat-value {
                font-size: 22px;
            }

            .stat-label {
                font-size: 11px;
            }
            
            .nav-tab {
                font-size: 0.75rem;
                padding: 0.4rem 0.75rem;
            }
            
            table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }
            
            .btn {
                font-size: 12px;
                padding: 5px 10px;
            }

            .action-buttons {
                flex-direction: column;
            }

            .action-buttons-v2 { gap: 3px; }
            .btn-action { width: 28px; height: 28px; }

            .search-input {
                min-width: 150px !important;
                font-size: 14px;
            }
            
            .user-info {
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                gap: 5px;
            }
            
            .user-info span {
                font-size: 12px;
            }
            
            header > div:first-child {
                flex-direction: column;
                align-items: flex-start;
            }
            
            header img {
                width: 36px !important;
                height: 36px !important;
            }
            
            /* Ajustes específicos para modal de movimentações */
            #modal-movimentacoes .modal-content {
                width: 95% !important;
                max-width: 95% !important;
            }
            
            .table-container table {
                min-width: 1200px;
            }
        }

        @media screen and (max-width: 576px) {
            body {
                padding: 5px;
            }
            
            header {
                padding: 10px 15px;
                margin-bottom: 15px;
            }
            
            h1 {
                font-size: 16px;
            }
            
            h2 {
                font-size: 18px;
            }
            
            .subtitle {
                display: none;
            }
            
            .content {
                padding: 15px;
            }
            
            .nav-tabs {
                gap: 0.375rem;
            }

            .nav-tab {
                font-size: 0.7rem;
                padding: 0.35rem 0.6rem;
                border-radius: 1.5rem;
            }
            
            .stat-card {
                padding: 15px;
            }
            
            .stat-value {
                font-size: 28px;
            }
            
            .stat-title {
                font-size: 13px;
            }
            
            .modal-content {
                padding: 20px;
            }
            
            .modal-content h2 {
                font-size: 20px;
            }
            
            .form-control {
                font-size: 14px;
                padding: 8px;
            }
            
            .btn {
                font-size: 11px;
                padding: 4px 8px;
            }
            
            table {
                font-size: 12px;
            }
            
            th, td {
                padding: 5px;
            }
            
            .search-filters {
                flex-direction: column;
                gap: 10px;
            }
            
            .search-input {
                width: 100%;
                min-width: unset !important;
            }
        }

        @media screen and (max-width: 400px) {
            h1 {
                font-size: 14px;
            }

            .nav-tabs {
                gap: 0.25rem;
            }

            .nav-tab {
                font-size: 0.625rem;
                padding: 0.3rem 0.5rem;
                border-radius: 1.25rem;
            }
            
            .login-box {
                padding: 30px 20px;
            }
            
            .login-logo {
                font-size: 28px;
            }
        }

        .clinic-logo-container {
            text-align: center;
            margin-bottom: 1.5rem;
            padding: 1rem;
            background: white;
            border-radius: 0.625rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            max-width: 87.5rem;
            margin: 0 auto 1.5rem;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .clinic-logo {
            max-height: 80px;
            width: auto;
            filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
        }

        @media (max-width: 768px) {
            .clinic-logo {
                max-height: 60px;
            }
        }

        /* Ícone de sessão múltipla em agendamentos */
        .session-icon {
            display: inline-block;
            margin-left: 6px;
            font-size: 14px;
            cursor: help;
            opacity: 1;
            transition: opacity 0.2s;
        }

        .session-icon:hover {
            opacity: 1;
        }

        /* ========== Modal Atendimento em Andamento — v2.23 ========== */
        #modal-atendimento-andamento .modal-content {
            padding: 0;
            border-radius: 12px;
            overflow-y: auto;
            max-height: 92vh;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(201,169,97,0.1);
        }

        #modal-atendimento-andamento .modal-header {
            background: linear-gradient(135deg, #C9A961 0%, #8B6F3F 60%, #6B5330 100%);
            color: #fff;
            padding: 20px 28px;
            margin-bottom: 0;
            border-radius: 0;
        }
        #modal-atendimento-andamento .modal-header h2 {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 0.3px;
            margin: 0;
        }
        #modal-atendimento-andamento .close-btn {
            color: rgba(255,255,255,0.8);
            font-size: 22px;
        }
        #modal-atendimento-andamento .close-btn:hover { color: #fff; }

        #modal-atendimento-andamento-body {
            padding: 24px 28px 28px;
        }

        /* Card paciente */
        .atd-paciente-card {
            background: linear-gradient(135deg, #faf8f4 0%, #f5f0e8 100%);
            border-left: 4px solid #C9A961;
            border-radius: 8px;
            padding: 16px 20px;
            margin-bottom: 20px;
            display: flex;
            align-items: stretch;
            gap: 20px;
        }
        .atd-paciente-foto-wrapper {
            width: 150px;
            min-height: 150px;
            border-radius: 10px;
            overflow: hidden;
            border: 2px solid #C9A961;
            box-shadow: 0 2px 10px rgba(139, 111, 63, 0.15);
            flex-shrink: 0;
            background: #fff;
        }
        .atd-paciente-foto {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            border-radius: 8px;
        }
        .atd-paciente-foto-placeholder {
            width: 150px;
            min-height: 150px;
            border-radius: 10px;
            background: linear-gradient(135deg, #e8e0d0, #f5f0e8);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            color: #C9A961;
            font-weight: 700;
            flex-shrink: 0;
            border: 2px solid #C9A961;
        }
        .atd-paciente-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .atd-paciente-nome {
            font-size: 17px;
            font-weight: 700;
            color: #2d2318;
            margin-bottom: 6px;
        }
        .atd-paciente-detalhes {
            font-size: 13px;
            color: #6b5c4a;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .atd-sep {
            color: #c4b28a;
            font-weight: 700;
        }

        /* Seção ações clínicas */
        .atd-acoes-clinicas {
            background: #EFF6FF;
            border: 1px solid #BFDBFE;
            border-radius: 8px;
            padding: 14px 18px;
            margin-bottom: 20px;
        }
        .atd-acoes-titulo {
            display: block;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: #3B82F6;
            margin-bottom: 10px;
        }
        .btn-receita {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 22px;
            background: #3B82F6;
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-receita:hover {
            background: #2563EB;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59,130,246,0.3);
        }

        /* Label evolução */
        .atd-evolucao-label {
            font-size: 14px;
            font-weight: 700;
            color: #333;
            margin-bottom: 8px;
        }

        /* Textarea focus dourado */
        #modal-atendimento-andamento #textarea-evolucao {
            border: 1.5px solid #ddd;
            border-radius: 8px;
            transition: border-color 0.2s, box-shadow 0.2s;
            font-size: 14px;
            line-height: 1.6;
        }
        #modal-atendimento-andamento #textarea-evolucao:focus {
            border-color: #C9A961;
            box-shadow: 0 0 0 3px rgba(201,169,97,0.15);
            outline: none;
        }

        /* Footer de ações */
        .atd-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 2px solid #f0ebe3;
        }
        .atd-footer-primary {
            display: flex;
            gap: 10px;
        }
        .btn-salvar, .btn-finalizar, .btn-cancelar {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-salvar {
            background: #059669;
            color: #fff;
        }
        .btn-salvar:hover {
            background: #047857;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(5,150,105,0.3);
        }
        .btn-finalizar {
            background: linear-gradient(135deg, #C9A961 0%, #a88b45 100%);
            color: #fff;
        }
        .btn-finalizar:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(201,169,97,0.4);
        }
        .btn-cancelar {
            background: transparent;
            color: #6c757d;
            border: 1.5px solid #d1d5db;
        }
        .btn-cancelar:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
        }

        /* Evoluções anteriores */
        .atd-evolucoes-section {
            margin-top: 28px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        .atd-evolucoes-section h4 {
            font-size: 14px;
            font-weight: 700;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        /* ============================== */
        /* v2.96: Modal Triagem           */
        /* ============================== */
        #modal-triagem .modal-content {
            padding: 0;
            border-radius: 12px;
            overflow-y: auto;
            max-height: 92vh;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(13,148,136,0.1);
        }
        #modal-triagem .modal-header {
            background: linear-gradient(135deg, #0D9488 0%, #0F766E 60%, #115E59 100%);
            color: #fff;
            padding: 20px 28px;
            margin-bottom: 0;
            border-radius: 0;
        }
        #modal-triagem .modal-header h2 {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 0.3px;
            margin: 0;
        }
        #modal-triagem .close-btn {
            color: rgba(255,255,255,0.8);
            font-size: 22px;
        }
        #modal-triagem .close-btn:hover { color: #fff; }

        #modal-triagem-body {
            padding: 24px 28px 28px;
        }

        /* Card paciente triagem */
        .tri-paciente-card {
            background: linear-gradient(135deg, #f0fdfa 0%, #e6f7f5 100%);
            border-left: 4px solid #0D9488;
            border-radius: 8px;
            padding: 16px 20px;
            margin-bottom: 20px;
            display: flex;
            align-items: stretch;
            gap: 20px;
        }

        /* Seção Alergias - destaque vermelho */
        .tri-alergias-section {
            background: #FEF2F2;
            border: 1.5px solid #FECACA;
            border-radius: 8px;
            padding: 16px 18px;
            margin-bottom: 20px;
        }
        .tri-alergias-titulo {
            display: block;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: #DC2626;
            margin-bottom: 10px;
        }
        #tri-alergias-lista {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
            min-height: 32px;
        }
        .tri-alergia-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #FEE2E2;
            color: #DC2626;
            border: 1px solid #FECACA;
            border-radius: 16px;
            padding: 4px 12px;
            font-size: 13px;
            font-weight: 600;
        }
        .tri-alergia-badge .tri-remove-btn {
            background: #DC2626;
            color: #fff;
            border: none;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 12px;
            line-height: 18px;
            text-align: center;
            cursor: pointer;
            padding: 0;
            transition: background 0.2s;
        }
        .tri-alergia-badge .tri-remove-btn:hover {
            background: #991B1B;
        }
        .tri-add-alergia {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .tri-alergia-search-container {
            position: relative;
            flex: 1;
        }
        .tri-add-alergia input {
            width: 100%;
            padding: 8px 12px;
            border: 1.5px solid #FECACA;
            border-radius: 6px;
            font-size: 13px;
            background: #fff;
            box-sizing: border-box;
        }
        .tri-add-alergia input:focus {
            border-color: #DC2626;
            box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
            outline: none;
        }
        .tri-alergia-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid #FECACA;
            border-radius: 6px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            display: none;
            margin-top: 2px;
        }
        .tri-alergia-item {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 13px;
            border-bottom: 1px solid #FEE2E2;
            transition: background 0.15s;
        }
        .tri-alergia-item:last-child {
            border-bottom: none;
        }
        .tri-alergia-item:hover {
            background: #FEF2F2;
        }
        .tri-alergia-item mark {
            background: #FECACA;
            color: #991B1B;
            border-radius: 2px;
            padding: 0 1px;
        }
        .tri-add-alergia button {
            padding: 8px 16px;
            background: #DC2626;
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s;
        }
        .tri-add-alergia button:hover {
            background: #B91C1C;
            transform: translateY(-1px);
        }

        /* Textarea triagem */
        #modal-triagem #textarea-evolucao-triagem {
            border: 1.5px solid #ddd;
            border-radius: 8px;
            transition: border-color 0.2s, box-shadow 0.2s;
            font-size: 14px;
            line-height: 1.6;
        }
        #modal-triagem #textarea-evolucao-triagem:focus {
            border-color: #0D9488;
            box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
            outline: none;
        }

        /* Footer triagem */
        .tri-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 2px solid #e0f2f1;
        }
        .tri-footer-primary {
            display: flex;
            gap: 10px;
        }
        .btn-salvar-triagem, .btn-finalizar-triagem, .btn-cancelar-triagem {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-salvar-triagem {
            background: #0D9488;
            color: #fff;
        }
        .btn-salvar-triagem:hover {
            background: #0F766E;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(13,148,136,0.3);
        }
        .btn-finalizar-triagem {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            color: #fff;
        }
        .btn-finalizar-triagem:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(5,150,105,0.4);
        }
        .btn-cancelar-triagem {
            background: transparent;
            color: #6c757d;
            border: 1.5px solid #d1d5db;
        }
        .btn-cancelar-triagem:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
        }

        /* Evoluções anteriores triagem */
        .tri-evolucoes-section {
            margin-top: 28px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        .tri-evolucoes-section h4 {
            font-size: 14px;
            font-weight: 700;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }
