                            /* Admin Dashboard overrides (only affects /admin_* pages where this stylesheet is loaded) */
                            /* Admin pages styles (ONLY), do not affect sidebar layout.
   Note: sidebar (admin-sidebar) must stay controlled by style.css root.
*/
                            /* Keep existing layout working */
                            /* Admin functional UI (buttons/badges/layout) */
                            
                            .admin-card {
                                background: #fff;
                                border-radius: 12px;
                                box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
                                padding: 20px;
                                margin-bottom: 20px
                            }
                            
                            .admin-table-container {
                                overflow-x: auto;
                                width: 100%
                            }
                            
                            .admin-table {
                                width: 100%;
                                border-collapse: collapse
                            }
                            
                            .admin-table th,
                            .admin-table td {
                                padding: 12px;
                                border: 1px solid #e5e7eb;
                                text-align: left;
                                vertical-align: top
                            }
                            
                            .admin-table thead th {
                                background: #f8fafc;
                                color: #0f172a;
                                font-weight: 700;
                                font-size: .85rem
                            }
                            
                            .admin-input {
                                padding: 8px 12px;
                                border: 1px solid #cbd5e1;
                                border-radius: 8px;
                                font-size: .85rem;
                                outline: none;
                                width: 100%
                            }
                            /* Form layout (evita inputs “corados/desformatados” quando páginas admin usam layout próprio) */
                            
                            .form-grid {
                                display: grid;
                                grid-template-columns: 1fr 1fr;
                                gap: 15px;
                            }
                            
                            .form-group {
                                display: flex;
                                flex-direction: column;
                                gap: 6px;
                                min-width: 0;
                            }

                            /* Form UX fix: labels not overlapping (inputs have top padding/padding already) */
                            .form-group label {
                                display: block;
                                font-weight: 800;
                                color: #0f172a;
                                font-size: .82rem;
                                margin-bottom: 0;
                            }

                            .form-group input,
                            .form-group select,
                            .form-group textarea {
                                line-height: 1.2;
                            }
                            
                            .form-group.full-width {
                                grid-column: span 2;
                            }
                            
                            .form-group input,
                            .form-group select,
                            .form-group textarea {
                                width: 100%;
                                padding: 8px 12px;
                                border: 1px solid #cbd5e1;
                                border-radius: 8px;
                                font-size: .85rem;
                                outline: none;
                                box-sizing: border-box;
                                background: #fff;
                                color: #0f172a;
                            }
                            
                            .cta-button {
                                border: none;
                                border-radius: 10px;
                                background: #f97316;
                                color: #fff;
                                font-weight: 800;
                                cursor: pointer;
                                padding: 10px 18px;
                            }
                            
                            .table-controls {
                                display: flex;
                                gap: 15px;
                                align-items: center;
                                flex-wrap: wrap;
                                margin: 15px 0
                            }
                            
                            .btn-admin {
                                display: inline-flex;
                                align-items: center;
                                justify-content: center;
                                gap: 8px;
                                padding: 8px 12px;
                                border-radius: 10px;
                                border: none;
                                cursor: pointer;
                                text-decoration: none;
                                font-weight: 700;
                                white-space: nowrap
                            }
                            
                            .btn-admin.blue {
                                background: #3b82f6;
                                color: #fff
                            }
                            
                            .btn-admin.red {
                                background: #dc3545;
                                color: #fff
                            }
                            
                            .btn-admin.green {
                                background: #22c55e;
                                color: #fff
                            }
                            
                            .btn-admin.orange {
                                background: #f97316;
                                color: #fff
                            }
                            
                            .btn-admin.purple {
                                background: #a855f7;
                                color: #fff
                            }
                            
                            .btn-admin.gray {
                                background: #6b7280;
                                color: #fff
                            }
                            
                            .cta-button {
                                display: inline-flex;
                                align-items: center;
                                justify-content: center;
                                gap: 10px;
                                padding: 10px 18px;
                                border-radius: 10px;
                                background: #f97316;
                                color: #fff;
                                border: none;
                                font-weight: 800;
                                cursor: pointer
                            }
                            
                            .admin-stats-grid {
                                display: grid;
                                grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
                                gap: 20px;
                                margin-bottom: 25px;
                                align-items: stretch;
                                width: 100%;
                            }
                            /* ensure stats cards look like cards */
                            
                            .admin-stats-grid .stat-card,
                            .admin-stats-grid .stat-box {
                                border-radius: 14px;
                            }
                            /* Dashboard cards */
                            
                            .stat-box {
                                background: #fff;
                                border-radius: 14px;
                                padding: 18px;
                                box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
                                display: flex;
                                align-items: center;
                                gap: 16px;
                                border: 1px solid #f1f5f9;
                                min-height: 90px;
                            }
                            
                            .stat-box .stat-info {
                                display: flex;
                                flex-direction: column;
                                gap: 6px;
                                min-width: 0
                            }
                            
                            .stat-label {
                                font-size: .85rem;
                                font-weight: 800;
                                color: #334155;
                                letter-spacing: .01em
                            }
                            
                            .stat-value {
                                font-size: 2rem;
                                font-weight: 950;
                                color: #0f172a;
                                line-height: 1.1
                            }
                            /* Dashboard card row (visual container) */
                            
                            #admin-dashboard-stats {
                                background: transparent
                            }
                            /* Orçamentos (pendentes/recentes) e Mensagens como cards */
                            
                            #orcamentos-section .orc-card,
                            #mensagens-section .msg-card,
                            #orcamentos-section .admin-table,
                            #mensagens-section .admin-table {
                                border-radius: 14px;
                            }
                            /* Dashboard stat typography */
                            
                            .stat-info {
                                display: flex;
                                flex-direction: column;
                                gap: 6px
                            }
                            
                            .stat-label {
                                font-size: .85rem;
                                font-weight: 800;
                                color: #334155;
                                text-transform: none;
                                letter-spacing: .01em
                            }
                            
                            .stat-value {
                                font-size: 2rem;
                                font-weight: 950;
                                color: #0f172a;
                                line-height: 1.1
                            }
                            
                            .stat-box {
                                background: #fff;
                                border-radius: 14px;
                                padding: 18px;
                                box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
                                display: flex;
                                align-items: center;
                                gap: 16px;
                                border: 1px solid #f1f5f9
                            }
                            
                            .stat-icon {
                                width: 54px;
                                height: 54px;
                                border-radius: 14px;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                font-size: 1.5rem
                            }
                            
                            .stat-box.blue .stat-icon {
                                background: #e0f2fe;
                                color: #0ea5e9
                            }
                            
                            .stat-box.orange .stat-icon {
                                background: #ffedd5;
                                color: #f97316
                            }
                            
                            .stat-box.purple .stat-icon {
                                background: #f3e8ff;
                                color: #a855f7
                            }
                            
                            .stat-box.green .stat-icon {
                                background: #dcfce7;
                                color: #22c55e
                            }
                            
                            .admin-wrapper {
                                background: transparent
                            }
                            
                            .admin-modal {
                                position: fixed;
                                inset: 0;
                                display: none;
                                align-items: center;
                                justify-content: center;
                                z-index: 999
                            }
                            
                            .admin-modal .modal-content {
                                background: #fff;
                                border-radius: 16px;
                                max-width: 520px;
                                width: 90%;
                                box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
                                padding: 18px
                            }
                            
                            .admin-modal.show {
                                display: flex
                            }
                            
                            .admin-container {
                                max-width: 1200px;
                                margin: 40px auto;
                                font-family: 'Segoe UI', sans-serif
                            }
                            
                            .admin-header {
                                display: flex;
                                justify-content: space-between;
                                align-items: center;
                                margin-bottom: 30px
                            }
                            
                            .dashboard {
                                display: grid;
                                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                                gap: 20px;
                                margin-bottom: 40px
                            }
                            
                            .card {
                                background: #fff;
                                padding: 20px;
                                border-radius: 10px;
                                box-shadow: 0 5px 15px rgba(0, 0, 0, .05)
                            }
                            
                            .search-box {
                                display: flex;
                                gap: 15px;
                                margin-bottom: 20px
                            }
                            
                            .search-box input,
                            .search-box select {
                                padding: 10px;
                                border-radius: 6px;
                                border: 1px solid #ccc;
                                width: 100%
                            }
                            
                            .table {
                                width: 100%;
                                border-collapse: collapse;
                                transition: all 0.3s ease
                            }
                            
                            .table th,
                            .table td {
                                border: 1px solid #ddd;
                                padding: 10px;
                                text-align: left
                            }
                            
                            .table tr.inativo-row {
                                opacity: 0.6;
                                background: #f5f5f5
                            }
                            
                            .btn {
                                padding: 6px 10px;
                                border: none;
                                border-radius: 5px;
                                cursor: pointer;
                                transition: 0.2s
                            }
                            
                            .btn-delete {
                                background: #dc3545;
                                color: #fff
                            }
                            
                            .btn-inativo {
                                background: #ffc107;
                                color: #fff
                            }
                            
                            .btn-estado {
                                background: #007bff;
                                color: #fff
                            }
                            
.badge {
                                padding: 4px 8px;
                                border-radius: 8px;
                                font-weight: 800;
                            }

                            .badge.Aprovado {
                                background: #dcfce7;
                                color: #166534;
                                border: 1px solid #bbf7d0;
                            }

                            .badge.Recusado {
                                background: #fef2f2;
                                color: #991b1b;
                                border: 1px solid #fecaca;
                            }

                            .badge.Inativo {
                                background-color: #6c757d;
                                color: #fff;
                            }

                            .badge.Visível {
                                background: #fef3c7;
                                color: #92400e;
                                border: 1px solid #fde68a;
                            }

                            /* keep old definitions below */

.badge {
                                padding: 4px 8px;
                                border-radius: 5px;
                                color: #fff;
                                font-size: .8rem
                            }

                            /* Fix: manter cor/contraste das variações (Inativo/Aprovado/Visível)
                               quando houver múltiplas definições de .badge. */
                            .badge.Aprovado,
                            .badge.Recusado,
                            .badge.Inativo,
                            .badge.Visível {
                                color: inherit;
                            }
                            
                            .estado-badge {
                                display: inline-block;
                                padding: 3px 8px;
                                border-radius: 5px;
                                color: #fff;
                                font-weight: bold;
                                margin-left: 8px;
                                font-size: .85rem
                            }
                            
                            .Recebido {
                                background-color: #3498db
                            }
                            
                            .Processado {
                                background-color: #2ecc71
                            }
                            
                            .Sem-Tratamento {
                                background-color: #fd7e14
                            }
                            
                            .Inativo {
                                background-color: #6c757d
                            }
                            
                            .unread {
                                background: #f8fafc;
                                font-weight: 800;
                                transition: background 0.3s
                            }
                            /* Dashboard (Orçamentos Pendentes / Mensagens): destaque extra */
                            
                            #orcamentos-table tbody tr.unread td,
                            #mensagens-table tbody tr.unread td {
                                background: #eef6ff;
                                border-top: 1px solid #dbeafe;
                                color: #0f172a;
                            }
                            
                            #orcamentos-table tbody tr.unread td .badge,
                            #mensagens-table tbody tr.unread td .badge {
                                box-shadow: 0 6px 14px rgba(59, 130, 246, .18);
                            }
                            /* Modal */
                            
                            .modal {
                                display: none;
                                position: fixed;
                                top: 0;
                                left: 0;
                                width: 100%;
                                height: 100%;
                                background: rgba(0, 0, 0, 0.6);
                                justify-content: center;
                                align-items: center;
                                z-index: 1000
                            }
                            
                            .modal-content {
                                background: #fff;
                                padding: 20px;
                                border-radius: 10px;
                                max-width: 400px;
                                width: 90%;
                                text-align: center;
                                animation: fadeIn 0.3s ease
                            }
                            
                            .modal-actions {
                                margin-top: 15px;
                                display: flex;
                                justify-content: center;
                                gap: 10px
                            }
                            
                            @keyframes fadeIn {
                                from {
                                    opacity: 0;
                                    transform: scale(0.8)
                                }
                                to {
                                    opacity: 1;
                                    transform: scale(1)
                                }
                            }
                            /* Shield icon size fix */
                            
                            .user-menu-toggle .user-icon-header {
                                width: 26px !important;
                                height: 26px !important;
                                font-size: 0.8rem !important;
                                display: inline-flex !important;
                                align-items: center;
                                justify-content: center;
                                line-height: 1 !important;
                                border: 2px solid #e2e8f0;
                                border-radius: 50%;
                                display: inline-flex !important;
                                align-items: center;
                                justify-content: center;
                                line-height: 1;
                                box-sizing: border-box;
                            }
                            /* Keep dropdown contained */
                            
                            .user-menu {
                                position: relative;
                            }
                            
                            .user-menu-dropdown {
                                display: none;
                                position: absolute;
                                right: 0;
                                top: 100%;
                                margin-top: 10px;
                                min-width: 220px;
                                background: #fff;
                                border: 1px solid #f0f0f0;
                                border-radius: 8px;
                                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
                                z-index: 3000;
                            }
                            
                            .user-menu:hover .user-menu-dropdown,
                            .user-menu-dropdown.active {
                                display: flex;
                                flex-direction: column;
                            }
                            
                            .user-menu-dropdown li a,
                            .user-menu-dropdown li span {
                                display: flex;
                                align-items: center;
                                gap: 12px;
                                padding: 10px 20px;
                                white-space: nowrap;
                                color: #333;
                                text-decoration: none;
                            }