/* 
 * PatrimÃ´nioTech - CSS Design System Completo
 * Sistema de GestÃ£o Patrimonial
 * Version: 3.1.0 - Design System Edition
 */

/* ===== CSS VARIABLES (DESIGN TOKENS) ===== */
:root {
    /* Cores PrimÃ¡rias */
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --primary-light: #FFF5D6;
    
    /* Cores SemÃ¢nticas */
    --success: #217458;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    /* Tons Neutros */
    --gray-50: #F7F7F7;
    --gray-100: #EFEFEF;
    --gray-200: #E6E6E6;
    --gray-300: #BFBFBF;
    --gray-400: #A1A09F;
    --gray-500: #595958;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F7F7;
    --bg-dark: #1F2937;
    
    /* Tipografia */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Pesos */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* EspaÃ§amentos */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --rounded-sm: 0.125rem;
    --rounded: 0.25rem;
    --rounded-md: 0.375rem;
    --rounded-lg: 0.5rem;
    --rounded-xl: 0.75rem;
    --rounded-2xl: 1rem;
    --rounded-3xl: 1.5rem;
}

/* ===== RESET E CONFIGURAÃ‡Ã•ES BÃSICAS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
}

/* ===== LAYOUT PRINCIPAL ===== */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-8) var(--spacing-4);
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

/* ===== HEADER PADRONIZADO ===== */
.header {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4);
    min-height: 70px;
    max-width: 90%;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.header-icon {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-3);
    border-radius: var(--rounded-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.header-icon i {
    color: white;
    font-size: var(--text-xl);
}

.header-title h1 {
    color: white;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--spacing-1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
}

/* ===== NAVEGAÃ‡ÃƒO ===== */
.header-nav {
    flex: 1;
    margin: 0 var(--spacing-8);
}

.nav-links {
    display: flex;
    gap: var(--spacing-2);
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--rounded-lg);
    font-weight: var(--font-medium);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    white-space: nowrap;
    font-size: var(--text-sm);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    font-weight: var(--font-semibold);
    box-shadow: var(--shadow-sm);
}

/* ===== MENU DO USUÃRIO ===== */
.header-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    color: white;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    flex-direction: column;
    justify-content: center;
}

.user-avatar {
    font-size: var(--text-2xl);
    opacity: 0.9;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.user-email {
    font-size: var(--text-xs);
    opacity: 0.8;
}

.user-menu {
    position: relative;
    display: flex;
    gap: 1rem;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--spacing-2);
    border-radius: var(--rounded);
    transition: all 0.2s ease;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: var(--spacing-2);
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3) var(--spacing-4);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--spacing-2) 0;
}

/* ===== CABEÃ‡ALHO DA PÃGINA ===== */
.page-header {
    text-align: center;
    margin-bottom: var(--spacing-8);
    padding: var(--spacing-6) 0;
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
}

.page-title i {
    color: var(--primary);
}

.page-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== COMPONENTES BÃSICOS ===== */

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--rounded-2xl);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-4);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.card-title i {
    color: var(--primary);
}

.card-actions {
    display: flex;
    gap: var(--spacing-2);
}

.card-content {
    line-height: 1.6;
}

/* Mensagens */
.message {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-4);
    border-radius: var(--rounded-lg);
    margin-bottom: var(--spacing-6);
    font-weight: var(--font-medium);
    animation: slideDown 0.3s ease;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.message.info {
    background: #f0f9ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

/* BotÃµes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-5);
    border: none;
    border-radius: var(--rounded-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

/* BotÃµes pequenos */
.btn-sm {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--text-xs);
}

/* BotÃµes grandes */
.btn-lg {
    padding: var(--spacing-4) var(--spacing-6);
    font-size: var(--text-base);
}

/* BotÃµes de Ã­cone */
.btn-icon {
    padding: var(--spacing-2);
    border-radius: var(--rounded);
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-edit:hover {
    background: #fef3c7;
    color: var(--warning);
    border-color: var(--warning);
}

.btn-delete:hover {
    background: #fef2f2;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-view:hover {
    background: #eff6ff;
    color: var(--primary);
    border-color: var(--primary);
}

/* FormulÃ¡rios */
.form {
    background: var(--bg-primary);
    padding: var(--spacing-6);
    border-radius: var(--rounded-2xl);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: var(--spacing-5);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-2);
    color: var(--gray-700);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
}

.form-label.required:after {
    content: " *";
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded-lg);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: var(--spacing-1);
    color: var(--gray-500);
    font-size: var(--text-xs);
}

.form-actions {
    display: flex;
    gap: var(--spacing-3);
    margin-top: var(--spacing-6);
    padding-top: var(--spacing-6);
    border-top: 1px solid var(--gray-200);
}

/* Grid de formulÃ¡rio */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-4);
}

.form-grid .span-2 {
    grid-column: span 2;
}

/* Checkbox e Radio */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
    border-radius: var(--rounded-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-6);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.table-header {
    background: var(--gray-50);
}

.table-header-cell {
    padding: var(--spacing-4);
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    font-size: var(--text-sm);
}

.table-row:hover {
    background: var(--gray-50);
}

.table-cell {
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--gray-200);
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.table-actions {
    width: 120px;
    text-align: center;
}

.table-actions .btn-icon {
    margin: 0 var(--spacing-1);
}

/* Dashboard especÃ­fico */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--gray-50) 100%);
    padding: var(--spacing-6);
    border-radius: var(--rounded-2xl);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.stat-icon {
    font-size: var(--text-4xl);
    margin-bottom: var(--spacing-4);
    opacity: 0.9;
}

.stat-number {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-2);
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
}

/* AÃ§Ãµes rÃ¡pidas */
.quick-actions {
    display: flex;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-8);
    flex-wrap: wrap;
    justify-content: center;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-5);
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
    border-color: var(--primary);
}

.quick-action-btn i {
    font-size: var(--text-2xl);
    color: var(--primary);
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--spacing-4);
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--spacing-2);
    color: var(--gray-600);
}

.empty-state p {
    margin-bottom: var(--spacing-6);
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--rounded-2xl);
    padding: var(--spacing-8);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

/* Filtros */
.filters-card {
    background: var(--bg-primary);
    padding: var(--spacing-6);
    border-radius: var(--rounded-xl);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-6);
}

.filters-form {
    display: flex;
    gap: var(--spacing-4);
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* AnimaÃ§Ãµes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Badges e Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}

.badge-info {
    background: #f0f9ff;
    color: #0c4a6e;
}

/* Utilities */
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--spacing-1); }
.gap-2 { gap: var(--spacing-2); }
.gap-3 { gap: var(--spacing-3); }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }
.m-0 { margin: 0; }
.mb-2 { margin-bottom: var(--spacing-2); }
.mb-4 { margin-bottom: var(--spacing-4); }
.mb-6 { margin-bottom: var(--spacing-6); }
.mt-4 { margin-top: var(--spacing-4); }
.mt-6 { margin-top: var(--spacing-6); }
.p-0 { padding: 0; }
.p-4 { padding: var(--spacing-4); }
.p-6 { padding: var(--spacing-6); }
.rounded { border-radius: var(--rounded); }
.rounded-lg { border-radius: var(--rounded-lg); }
.rounded-xl { border-radius: var(--rounded-xl); }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* ===== RESPONSIVIDADE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .header-nav {
        margin: 0 var(--spacing-4);
    }
    
    .nav-text {
        display: none;
    }
    
    .form-grid .span-2 {
        grid-column: span 1;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-4);
        padding: var(--spacing-4);
    }
    
    .header-nav {
        margin: 0;
        width: 100%;
    }
    
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--spacing-2);
    }
    
    .nav-link {
        padding: var(--spacing-2) var(--spacing-3);
        font-size: var(--text-xs);
    }
    
    .user-details {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        justify-content: center;
        gap: var(--spacing-3);
    }
    
    .quick-action-btn {
        min-width: 100px;
        padding: var(--spacing-4);
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .content-wrapper {
        padding: var(--spacing-4) var(--spacing-3);
    }
    
    .page-title {
        font-size: var(--text-2xl);
    }
    
    .page-subtitle {
        font-size: var(--text-base);
    }
    
    .modal-content {
        padding: var(--spacing-6);
        margin: var(--spacing-4);
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .header-brand {
        gap: var(--spacing-2);
    }
    
    .header-title h1 {
        font-size: var(--text-lg);
    }
    
    .header-title p {
        font-size: var(--text-xs);
    }
    
    .stat-card {
        padding: var(--spacing-4);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    .card {
        padding: var(--spacing-4);
    }
    
    .table-container {
        font-size: var(--text-xs);
    }
    
    .table-cell,
    .table-header-cell {
        padding: var(--spacing-2);
    }
}

/* ===== IMPRESSÃƒO ===== */
@media print {
    .header,
    .nav-links,
    .filters-card,
    .quick-actions,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .content-wrapper {
        max-width: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}

/* =============================================
   ESTILOS ESPECÃFICOS PARA PATRIMÃ”NIO
   Adicionar ao styles.css existente
   ============================================= */

/* ===== FILTROS E BUSCA ===== */
.filter-form {
    background: var(--bg-primary);
    border-radius: var(--rounded-lg);
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.2fr auto;
    gap: var(--spacing-4);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.filter-group .form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.filter-actions {
    display: flex;
    gap: var(--spacing-2);
}

/* ===== ESTATÃSTICAS RÃPIDAS ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-6);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--rounded-xl);
    padding: var(--spacing-6);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--rounded-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.stat-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.stat-icon.stat-success { background: linear-gradient(135deg, var(--success), #059669); color: white; }
.stat-icon.stat-warning { background: linear-gradient(135deg, var(--warning), #D97706); color: white; }
.stat-icon.stat-info { background: linear-gradient(135deg, var(--info), #0891B2); color: white; }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-top: var(--spacing-1);
}

/* ===== ALTERNADOR DE VISÃƒO ===== */
.view-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-1);
}

.view-toggle .btn-icon {
    background: transparent;
    border: none;
    padding: var(--spacing-2);
    border-radius: var(--rounded-md);
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.view-toggle .btn-icon:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.view-toggle .btn-icon.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ===== TABELA DE PATRIMÃ”NIO ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--rounded-lg);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table-header-cell {
    padding: var(--spacing-4);
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    white-space: nowrap;
}

.table-row {
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background: var(--gray-50);
}

.table-cell {
    padding: var(--spacing-4);
    vertical-align: top;
}

/* ===== COMPONENTES ESPECÃFICOS DA TABELA ===== */
.item-code {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.code-text {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    background: var(--gray-100);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
}

.btn-qr {
    background: none;
    border: none;
    color: var(--gray-400);
    padding: var(--spacing-1);
    border-radius: var(--rounded);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-qr:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.item-info {
    min-width: 200px;
}

.item-name {
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    line-height: 1.3;
}

.item-details {
    font-size: var(--text-xs);
    color: var(--gray-600);
    margin-top: var(--spacing-1);
}

.item-serial {
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-family: 'Monaco', 'Consolas', monospace;
    margin-top: var(--spacing-1);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border: 1px solid;
    white-space: nowrap;
}

.location-info, .responsible-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.location-sector {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--spacing-1);
}

.value-info {
    text-align: right;
}

.value-amount {
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.acquisition-date {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--spacing-1);
}

/* ===== BADGES DE STATUS ===== */
.status-badge {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-excelente { background: #ECFDF5; color: #065F46; }
.status-bom { background: #F0FDF4; color: #166534; }
.status-regular { background: #FFFBEB; color: #92400E; }
.status-ruim { background: #FEF2F2; color: #991B1B; }
.status-manutencao { background: #EFF6FF; color: #1E40AF; }

.priority-badge {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.priority-alta { background: #FEF2F2; color: #991B1B; }
.priority-media { background: #FFFBEB; color: #92400E; }
.priority-baixa { background: #F0FDF4; color: #166534; }

/* ===== AÃ‡Ã•ES DA TABELA ===== */
.table-actions {
    width: 120px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: var(--spacing-1);
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--rounded);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-view { background: var(--info); color: white; }
.btn-view:hover { background: #0891B2; }

.btn-edit { background: var(--warning); color: white; }
.btn-edit:hover { background: #D97706; }

.btn-delete { background: var(--danger); color: white; }
.btn-delete:hover { background: #DC2626; }

/* ===== VISÃƒO GRID ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-6);
}

.item-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.item-card-header {
    padding: var(--spacing-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-code-badge {
    background: var(--primary);
    color: white;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.item-card-content {
    padding: var(--spacing-5);
}

.item-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
    line-height: 1.3;
}

.item-card-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-bottom: var(--spacing-4);
}

.item-card-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.info-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.info-row i {
    width: 16px;
    color: var(--gray-500);
}

.item-card-actions {
    padding: var(--spacing-3);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--spacing-2);
    justify-content: center;
}

/* ===== FORMULÃRIO DE PATRIMÃ”NIO ===== */
.form-section {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-3);
    border-bottom: 1px solid var(--gray-200);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-4);
}

.form-group-lg {
    grid-column: 1 / -1;
}

.input-group {
    display: flex;
    gap: var(--spacing-2);
}

.input-group .form-input {
    flex: 1;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-3);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-right: none;
    border-radius: var(--rounded-md) 0 0 var(--rounded-md);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    font-size: var(--text-sm);
}

.input-prefix + .form-input {
    border-radius: 0 var(--rounded-md) var(--rounded-md) 0;
    border-left: none;
}

.input-prefix + .form-input:focus {
    border-left: 1px solid var(--primary);
}

/* ===== UPLOAD DE ARQUIVO ===== */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-6);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.form-input-file {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    color: var(--gray-600);
}

.file-upload-placeholder i {
    font-size: 2rem;
    color: var(--gray-400);
}

.current-image, .image-preview {
    margin-top: var(--spacing-4);
    text-align: center;
}

.preview-img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--rounded-md);
    box-shadow: var(--shadow);
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    color: var(--gray-600);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: var(--spacing-4);
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
}

.empty-state p {
    font-size: var(--text-base);
    margin-bottom: var(--spacing-6);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .table-container {
        font-size: var(--text-xs);
    }
    
    .table-cell {
        padding: var(--spacing-2);
    }
}

/* ===== ANIMAÃ‡Ã•ES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card {
    animation: fadeInUp 0.3s ease forwards;
}

.table-row {
    animation: fadeInUp 0.2s ease forwards;
}

/* ===== AJUSTES FINAIS ===== */
.text-muted {
    color: var(--gray-500);
    font-style: italic;
}

.form-help {
    font-size: var(--text-xs);
    color: var(--gray-600);
    margin-top: var(--spacing-1);
}

.form-help a {
    color: var(--primary);
    text-decoration: none;
}

.form-help a:hover {
    text-decoration: underline;
}

/* =============================================
   ESTILOS ESPECÃFICOS PARA LOCALIZAÃ‡Ã•ES
   Adicionar ao styles.css existente
   ============================================= */

/* ===== FILTROS ESTENDIDOS ===== */
.filter-row-extended {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr) auto;
    gap: var(--spacing-4);
    align-items: end;
}

/* ===== GRID DE LOCALIZAÃ‡Ã•ES ===== */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-6);
}

.location-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.location-card.location-inactive {
    opacity: 0.7;
    background: var(--gray-50);
}

.location-header {
    padding: var(--spacing-5);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
}

.location-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: var(--rounded-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.location-info {
    flex: 1;
}

.location-name {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
    line-height: 1.3;
}

.location-hierarchy {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
}

.hierarchy-item {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    background: var(--gray-100);
    color: var(--gray-700);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.hierarchy-item i {
    color: var(--gray-500);
}

.location-status {
    flex-shrink: 0;
    align-self: flex-start;
}

.location-content {
    padding: var(--spacing-5);
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-4);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
}

.detail-label {
    font-weight: var(--font-medium);
    color: var(--gray-700);
    white-space: nowrap;
}

.detail-value {
    color: var(--gray-600);
    text-align: right;
    line-height: 1.4;
}

.occupancy-info {
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
    margin-top: var(--spacing-4);
}

.occupancy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2);
}

.occupancy-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
}

.occupancy-percentage {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.occupancy-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-2);
}

.occupancy-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: var(--rounded-lg);
}

.occupancy-numbers {
    font-size: var(--text-xs);
    color: var(--gray-600);
    text-align: center;
}

.items-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    color: var(--gray-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: var(--spacing-3);
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
    margin-top: var(--spacing-4);
}

.location-actions {
    padding: var(--spacing-3);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--spacing-2);
    justify-content: center;
}

/* ===== VISÃƒO TABELA - LOCALIZAÃ‡Ã•ES ===== */
.location-info-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.location-icon-small {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: var(--rounded);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
}

.location-details {
    flex: 1;
}

.location-description {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--spacing-1);
    line-height: 1.3;
}

.hierarchy-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.hierarchy-level {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.hierarchy-level i {
    color: var(--gray-400);
    width: 12px;
}

.type-badge {
    background: var(--info);
    color: white;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.responsible-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
}

.occupancy-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
    align-items: center;
}

.occupancy-bar-small {
    width: 60px;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--rounded);
    overflow: hidden;
}

.occupancy-fill-small {
    height: 100%;
    transition: width 0.3s ease;
}

.occupancy-text {
    font-size: var(--text-xs);
    text-align: center;
}

.occupancy-text small {
    color: var(--gray-500);
    display: block;
}

.items-only {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* ===== VISÃƒO HIERÃRQUICA ===== */
.hierarchy-view {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
}

.hierarchy-tree {
    padding: var(--spacing-4);
}

.hierarchy-level-1,
.hierarchy-level-2,
.hierarchy-level-3 {
    margin-bottom: var(--spacing-4);
}

.hierarchy-level-2 {
    margin-left: var(--spacing-6);
    border-left: 2px solid var(--gray-200);
    padding-left: var(--spacing-4);
}

.hierarchy-level-3 {
    margin-left: var(--spacing-6);
    border-left: 2px solid var(--gray-300);
    padding-left: var(--spacing-4);
}

.hierarchy-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
    margin-bottom: var(--spacing-3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hierarchy-header:hover {
    background: var(--gray-100);
}

.hierarchy-title {
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.hierarchy-count {
    background: var(--primary);
    color: white;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.hierarchy-locations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-3);
    margin-left: var(--spacing-4);
}

.hierarchy-location {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.hierarchy-location:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.hierarchy-location.inactive {
    opacity: 0.6;
    background: var(--gray-50);
}

.location-compact-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    flex: 1;
}

.location-icon-tiny {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--rounded);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
}

.location-name-compact {
    font-weight: var(--font-medium);
    color: var(--gray-900);
    font-size: var(--text-sm);
}

.location-type-compact {
    font-size: var(--text-xs);
    color: var(--gray-600);
    background: var(--gray-100);
    padding: var(--spacing-1);
    border-radius: var(--rounded);
}

.location-items-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    font-size: var(--text-xs);
    color: var(--gray-600);
    background: var(--gray-100);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
}

.location-compact-actions {
    display: flex;
    gap: var(--spacing-1);
}

.btn-icon-tiny {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--rounded);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-icon-tiny.btn-edit {
    background: var(--warning);
    color: white;
}

.btn-icon-tiny.btn-edit:hover {
    background: #D97706;
}

/* ===== CLASSES DE OCUPAÃ‡ÃƒO ===== */
.ocupacao-baixa { color: var(--success); }
.ocupacao-media { color: var(--info); }
.ocupacao-alta { color: var(--warning); }
.ocupacao-critica { color: var(--danger); }

/* ===== RESPONSIVIDADE PARA LOCALIZAÃ‡Ã•ES ===== */
@media (max-width: 1200px) {
    .filter-row-extended {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-row-extended .filter-group:nth-child(n+4) {
        grid-column: span 1;
    }
    
    .filter-actions {
        grid-column: span 3;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .filter-row-extended {
        grid-template-columns: 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-actions {
        grid-column: span 1;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
    }
    
    .location-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .location-hierarchy {
        justify-content: center;
    }
    
    .hierarchy-locations {
        grid-template-columns: 1fr;
    }
    
    .hierarchy-level-2,
    .hierarchy-level-3 {
        margin-left: var(--spacing-3);
        padding-left: var(--spacing-3);
    }
}

@media (max-width: 480px) {
    .location-compact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-1);
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-value {
        text-align: left;
    }
}

/* ===== ANIMAÃ‡Ã•ES PARA LOCALIZAÃ‡Ã•ES ===== */
.location-card {
    animation: fadeInUp 0.3s ease forwards;
}

.hierarchy-location {
    animation: fadeInRight 0.2s ease forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ESTADOS ESPECIAIS ===== */
.row-inactive {
    opacity: 0.7;
    background: var(--gray-50);
}

.location-card.location-inactive .location-name {
    color: var(--gray-500);
}

.location-card.location-inactive .location-icon {
    background: var(--gray-400);
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
.hierarchy-header:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.location-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== SCROLL CUSTOMIZADO PARA VISÃƒO HIERÃRQUICA ===== */
.hierarchy-view::-webkit-scrollbar {
    width: 8px;
}

.hierarchy-view::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--rounded);
}

.hierarchy-view::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--rounded);
}

.hierarchy-view::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* =============================================
   ESTILOS ESPECÃFICOS PARA QR CODES
   Adicionar ao styles.css existente
   ============================================= */

/* ===== LAYOUT DE ABAS ===== */
.tabs-container {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    overflow: hidden;
    margin-bottom: var(--spacing-6);
}

.tabs-header {
    display: flex;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.tab-button {
    flex: 1;
    padding: var(--spacing-4) var(--spacing-6);
    background: transparent;
    border: none;
    border-right: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.tab-button.active {
    background: var(--bg-primary);
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
    padding: var(--spacing-6);
}

.tab-content.active {
    display: block;
}

/* ===== PREVIEW DE QR CODES ===== */
.preview-section {
    margin-top: var(--spacing-6);
    padding-top: var(--spacing-6);
    border-top: 1px solid var(--gray-200);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-4);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.qr-preview {
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-6);
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    color: var(--gray-500);
    font-size: var(--text-base);
}

.preview-placeholder i {
    font-size: 3rem;
    color: var(--gray-400);
}

.etiqueta-preview {
    background: white;
    border: 2px solid var(--gray-800);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
    display: inline-block;
    font-family: Arial, sans-serif;
}

.etiqueta-preview.etiqueta-simples {
    text-align: center;
}

.etiqueta-preview.etiqueta-compacta .etiqueta-header,
.etiqueta-preview.etiqueta-completa .etiqueta-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-2);
}

.etiqueta-preview .qr-image {
    width: 80px;
    height: 80px;
    border: 1px solid var(--gray-300);
}

.etiqueta-preview .item-info {
    text-align: left;
}

.etiqueta-preview .item-nome {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 var(--spacing-1) 0;
    color: var(--gray-900);
}

.etiqueta-preview .item-codigo {
    font-size: 12px;
    color: var(--gray-600);
    margin: 0;
}

.etiqueta-preview .item-categoria,
.etiqueta-preview .item-localizacao {
    font-size: 10px;
    color: var(--gray-500);
    margin: 0;
}

.batch-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
}

.batch-preview-info {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
    color: var(--gray-700);
}

.batch-preview-info i {
    color: var(--info);
    margin-top: 2px;
    flex-shrink: 0;
}

.batch-info {
    background: var(--info);
    background: linear-gradient(135deg, var(--info)20, var(--info)10);
    border: 1px solid var(--info);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-4);
}

.info-icon {
    color: var(--info);
    margin-right: var(--spacing-2);
}

.info-content {
    color: var(--gray-700);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* ===== INSTRUÃ‡Ã•ES DE ESCANEAMENTO ===== */
.scan-test-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

.scan-instructions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
    border-left: 4px solid var(--primary);
}

.instruction-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: var(--rounded-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.instruction-content h5 {
    margin: 0 0 var(--spacing-1) 0;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
}

.instruction-content p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.scan-example {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
}

.scan-example h4 {
    margin: 0 0 var(--spacing-2) 0;
    font-size: var(--text-base);
    color: var(--gray-700);
}

.example-url {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-2);
}

.example-url code {
    flex: 1;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    padding: var(--spacing-2);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: var(--text-sm);
    color: var(--gray-800);
    word-break: break-all;
}

.scan-notes {
    background: var(--warning);
    background: linear-gradient(135deg, var(--warning)20, var(--warning)10);
    border: 1px solid var(--warning);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-4);
}

.scan-notes h4 {
    margin: 0 0 var(--spacing-3) 0;
    color: var(--gray-900);
}

.scan-notes ul {
    margin: 0;
    padding-left: var(--spacing-5);
    color: var(--gray-700);
}

.scan-notes li {
    margin-bottom: var(--spacing-1);
    line-height: 1.5;
}

/* ===== FILTROS PARA USUÃRIOS ===== */
.filter-row-users {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr) auto;
    gap: var(--spacing-4);
    align-items: end;
}

/* ===== GRID DE USUÃRIOS ===== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-6);
}

.user-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.user-card.user-inactive {
    opacity: 0.7;
    background: var(--gray-50);
}

.user-header {
    padding: var(--spacing-5);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-4);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-200);
    margin-bottom: var(--spacing-1);
    line-height: 1.3;
}

.user-username {
    font-size: var(--text-sm);
    color: var(--gray-600);
    font-family: 'Monaco', 'Consolas', monospace;
    margin-bottom: var(--spacing-1);
}

.user-position {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: var(--font-medium);
}

.user-status {
    flex-shrink: 0;
    align-self: flex-start;
}

.user-content {
    padding: var(--spacing-5);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-4);
}

.access-status {
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-3);
    text-align: center;
}

.access-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-1);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--spacing-1);
}

.access-ativo { color: var(--success); }
.access-ausente { color: var(--warning); }
.access-inativo { color: var(--danger); }
.access-novo { color: var(--info); }

.last-login {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.user-actions {
    padding: var(--spacing-3);
    display: flex;
    gap: var(--spacing-2);
    justify-content: center;
    & a{
        color: var(--gray-200);
    }
}

/* ===== VISÃƒO TABELA - USUÃRIOS ===== */
.user-info-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
}

.position-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.cargo {
    font-weight: var(--font-medium);
    color: var(--gray-900);
    font-size: var(--text-sm);
}

.departamento {
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.email, .telefone {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    font-size: var(--text-xs);
    color: var(--gray-600);
}

.access-info {
    text-align: center;
}

.access-indicator-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-1);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    margin-bottom: var(--spacing-1);
}

.last-login-compact {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* ===== BOTÃ•ES ESPECÃFICOS ===== */
.btn-reset {
    background: var(--info);
    color: white;
}

.btn-reset:hover {
    background: #0891B2;
}

/* ===== RESPONSIVIDADE PARA QR CODES ===== */
@media (max-width: 1024px) {
    .filter-row-users {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-row-users .filter-group:nth-child(n+3) {
        grid-column: span 1;
    }
    
    .filter-actions {
        grid-column: span 2;
        justify-content: center;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .filter-row-users {
        grid-template-columns: 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-actions {
        grid-column: span 1;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .user-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .scan-instructions {
        gap: var(--spacing-3);
    }
    
    .instruction-item {
        flex-direction: column;
        text-align: center;
    }
    
    .example-url {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qr-preview {
        min-height: 150px;
        padding: var(--spacing-4);
    }
    
    .etiqueta-preview .etiqueta-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: var(--spacing-4);
    }
    
    .user-card {
        margin: 0 var(--spacing-2);
    }
    
    .user-actions {
        flex-wrap: wrap;
    }
    
    .control-actions {
        flex-direction: column;
        gap: var(--spacing-2);
    }
}

/* ===== ANIMAÃ‡Ã•ES PARA QR CODES ===== */
.user-card {
    animation: fadeInUp 0.3s ease forwards;
}

.etiqueta-preview {
    animation: slideInUp 0.4s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MELHORIAS DE IMPRESSÃƒO PARA QR CODES ===== */
@media print {
    .qr-preview,
    .batch-preview,
    .scan-test-section {
        display: none !important;
    }
    
    .etiqueta-preview {
        border: 2px solid #000 !important;
        background: white !important;
        page-break-inside: avoid;
    }
    
    .tab-content {
        padding: 0 !important;
    }
    
    .tabs-container {
        border: none !important;
        background: transparent !important;
    }
    
    .tabs-header {
        display: none !important;
    }
    
    .user-card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

/* ===== ESTADOS ESPECIAIS ===== */
.user-card.user-inactive .user-name {
    color: var(--gray-500);
}

.user-card.user-inactive .user-avatar {
    background: var(--gray-400);
}

.tab-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tab-button:disabled:hover {
    background: transparent;
    color: var(--gray-600);
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
.tab-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.user-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.instruction-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== ESTILOS PARA FORMULÃRIOS DE QR CODE ===== */
.form-section {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-900);
    margin-bottom: var(--spacing-6);
    padding-bottom: var(--spacing-3);
    border-bottom: 1px solid var(--gray-200);
}

/* 
 * PatrimÃ´nioTech - CSS Design System Completo
 * Sistema de GestÃ£o Patrimonial - Otimizado para Auditoria
 * Version: 3.1.1 - Auditoria Edition
 */

/* ===== CSS VARIABLES (DESIGN TOKENS) ===== */
:root {
    /* Cores PrimÃ¡rias */
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --primary-light: #FFF5D6;
    
    /* Cores SemÃ¢nticas */
    --success: #217458;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    /* Tons Neutros */
    --gray-50: #F7F7F7;
    --gray-100: #EFEFEF;
    --gray-200: #E6E6E6;
    --gray-300: #BFBFBF;
    --gray-400: #A1A09F;
    --gray-500: #595958;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F7F7;
    --bg-dark: #1F2937;
    
    /* Tipografia */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Pesos */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* EspaÃ§amentos */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --rounded-sm: 0.125rem;
    --rounded: 0.25rem;
    --rounded-md: 0.375rem;
    --rounded-lg: 0.5rem;
    --rounded-xl: 0.75rem;
    --rounded-2xl: 1rem;
    --rounded-3xl: 1.5rem;
    
    /* Cores especÃ­ficas da Auditoria */
    --audit-login: #217458;
    --audit-logout: #06B6D4;
    --audit-error: #EF4444;
    --audit-warning: #F59E0B;
    --audit-create: #217458;
    --audit-update: #F59E0B;
    --audit-delete: #EF4444;
    --audit-view: #6366F1;
}

/* ===== RESET E CONFIGURAÃ‡Ã•ES BÃSICAS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
}

/* ===== LAYOUT PRINCIPAL ===== */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-8) var(--spacing-4);
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
    width: 100%;
}

/* ===== CABEÃ‡ALHO DAS PÃGINAS ===== */
.page-header {
    margin-bottom: var(--spacing-8);
    text-align: center;
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
}

.page-title i {
    color: var(--primary);
}

.page-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARDS E CONTAINERS ===== */
.card {
    background: var(--bg-primary);
    border-radius: var(--rounded-2xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--spacing-6) var(--spacing-6) var(--spacing-4);
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-2);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.card-body {
    padding: var(--spacing-6);
}

.card-footer {
    padding: var(--spacing-4) var(--spacing-6);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ===== ESTATÃSTICAS (STATS) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--gray-50) 100%);
    border-radius: var(--rounded-2xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-4);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--rounded-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin-bottom: var(--spacing-2);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
    font-weight: var(--font-medium);
}

.stat-change {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    margin-top: var(--spacing-2);
}

.stat-change.positive {
    background: #ecfdf5;
    color: var(--success);
}

.stat-change.negative {
    background: #fef2f2;
    color: var(--danger);
}

/* ===== ESTILOS ESPECÃFICOS PARA AUDITORIA ===== */

/* Container da pÃ¡gina de auditoria */
.audit-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* Filtros da auditoria */
.audit-filters {
    background: var(--bg-primary);
    border-radius: var(--rounded-2xl);
    padding: var(--spacing-6);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-4);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.filter-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
}

.filter-group select,
.filter-group input {
    padding: var(--spacing-3) var(--spacing-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded-lg);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* BotÃµes de aÃ§Ã£o dos filtros */
.filter-actions {
    display: flex;
    gap: var(--spacing-3);
    align-items: end;
    flex-wrap: wrap;
}

/* Tabela de logs de auditoria */
.audit-table-container {
    background: var(--bg-primary);
    border-radius: var(--rounded-2xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.audit-table thead {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

.audit-table th {
    padding: var(--spacing-4) var(--spacing-6);
    text-align: left;
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.audit-table td {
    padding: var(--spacing-4) var(--spacing-6);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

.audit-table tbody tr {
    transition: all 0.2s ease;
}

.audit-table tbody tr:hover {
    background: var(--gray-50);
}

/* CÃ©lulas especÃ­ficas da tabela de auditoria */
.log-timestamp {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: var(--text-xs);
    color: var(--gray-600);
    white-space: nowrap;
}

.log-user {
    font-weight: var(--font-medium);
    color: var(--gray-800);
}

.log-ip {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.log-details {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.log-details:hover {
    white-space: normal;
    word-break: break-word;
}

/* Badges para aÃ§Ãµes de auditoria */
.audit-action-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--rounded-xl);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

/* Classes especÃ­ficas para diferentes tipos de aÃ§Ã£o */
.action-login {
    background: #ecfdf5;
    color: var(--audit-login);
    border: 1px solid rgba(33, 116, 88, 0.2);
}

.action-logout {
    background: #f0f9ff;
    color: var(--audit-logout);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.action-success {
    background: #ecfdf5;
    color: var(--audit-create);
    border: 1px solid rgba(33, 116, 88, 0.2);
}

.action-danger {
    background: #fef2f2;
    color: var(--audit-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.action-warning {
    background: #fffbeb;
    color: var(--audit-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.action-info {
    background: #f0f9ff;
    color: var(--audit-view);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.action-primary {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.action-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

/* Ãcones nas badges */
.audit-action-badge i {
    font-size: var(--text-xs);
}

/* PaginaÃ§Ã£o para auditoria */
.audit-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-6);
    padding: var(--spacing-4);
}

.audit-pagination a,
.audit-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded-lg);
    text-decoration: none;
    color: var(--gray-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all 0.2s ease;
}

.audit-pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.audit-pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.audit-pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.audit-pagination .disabled:hover {
    background: transparent;
    color: var(--gray-400);
    border-color: var(--gray-300);
    transform: none;
}

/* AÃ§Ãµes de exportaÃ§Ã£o */
.export-actions {
    display: flex;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-6);
    justify-content: flex-end;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-4);
    background: var(--bg-primary);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded-lg);
    color: var(--gray-700);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
}

.export-btn.csv {
    border-color: var(--success);
    color: var(--success);
}

.export-btn.csv:hover {
    background: #ecfdf5;
}

.export-btn.pdf {
    border-color: var(--danger);
    color: var(--danger);
}

.export-btn.pdf:hover {
    background: #fef2f2;
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: var(--text-4xl);
    color: var(--gray-400);
    margin-bottom: var(--spacing-4);
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--gray-600);
    margin-bottom: var(--spacing-2);
}

.empty-state-description {
    font-size: var(--text-sm);
    color: var(--gray-500);
    max-width: 400px;
    margin: 0 auto;
}

/* ===== MENSAGENS DE FEEDBACK ===== */
.message {
    padding: var(--spacing-4) var(--spacing-5);
    border-radius: var(--rounded-lg);
    margin-bottom: var(--spacing-6);
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-weight: var(--font-medium);
    animation: slideDown 0.3s ease;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.message.info {
    background: #f0f9ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

/* ===== BOTÃ•ES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-5);
    border: none;
    border-radius: var(--rounded-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.btn-sm {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--spacing-4) var(--spacing-6);
    font-size: var(--text-base);
}

/* ===== FORMULÃRIOS ===== */
.form-group {
    margin-bottom: var(--spacing-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    margin-bottom: var(--spacing-2);
}

.form-control,
.form-select {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded-lg);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* ===== ANIMAÃ‡Ã•ES ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ===== RESPONSIVIDADE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .filters-form {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .audit-table {
        font-size: var(--text-xs);
    }
    
    .audit-table th,
    .audit-table td {
        padding: var(--spacing-3) var(--spacing-4);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .content-wrapper {
        padding: var(--spacing-4) var(--spacing-3);
    }
    
    .page-title {
        font-size: var(--text-2xl);
        flex-direction: column;
        gap: var(--spacing-2);
    }
    
    .page-subtitle {
        font-size: var(--text-base);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .filters-form {
        grid-template-columns: 1fr;
        gap: var(--spacing-3);
    }
    
    .filter-actions {
        grid-column: 1;
        justify-content: stretch;
        flex-direction: column;
    }
    
    .filter-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .filters-extra {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-3);
    }
    
    .items-per-page {
        justify-content: space-between;
    }
    
    .audit-table-container {
        overflow-x: auto;
    }
    
    .audit-table {
        min-width: 600px;
    }
    
    .export-actions {
        justify-content: stretch;
        flex-direction: column;
    }
    
    .audit-pagination {
        flex-wrap: wrap;
        gap: var(--spacing-1);
    }
    
    .audit-pagination a,
    .audit-pagination span {
        min-width: 35px;
        height: 35px;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .audit-action-badge {
        min-width: auto;
        padding: var(--spacing-1) var(--spacing-2);
    }
    
    .log-details {
        max-width: 200px;
    }
    
    .stat-card {
        padding: var(--spacing-4);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    .card-body {
        padding: var(--spacing-4);
    }
}

/* ===== IMPRESSÃƒO ===== */
@media print {
    .audit-filters,
    .export-actions,
    .audit-pagination,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .content-wrapper {
        max-width: none;
        padding: 0;
    }
    
    .audit-table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .audit-table th,
    .audit-table td {
        padding: var(--spacing-2);
        font-size: var(--text-xs);
    }
    
    body {
        background: white;
    }
    
    .audit-action-badge {
        background: transparent !important;
        border: 1px solid #666 !important;
        color: #333 !important;
    }
}

/* ===== CORREÃ‡Ã•ES ESPECÃFICAS PARA PATRIMÃ”NIO ===== */

/* Container principal */
.patrimonio-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* CÃ³digo do item */
.item-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(184, 134, 11, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* InformaÃ§Ãµes do item */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    font-weight: 600;
    color: var(--gray-900);
}

.item-details {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Badge de localizaÃ§Ã£o */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.location-badge i {
    color: var(--primary-color);
}

/* Badge de valor */
.value-badge {
    font-weight: 600;
    color: var(--success-color);
    background: rgba(33, 116, 88, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* ===== CORREÃ‡Ã•ES PARA DASHBOARD ===== */

/* Containers de grÃ¡ficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.chart-container {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.chart-title i {
    color: var(--primary-color);
}

/* Canvas dos grÃ¡ficos */
canvas {
    max-height: 300px !important;
    margin-bottom: var(--spacing-4);
}

/* Legenda customizada */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-size: 0.875rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-color.success { background: #217458; }
.legend-color.primary { background: #1E40AF; }
.legend-color.warning { background: #f59e0b; }
.legend-color.danger { background: #ef4444; }
.legend-color.info { background: #6366f1; }
.legend-color.secondary { background: #6b7280; }

/* Grid de informaÃ§Ãµes */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-6);
}

/* Itens recentes */
.recent-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.recent-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: var(--spacing-3);
    border-radius: var(--border-radius);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.recent-item .item-info {
    flex: 1;
}

.recent-item .item-name {
    font-weight: 500;
    color: var(--gray-900);
}

.recent-item .item-code {
    font-size: 0.75rem;
    margin-top: 2px;
}

.recent-item .item-date {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Logs de auditoria */
.audit-logs {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.audit-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: var(--spacing-3);
    border-radius: var(--border-radius);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.audit-item .audit-info {
    flex: 1;
}

.audit-item .audit-action {
    font-weight: 500;
    color: var(--gray-900);
    font-size: 0.875rem;
}

.audit-item .audit-user {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 2px;
}

.audit-item .audit-date {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Estado vazio pequeno */
.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-8);
    text-align: center;
    color: var(--gray-500);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: var(--spacing-3);
    opacity: 0.5;
}

.empty-state-small p {
    margin: 0;
    font-size: 0.875rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: var(--spacing-4);
    }
    
    canvas {
        max-height: 200px !important;
    }
}
/* ===== ESTILOS COMPLEMENTARES PARA GRÃFICOS E DASHBOARD ===== */
/* Adicione ao final do seu styles.css ou crie um arquivo separado */

/* Grid de grÃ¡ficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Legendas dos grÃ¡ficos */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Cores das legendas - Estados */
.legend-success { background: #217458; }
.legend-primary { background: #1E40AF; }
.legend-warning { background: #f59e0b; }
.legend-danger { background: #ef4444; }
.legend-info { background: #6366f1; }
.legend-secondary { background: #6b7280; }

/* Grid de informaÃ§Ãµes */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Itens recentes e logs */
.recent-items,
.audit-logs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-item,
.audit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.recent-item:hover,
.audit-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.recent-item .item-info,
.audit-item .audit-info {
    flex: 1;
    min-width: 0; /* Para ellipsis funcionar */
}

.recent-item .item-name,
.audit-item .audit-action {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item .item-code {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
}

.audit-item .audit-user {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.recent-item .item-date,
.audit-item .audit-date {
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Estado vazio pequeno */
.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state-small i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state-small p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

/* InformaÃ§Ãµes de data */
.date-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.date-info i {
    color: #1E40AF;
}

/* Canvas dos grÃ¡ficos */
canvas {
    max-height: 300px !important;
    margin: 0 auto;
}

/* Melhorias para cards do dashboard */
.card canvas {
    display: block;
    margin: 0 auto 1rem;
}

/* AnimaÃ§Ã£o de fade-in */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects para stats cards */
.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

/* Melhorias de acessibilidade */
.btn:focus,
.form-input:focus,
.form-select:focus {
    outline: 2px solid #1E40AF;
    outline-offset: 2px;
}

/* Estilos para impressÃ£o */
@media print {
    .header-actions,
    .card-actions,
    .action-buttons,
    .btn {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .page-header {
        border-bottom: 2px solid #000;
    }
    
    .stats-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    canvas {
        max-height: 200px !important;
    }
}

/* Responsividade adicional */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .date-info {
        display: none;
    }
    
    .recent-item,
    .audit-item {
        padding: 0.5rem 0.75rem;
    }
    
    .recent-item .item-date,
    .audit-item .audit-date {
        font-size: 0.75rem;
        margin-left: 0.5rem;
    }
    
    .chart-legend {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .legend-item {
        gap: 0.5rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .recent-item,
    .audit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .recent-item .item-date,
    .audit-item .audit-date {
        margin-left: 0;
        align-self: flex-end;
    }
    
    canvas {
        max-height: 250px !important;
    }
    
    .empty-state-small {
        padding: 2rem 1rem;
    }
    
    .empty-state-small i {
        font-size: 2rem;
    }
}

/* Melhorias de performance */
* {
    box-sizing: border-box;
}

.card,
.stat-card,
.btn {
    will-change: transform;
}

/* ===== ESTILOS PADRONIZADOS PARA PATRIMÃ”NIO ===== */
/* Adicione este cÃ³digo ao seu arquivo styles.css existente */

/* Stats row igual Ã s categorias */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.stat-primary { background: linear-gradient(135deg, #1E40AF, #1E3A8A); }
.stat-success { background: linear-gradient(135deg, #217458, #059669); }
.stat-info { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.stat-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

/* Cards padronizados */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.card-title i {
    color: #1E40AF;
    font-size: 1rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-content {
    padding: 1.5rem;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: transparent;
    color: #6b7280;
}

.btn-icon:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.8);
}

.btn-icon.active {
    background: white;
    color: #1E40AF;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Filtros padronizados */
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-group .form-label i {
    color: #1E40AF;
    width: 16px;
    text-align: center;
}

.form-input,
.form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* BotÃµes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1E40AF;
    color: white;
    border-color: #1E40AF;
}

.btn-primary:hover {
    background: #1E3A8A;
    border-color: #1E3A8A;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Tabela padronizada */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table-row:hover {
    background: #f8fafc;
}

.row-inactive {
    opacity: 0.6;
    background: #f9fafb;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Elementos da tabela */
.item-code-wrapper {
    display: flex;
    align-items: center;
}

.item-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    color: #1E40AF;
    background: rgba(184, 134, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    letter-spacing: 0.025em;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.item-details {
    font-size: 0.8125rem;
    color: #6b7280;
}

.item-serial {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Badges */
.category-badge,
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #374151;
    max-width: 100%;
}

.category-badge i,
.location-badge i {
    color: #1E40AF;
    flex-shrink: 0;
}

.category-badge span,
.location-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.value-badge {
    display: inline-block;
    font-weight: 600;
    color: #059669;
    background: rgba(33, 116, 88, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    border: 1px solid rgba(33, 116, 88, 0.2);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.status-active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-inactive {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-excelente {
    background: #dcfce7;
    color: #166534;
}

.status-bom {
    background: #FFF5D6;
    color: #1e40af;
}

.status-regular {
    background: #fef3c7;
    color: #92400e;
}

.status-ruim {
    background: #fee2e2;
    color: #991b1b;
}

.status-manutenÃ§Ã£o {
    background: #e0e7ff;
    color: #3730a3;
}

/* AÃ§Ãµes horizontais */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.action-buttons .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: transparent;
}

.action-buttons .btn-icon:hover {
    transform: translateY(-1px);
}

.btn-view {
    color: #1E40AF;
    border-color: #FFF5D6;
    background: #eff6ff;
}

.btn-view:hover {
    background: #FFF5D6;
    border-color: #1E40AF;
}

.btn-edit {
    color: #059669;
    border-color: #d1fae5;
    background: #ecfdf5;
}

.btn-edit:hover {
    background: #d1fae5;
    border-color: #059669;
}

.btn-toggle {
    color: #d97706;
    border-color: #fed7aa;
    background: #fff7ed;
}

.btn-toggle:hover {
    background: #fed7aa;
    border-color: #d97706;
}

.btn-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-delete:hover {
    background: #fecaca;
    border-color: #dc2626;
}

.btn-qr {
    color: #7c3aed;
    border-color: #e9d5ff;
    background: #faf5ff;
}

.btn-qr:hover {
    background: #e9d5ff;
    border-color: #7c3aed;
}

/* PaginaÃ§Ã£o */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Mensagens */
.message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message i {
    font-size: 1rem;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
}

.page-title i {
    color: #1E40AF;
}

.page-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsividade */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .filters-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        gap: 0.125rem;
    }
    
    .action-buttons .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .table-responsive {
        font-size: 0.8125rem;
    }
    
    .page-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .filters-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filters-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ESTILOS PADRONIZADOS PARA PATRIMÃ”NIO ===== */
/* Adicione este cÃ³digo ao seu arquivo styles.css existente */

/* Layout principal */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper {
    width: 100%;
    padding: 2rem 0;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
}

.page-title i {
    color: var(--primary-color, #1E40AF);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mensagens */
.message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message i {
    font-size: 1rem;
}

/* Stats row igual Ã s categorias */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.stat-primary { background: linear-gradient(135deg, #1E40AF, #1E3A8A); }
.stat-success { background: linear-gradient(135deg, #217458, #059669); }
.stat-info { background: inherit; }
.stat-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

/* Cards padronizados */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.card-title i {
    color: #1E40AF;
    font-size: 1rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-content {
    padding: 1.5rem;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: transparent;
    color: #6b7280;
}

.btn-icon:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.8);
}

.btn-icon.active {
    background: white;
    color: #1E40AF;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Filtros padronizados */
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-group .form-label i {
    color: #1E40AF;
    width: 16px;
    text-align: center;
}

.form-input,
.form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* BotÃµes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1E40AF;
    color: white;
    border-color: #1E40AF;
}

.btn-primary:hover {
    background: #1E3A8A;
    border-color: #1E3A8A;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Tabela padronizada */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table-row:hover {
    background: #f8fafc;
}

.row-inactive {
    opacity: 0.6;
    background: #f9fafb;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Elementos da tabela */
.item-code-wrapper {
    display: flex;
    align-items: center;
}

.item-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    color: #1E40AF;
    background: rgba(184, 134, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    letter-spacing: 0.025em;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.item-details {
    font-size: 0.8125rem;
    color: #6b7280;
}

.item-serial {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Badges */
.category-badge,
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #374151;
    max-width: 100%;
}

.category-badge i,
.location-badge i {
    color: #1E40AF;
    flex-shrink: 0;
}

.category-badge span,
.location-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.value-badge {
    display: inline-block;
    font-weight: 600;
    color: #059669;
    background: rgba(33, 116, 88, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    border: 1px solid rgba(33, 116, 88, 0.2);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.status-active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-inactive {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-excelente {
    background: #dcfce7;
    color: #166534;
}

.status-bom {
    background: #FFF5D6;
    color: #1e40af;
}

.status-regular {
    background: #fef3c7;
    color: #92400e;
}

.status-ruim {
    background: #fee2e2;
    color: #991b1b;
}

.status-manutenÃ§Ã£o {
    background: #e0e7ff;
    color: #3730a3;
}

/* AÃ§Ãµes horizontais */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.action-buttons .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: transparent;
}

.action-buttons .btn-icon:hover {
    transform: translateY(-1px);
}

.btn-view {
    color: #1E40AF;
    border-color: #FFF5D6;
    background: #eff6ff;
}

.btn-view:hover {
    background: #FFF5D6;
    border-color: #1E40AF;
}

.btn-edit {
    color: #059669;
    border-color: #d1fae5;
    background: #ecfdf5;
}

.btn-edit:hover {
    background: #d1fae5;
    border-color: #059669;
}

.btn-toggle {
    color: #d97706;
    border-color: #fed7aa;
    background: #fff7ed;
}

.btn-toggle:hover {
    background: #fed7aa;
    border-color: #d97706;
}

.btn-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-delete:hover {
    background: #fecaca;
    border-color: #dc2626;
}

.btn-qr {
    color: #7c3aed;
    border-color: #e9d5ff;
    background: #faf5ff;
}

.btn-qr:hover {
    background: #e9d5ff;
    border-color: #7c3aed;
}

/* PaginaÃ§Ã£o */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Mensagens */
.message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message i {
    font-size: 1rem;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
}

.page-title i {
    color: #1E40AF;
}

.page-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsividade */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .filters-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        gap: 0.125rem;
    }
    
    .action-buttons .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .table-responsive {
        font-size: 0.8125rem;
    }
    
    .page-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .filters-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filters-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/**
 * PatrimÃ´nioTech - Estilos especÃ­ficos para PatrimÃ´nio
 * Complementa o styles.css principal com estilos especÃ­ficos da Ã¡rea de patrimÃ´nio
 * 
 * @version 5.1.0 - PADRÃƒO VISUAL CORRIGIDO
 */

/* ===== LAYOUT ESPECÃFICO DO PATRIMÃ”NIO ===== */
.patrimonio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-4);
}

/* ===== CARDS DE ESTATÃSTICAS ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-6);
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-xl);
    padding: var(--spacing-5);
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--rounded-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: white;
    flex-shrink: 0;
}

.stat-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stat-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.stat-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.stat-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--gray-800);
    margin: 0 0 var(--spacing-1) 0;
    line-height: 1.2;
}

.stat-label {
    color: var(--gray-600);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin: 0;
}

/* ===== FILTROS ===== */
.filter-form {
    background: var(--gray-50);
    padding: var(--spacing-6);
    border-radius: var(--rounded-lg);
    border: 1px solid var(--gray-200);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-4);
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-actions {
    display: flex;
    gap: var(--spacing-3);
    justify-content: flex-end;
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--gray-200);
}

/* ===== TABELA DE PATRIMÃ”NIO ===== */
.table-container {
    overflow-x: auto;
    margin: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: var(--font-semibold);
    padding: var(--spacing-3) var(--spacing-4);
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.table td {
    padding: var(--spacing-3) var(--spacing-4);
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table .row-inactive {
    background: rgba(239, 68, 68, 0.05);
    color: var(--gray-500);
}

.table .row-inactive:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ===== BADGES E INDICADORES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--rounded);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fecaca;
    color: #991b1b;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

.badge-category {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-location {
    background: #ecfdf5;
    color: #059669;
}

/* ===== INFORMAÃ‡Ã•ES DOS ITENS ===== */
.item-info {
    min-width: 200px;
}

.item-info strong {
    color: var(--gray-800);
    font-weight: var(--font-semibold);
}

.text-muted {
    color: var(--gray-500);
}

.text-success {
    color: var(--success);
    font-weight: var(--font-semibold);
}

/* ===== GRUPOS DE BOTÃ•ES ===== */
.btn-group {
    display: flex;
    gap: var(--spacing-1);
}

.btn-sm {
    padding: var(--spacing-1) var(--spacing-2);
    font-size: var(--text-xs);
    border-radius: var(--rounded-sm);
}

.btn-sm i {
    font-size: var(--text-xs);
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    color: var(--gray-500);
}

.empty-icon {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: var(--spacing-4);
}

.empty-state h3 {
    font-size: var(--text-xl);
    color: var(--gray-600);
    margin-bottom: var(--spacing-2);
}

.empty-state p {
    font-size: var(--text-base);
    line-height: 1.6;
}

.empty-state a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ===== PAGINAÃ‡ÃƒO ===== */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-4) 0;
}

.pagination {
    display: flex;
    gap: var(--spacing-1);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    color: var(--gray-600);
    text-decoration: none;
    font-size: var(--text-sm);
    min-width: 40px;
    height: 36px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--gray-50);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--rounded-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--spacing-4) var(--spacing-6);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: var(--text-lg);
    color: var(--gray-800);
}

.btn-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.btn-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: var(--spacing-6);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-container {
        font-size: var(--text-xs);
    }
    
    .table th,
    .table td {
        padding: var(--spacing-2) var(--spacing-3);
    }
    
    .btn-group {
        flex-direction: column;
        gap: var(--spacing-1);
    }
    
    .pagination-wrapper {
        flex-direction: column;
        gap: var(--spacing-3);
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-content {
        width: 95%;
        margin: var(--spacing-4);
    }
}

@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        gap: var(--spacing-3);
        text-align: center;
    }
    
    .card-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .table th,
    .table td {
        font-size: var(--text-xs);
        padding: var(--spacing-1) var(--spacing-2);
    }
    
    /* Esconder algumas colunas em telas muito pequenas */
    .table .hide-mobile {
        display: none;
    }
}

/* ===== ANIMAÃ‡Ã•ES ===== */
.fade-in {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ESTADOS DE LOADING ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.table tbody tr:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .badge {
        border: 1px solid currentColor;
    }
    
    .table th,
    .table td {
        border-color: var(--gray-600);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .btn,
    .filter-form,
    .pagination-wrapper,
    .modal {
        display: none !important;
    }
    
    .table {
        border: 1px solid #000;
    }
    
    .table th,
    .table td {
        border: 1px solid #000;
        padding: 8px;
    }
    
    .badge {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }
}

/* ===== CORREÃ‡ÃƒO PARA BOTÃ•ES DE AÃ‡ÃƒO DOS USUÃRIOS ===== */
/* Adicione esta seÃ§Ã£o ao final do arquivo styles.css existente */

/* Container dos botÃµes de aÃ§Ã£o */
.action-buttons {
    display: flex;
    gap: var(--spacing-1, 0.25rem);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Estilo base para botÃµes de aÃ§Ã£o */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--rounded, 6px);
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #6b7280);
    text-decoration: none;
    font-size: var(--text-sm, 0.875rem);
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
}

.btn-action:focus {
    outline: 2px solid var(--primary, #1E40AF);
    outline-offset: 2px;
}

/* VariaÃ§Ãµes dos botÃµes por tipo de aÃ§Ã£o */

/* BotÃ£o Editar */
.btn-action.btn-edit {
    background: #fef3c7;
    color: #d97706;
    border-color: #fed7aa;
}

.btn-action.btn-edit:hover {
    background: #fcd34d;
    color: #92400e;
    border-color: #f59e0b;
}

/* BotÃ£o Warning (Resetar senha) */
.btn-action.btn-warning {
    background: #fef3c7;
    color: #d97706;
    border-color: #fed7aa;
}

.btn-action.btn-warning:hover {
    background: #fcd34d;
    color: #92400e;
    border-color: #f59e0b;
}

/* BotÃ£o Secondary (Desativar) */
.btn-action.btn-secondary {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-600, #6b7280);
    border-color: var(--gray-300, #d1d5db);
}

.btn-action.btn-secondary:hover {
    background: var(--gray-200, #e5e7eb);
    color: var(--gray-800, #1f2937);
    border-color: var(--gray-400, #9ca3af);
}

/* BotÃ£o Success (Ativar) */
.btn-action.btn-success {
    background: #d1fae5;
    color: #059669;
    border-color: #a7f3d0;
}

.btn-action.btn-success:hover {
    background: #6ee7b7;
    color: #047857;
    border-color: #217458;
}

/* BotÃ£o Danger (Excluir) */
.btn-action.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-action.btn-danger:hover {
    background: #fca5a5;
    color: #991b1b;
    border-color: #ef4444;
}

/* BotÃ£o Primary */
.btn-action.btn-primary {
    background: #FFF5D6;
    color: #1E3A8A;
    border-color: #bfdbfe;
}

.btn-action.btn-primary:hover {
    background: #93c5fd;
    color: #1d4ed8;
    border-color: #1E40AF;
}

/* BotÃ£o Info */
.btn-action.btn-info {
    background: #eff6ff;
    color: #1E3A8A;
    border-color: #bfdbfe;
}

.btn-action.btn-info:hover {
    background: #93c5fd;
    color: #1d4ed8;
    border-color: #1E40AF;
}

/* Estados especiais */
.btn-action:disabled,
.btn-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-action:disabled:hover,
.btn-action.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .action-buttons {
        gap: 0.125rem;
        flex-wrap: wrap;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .btn-action {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}

/* ===== COMPATIBILIDADE COM ESTILOS ANTIGOS ===== */
/* Caso existam botÃµes usando as classes antigas, manter compatibilidade */

.btn-edit:hover {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border-color: #fed7aa !important;
}

.btn-delete:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.btn-view:hover {
    background: #eff6ff !important;
    color: #1E3A8A !important;
    border-color: #bfdbfe !important;
}

/* ===== CORREÃ‡ÃƒO PARA BOTÃ•ES SM EXISTENTES ===== */
.btn-sm.btn-primary {
    background: linear-gradient(135deg, var(--primary, #1E40AF) 0%, var(--primary-dark, #1E3A8A) 100%);
    color: white;
    border: none;
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

.btn-sm.btn-warning {
    background: linear-gradient(135deg, var(--warning, #f59e0b) 0%, #d97706 100%);
    color: white;
    border: none;
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

.btn-sm.btn-secondary {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-700, #374151);
    border: 1px solid var(--gray-300, #d1d5db);
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

.btn-sm.btn-success {
    background: linear-gradient(135deg, var(--success, #217458) 0%, #059669 100%);
    color: white;
    border: none;
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

.btn-sm.btn-danger {
    background: linear-gradient(135deg, var(--danger, #ef4444) 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: var(--spacing-2, 0.5rem) var(--spacing-3, 0.75rem);
}

/* Hover effects para botÃµes sm */
.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

/* ===== FIM DA CORREÃ‡ÃƒO ===== */

/* ============================================================================ */
/* CSS PARA PADRONIZAR IMAGENS DO PATRIMÃ”NIO                                   */
/* Adicione este cÃ³digo ao final do seu arquivo styles.css                     */
/* ============================================================================ */

/* IMAGENS NA VISUALIZAÃ‡ÃƒO INDIVIDUAL (patrimonio_view.php) */
.imagem-patrimonio {
    height: 200px;           /* Altura fixa */
    width: auto;             /* Largura automÃ¡tica para manter proporÃ§Ã£o */
    max-width: 100%;         /* NÃ£o ultrapassar o container */
    object-fit: cover;       /* Cobrir o espaÃ§o sem distorÃ§Ã£o */
    object-position: center; /* Centralizar a imagem */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;          /* Centralizar horizontalmente */
}

.imagem-patrimonio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* CONTAINER DA IMAGEM */
.imagem-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.imagem-container {
    text-align: center;
    padding: 1rem;
    min-height: 250px;       /* Altura mÃ­nima para evitar "pulo" */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* THUMBNAILS NA LISTAGEM (patrimonio_list.php) */
.thumbnail-lista {
    height: 60px;            /* Altura fixa para thumbnails */
    width: auto;             /* Largura automÃ¡tica */
    max-width: 80px;         /* Largura mÃ¡xima para nÃ£o ocupar muito espaÃ§o */
    object-fit: cover;       /* Cobrir sem distorÃ§Ã£o */
    object-position: center;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: block;
}

.thumbnail-lista:hover {
    transform: scale(1.1);
}

/* IMAGEM NO MODAL AMPLIADO */
.imagem-ampliada {
    max-width: 100%;
    max-height: 70vh;        /* MÃ¡ximo 70% da altura da tela */
    width: auto;             /* Largura automÃ¡tica */
    height: auto;            /* Altura automÃ¡tica */
    object-fit: contain;     /* Mostrar imagem completa sem cortar */
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* PREVIEW NO UPLOAD */
.preview-imagem {
    text-align: center;
    margin-top: 1rem;
}

.preview-imagem img {
    height: 150px;           /* Altura fixa para preview */
    width: auto;             /* Largura automÃ¡tica */
    max-width: 250px;        /* Largura mÃ¡xima */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ESTADO SEM IMAGEM - Padronizar altura */
.sem-imagem {
    padding: 3rem 1rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    min-height: 200px;       /* Mesma altura da imagem */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sem-imagem i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sem-imagem p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* ESTILOS PARA DIFERENTES FORMATOS DE IMAGEM */
.imagem-patrimonio.formato-quadrado {
    height: 200px;
    width: 200px;            /* Quadrado perfeito */
    object-fit: cover;
}

.imagem-patrimonio.formato-retangulo {
    height: 200px;
    width: auto;
    min-width: 250px;        /* Largura mÃ­nima para retÃ¢ngulos */
    max-width: 400px;        /* Largura mÃ¡xima */
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .imagem-patrimonio {
        height: 150px;       /* Menor em telas pequenas */
        max-width: 100%;
    }
    
    .thumbnail-lista {
        height: 50px;        /* Thumbnails menores em mobile */
        max-width: 60px;
    }
    
    .imagem-ampliada {
        max-height: 60vh;    /* Menos espaÃ§o vertical em mobile */
    }
    
    .preview-imagem img {
        height: 120px;       /* Preview menor em mobile */
        max-width: 200px;
    }
    
    .sem-imagem {
        min-height: 150px;   /* Ãrea menor sem imagem */
        padding: 2rem 1rem;
    }
    
    .sem-imagem i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .imagem-patrimonio {
        height: 120px;       /* Ainda menor em telas muito pequenas */
    }
    
    .thumbnail-lista {
        height: 40px;
        max-width: 50px;
    }
}

/* ESTILOS PARA GRID DE IMAGENS (se houver mÃºltiplas imagens) */
.galeria-imagens {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.galeria-imagens .imagem-patrimonio {
    height: 180px;           /* Altura uniforme para galeria */
    width: 100%;             /* Ocupar toda a cÃ©lula do grid */
}

/* INDICADOR DE LOADING PARA IMAGENS */
.imagem-loading {
    height: 200px;
    width: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    margin: 0 auto;
}

.imagem-loading::before {
    content: "Carregando...";
    font-size: 0.9rem;
}

/* OVERLAY PARA AÃ‡Ã•ES DA IMAGEM */
.imagem-preview {
    position: relative;
}

.imagem-acoes {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    gap: 5px;
}

.imagem-preview:hover .imagem-acoes {
    opacity: 1;
}

.btn-imagem-acao {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-imagem-acao:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* FALLBACK PARA IMAGENS COM ERRO */
.imagem-patrimonio[src=""],
.imagem-patrimonio[src*="placeholder"] {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    position: relative;
}

.imagem-patrimonio[src=""]:before,
.imagem-patrimonio[src*="placeholder"]:before {
    content: "ðŸ“·";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.5;
}

/* ANIMAÃ‡Ã•ES */
@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.imagem-patrimonio {
    animation: fadeInImage 0.3s ease-out;
}

/* ESTILOS PARA MODAL DE IMAGEM */
.modal-imagem .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
}

.modal-imagem-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* OTIMIZAÃ‡Ã•ES DE PERFORMANCE */
.imagem-patrimonio,
.thumbnail-lista {
    will-change: transform;
    backface-visibility: hidden;
}

/* ACESSIBILIDADE */
.imagem-patrimonio:focus,
.thumbnail-lista:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* PRINT STYLES */
@media print {
    .imagem-patrimonio {
        height: auto;
        max-height: 15cm;
        width: auto;
        max-width: 10cm;
        object-fit: contain;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .imagem-acoes {
        display: none;
    }
}

/* ===================================================
   CSS ESPECÃFICO - APENAS LISTA DE LOCALIZAÃ‡Ã•ES
   Remova o CSS anterior e use apenas este cÃ³digo
   =================================================== */

/* ===== REMOVE O CSS ANTERIOR PRIMEIRO! ===== */
/* Comente ou delete o CSS que vocÃª colocou antes */

/* ===== CSS SEGURO E ESPECÃFICO ===== */

/* OpÃ§Ã£o 1: Por arquivo especÃ­fico (se possÃ­vel identificar) */
body[data-page*="localizacao"] .data-table td,
body[data-page*="localizacao"] .data-table th {
    font-size: 0.875rem !important;
}

/* OpÃ§Ã£o 2: Por URL/pÃ¡gina especÃ­fica */
body.page-localizacao .data-table,
body.page-localizacao .data-table td,
body.page-localizacao .data-table th {
    font-size: 0.875rem !important;
}

/* OpÃ§Ã£o 3: Apenas tabelas com muitas colunas (provavelmente localizaÃ§Ãµes) */
.data-table:has(th:nth-child(7)) td,
.data-table:has(th:nth-child(7)) th {
    font-size: 0.875rem !important;
}

/* OpÃ§Ã£o 4: Por conteÃºdo especÃ­fico da tabela */
.data-table:has(th:contains("LocalizaÃ§Ã£o")) td,
.data-table:has(th:contains("LocalizaÃ§Ã£o")) th,
.data-table:has(th:contains("ResponsÃ¡vel")) td,
.data-table:has(th:contains("ResponsÃ¡vel")) th {
    font-size: 0.875rem !important;
}

/* OpÃ§Ã£o 5: Mais conservadora - apenas elementos muito especÃ­ficos */
td:has(.location-name),
td:has(.location-info),
.location-name,
.location-info,
.sector-info,
.location-block {
    font-size: 0.875rem !important;
}

/* ===== SOLUÃ‡ÃƒO MANUAL MAIS SEGURA ===== */

/* Use esta se as outras nÃ£o funcionarem */
/* Adicione uma classe especÃ­fica no HTML da lista */
.lista-localizacoes-fix {
    font-size: 0.875rem !important;
}

.lista-localizacoes-fix .data-table td,
.lista-localizacoes-fix .data-table th {
    font-size: 0.875rem !important;
}

.lista-localizacoes-fix .location-name {
    font-size: 0.875rem !important;
    font-weight: 500;
}

.lista-localizacoes-fix .location-block,
.lista-localizacoes-fix .floor-name,
.lista-localizacoes-fix .sector-name {
    font-size: 0.75rem !important;
    color: #6b7280;
}

/* ===== RESET PARA OUTROS ELEMENTOS ===== */

/* Se outros elementos ficaram pequenos, force eles de volta */
h1, h2, h3, h4, h5, h6 {
    font-size: revert !important;
}

.btn {
    font-size: 0.875rem !important; /* BotÃµes mantÃ©m tamanho normal */
}

.form-input,
.form-select {
    font-size: 0.875rem !important; /* FormulÃ¡rios mantÃ©m tamanho normal */
}

/* ===== INSTRUÃ‡Ã•ES DE USO ===== */

/*
PASSO A PASSO:

1. REMOVA todo o CSS anterior que vocÃª adicionou
2. Adicione APENAS o cÃ³digo acima
3. Se ainda nÃ£o funcionar, vÃ¡ para a "SoluÃ§Ã£o Manual" abaixo

SOLUÃ‡ÃƒO MANUAL (mais garantida):
1. No arquivo localizacao_list.php, encontre a div principal
2. Adicione a classe: <div class="lista-localizacoes-fix">
3. Use apenas o CSS da seÃ§Ã£o "SOLUÃ‡ÃƒO MANUAL MAIS SEGURA"
*/

/* =====================================================
   RESPONSIVIDADE COMPLETA - HEADER CENTRALIZADO
   PatrimÃ´nioTech v7.0 FINAL - Layout Simples e Elegante
   
   SUBSTITUA TODO O BLOCO RESPONSIVO NO styles.css
   ===================================================== */

/* ===== HEADER RESPONSIVO - CENTRALIZADO ===== */
.nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    /* ===== CONTAINER PRINCIPAL ===== */
    .header-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
        gap: 1rem !important;
        position: relative !important;
    }
    
    /* ===== HAMBURGER - CANTO SUPERIOR DIREITO ===== */
    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        background: none !important;
        border: none !important;
        padding: 0.5rem !important;
        cursor: pointer !important;
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        z-index: 1001 !important;
        width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .nav-toggle span {
        width: 24px !important;
        height: 2px !important;
        background: white !important;
        transition: all 0.3s ease !important;
        border-radius: 2px !important;
        display: block !important;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px) !important;
    }
    
    /* ===== BRAND (LOGO + TÃTULO) - CENTRALIZADO ===== */
    .header-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
        text-align: center !important;
        order: 1 !important;
    }
    
    .header-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .header-title {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .header-title h1 {
        font-size: 1.25rem !important;
        color: white !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
    }
    
    .header-title p {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    /* ===== USER MENU - CENTRALIZADO ===== */
    .header-user {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 2 !important;
        width: 100% !important;
    }
    
    .user-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.75rem 1rem !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 2rem !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        min-height: 44px !important;
    }
    
    .user-menu:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: translateY(-1px) !important;
    }
    
    .user-avatar {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        flex-shrink: 0 !important;
    }
    
    .user-avatar img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    
    .user-avatar i {
        font-size: 1.5rem !important;
        line-height: 1 !important;
        color: white !important;
    }
    
    .user-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        line-height: 1.2 !important;
    }
    
    .user-name {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
        color: white !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }
    
    .user-email {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        color: rgba(255, 255, 255, 0.85) !important;
        white-space: nowrap !important;
    }
    
    .user-dropdown-arrow {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-size: 0.75rem !important;
        margin-left: 0.25rem !important;
    }
    
    /* ===== MENU MOBILE ===== */
    .header-nav {
        display: none !important;
        width: 100% !important;
        order: 3 !important;
        background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%) !important;
        padding: 1rem 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: 0.5rem !important;
    }
    
    .header-nav.mobile-open {
        display: block !important;
        animation: slideDown 0.3s ease !important;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-links {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.25rem !important;
        padding: 0 0.5rem !important;
    }
    
    .nav-link {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        justify-content: flex-start !important;
        border-radius: 0.375rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
    }
    
    .nav-link.active {
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        font-weight: 600 !important;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        margin-left: 1rem !important;
        margin-top: 0.5rem !important;
        background: rgba(0, 0, 0, 0.15) !important;
        border-radius: 0.375rem !important;
    }
    
    .nav-dropdown.show .dropdown-menu {
        display: block !important;
    }
    
    .nav-dropdown .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .nav-dropdown .dropdown-menu .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
    }
    
    .nav-dropdown .dropdown-menu .dropdown-item.highlight {
        background: rgba(255, 193, 7, 0.2) !important;
        border-left: 3px solid #ffc107 !important;
        color: #fff !important;
        font-weight: 600 !important;
    }
    
    .nav-dropdown .dropdown-menu .dropdown-item.highlight:hover {
        background: rgba(255, 193, 7, 0.3) !important;
    }
    
    .nav-dropdown .dropdown-menu .dropdown-divider {
        background: rgba(255, 255, 255, 0.2) !important;
        height: 1px !important;
        margin: 0.5rem 0 !important;
    }
    
    .dropdown-arrow {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .user-dropdown {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        top: 100% !important;
        margin-top: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .header-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.25rem !important;
    }
    
    .header-title h1 {
        font-size: 1.125rem !important;
    }
    
    .header-title p {
        font-size: 0.75rem !important;
    }
    
    .user-email {
        display: none !important;
    }
}

@media (max-width: 374px) {
    .header-title h1 {
        font-size: 1rem !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    .user-dropdown-arrow {
        display: none !important;
    }
}

/* ===== TABELAS RESPONSIVAS ===== */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    .action-buttons {
        display: flex;
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 0.75rem;
    }
    
    .btn-icon .btn-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .table {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.375rem 0.5rem;
    }
}

/* ===== FORMULÃRIOS RESPONSIVOS ===== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important;
        min-height: 44px;
        width: 100%;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-actions {
        width: 100%;
    }
}

/* ===== CARDS DE ESTATÃSTICAS ===== */
@media (max-width: 768px) {
    .stats-row,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .stats-row,
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
}

/* ===== MODAIS RESPONSIVOS ===== */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        width: calc(100% - 2rem);
        max-width: 100%;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
        border-radius: 0.5rem;
    }
}

/* ===== IMAGENS RESPONSIVAS ===== */
.imagem-patrimonio {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .imagem-patrimonio {
        max-height: 200px;
        width: 100%;
        object-fit: cover;
    }
    
    .preview-imagem img {
        max-height: 150px;
        max-width: 100%;
    }
    
    .galeria-imagens {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .imagem-patrimonio {
        max-height: 150px;
    }
    
    .thumbnail-lista {
        height: 40px;
        width: 40px;
    }
}

/* ===== PAGINAÃ‡ÃƒO RESPONSIVA ===== */
@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination-info {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination-controls a,
    .pagination-controls button {
        min-width: 36px;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .pagination-controls a,
    .pagination-controls button {
        min-width: 32px;
        padding: 0.375rem;
        font-size: 0.8125rem;
    }
}

/* ===== UTILITIES RESPONSIVAS ===== */
.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .mobile-icon-only .btn-text,
    .mobile-icon-only span:not(.icon) {
        display: none;
    }
}

@media (max-width: 768px) {
    button,
    .btn,
    a.btn,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem 0.75rem;
    }
    
    .page-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

*:focus-visible {
    outline: 2px solid var(--primary, #1E40AF);
    outline-offset: 2px;
}

@media print {
    .header,
    .nav-toggle,
    .header-nav,
    .btn,
    .filter-form,
    .pagination-wrapper,
    .modal {
        display: none !important;
    }
    
    .content-wrapper {
        max-width: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}

/* =====================================================
   FIM DA RESPONSIVIDADE COMPLETA v7.0
   ===================================================== */

/* ============================================================
   ðŸ”§ CORREÃ‡ÃƒO DEFINITIVA - HEADER 90% + SEM QUEBRA
   
   Cole este CSS no FINAL do arquivo styles.css
   (substitua o CSS anterior se jÃ¡ colou)
   ============================================================ */

/* ===== AUMENTAR LARGURA DO HEADER PARA 90% ===== */

.header .header-content,
header .header-content {
    max-width: 95% !important; /* Aumentado para 95% */
    width: 95% !important;
    margin: 0 auto !important;
    padding: 0.75rem 1rem !important;
    min-height: 60px !important;
}

/* ===== TAMANHOS AINDA MENORES PARA CABER EM 1 LINHA ===== */

/* TÃ­tulo principal - MUITO REDUZIDO */
.header .header-title h1,
.header h1,
header .header-title h1,
header h1 {
    font-size: 1rem !important; /* 16px */
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    margin-bottom: 0.2rem !important;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* SubtÃ­tulo - MUITO REDUZIDO */
.header .header-title p,
.header p,
header .header-title p,
header p {
    font-size: 0.75rem !important; /* 12px */
    font-weight: 400 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Links de navegaÃ§Ã£o - REDUZIDOS */
.header .nav-link,
.header .header-nav a,
.header .nav-links a {
    font-size: 0.8rem !important; /* 12.8px */
    font-weight: 500 !important;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Garantir que links ativos nÃ£o mudem muito */
.header .nav-link.active,
.header .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ===== REDUZIR ESPAÃ‡AMENTOS ===== */

.header .header-brand {
    gap: 0.6rem !important; /* Menos espaÃ§o */
    flex-shrink: 0 !important;
}

.header .header-icon {
    padding: 0.5rem !important;
    width: 36px !important;
    height: 36px !important;
}

.header .header-icon i {
    font-size: 1rem !important; /* 16px */
}

.header .header-nav {
    flex: 1 !important;
    margin: 0 1rem !important; /* Menos margem */
    min-width: 0 !important; /* Permite encolher */
}

.header .nav-links {
    gap: 0.4rem !important; /* Menos espaÃ§o entre links */
    flex-wrap: nowrap !important; /* NÃƒO quebrar linha */
}

/* ===== ÃREA DO USUÃRIO COMPACTA ===== */

.header .header-user {
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
}

.header .user-menu {
    gap: 0.5rem !important;
}

/* Nome do usuÃ¡rio - BRANCO e COMPACTO */
.header .user-name,
.header .header-user .user-name,
header .user-name,
header .header-user .user-name {
    font-size: 0.8rem !important; /* 12.8px */
    font-weight: 600 !important;
    color: white !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 140px !important;
}

/* Email do usuÃ¡rio - BRANCO e COMPACTO */
.header .user-email,
.header .header-user .user-email,
header .user-email,
header .header-user .user-email {
    font-size: 0.68rem !important; /* 10.88px */
    color: rgba(255, 255, 255, 0.85) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 140px !important;
}

/* ===== GARANTIR QUE NÃƒO FIQUE AZUL (SÃ“ GRADIENTE ROXO) ===== */

.header,
header.header {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%) !important;
    /* Gradiente roxo original */
}

/* Remover qualquer fundo azul de elementos internos */
.header *,
header * {
    background-color: transparent !important;
}

/* ExceÃ§Ãµes para elementos que precisam de fundo */
.header .header-icon {
    background: rgba(255, 255, 255, 0.15) !important;
}

.header .nav-link.active,
.header .nav-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ===== NOME NA TABELA (NÃƒO NO HEADER) DEVE SER ESCURO ===== */

.data-table .user-name,
.users-grid .user-name,
.user-card .user-name,
.content-wrapper .user-name,
main .user-name,
body .user-name {
    color: #1f2937 !important;
    font-size: 0.95rem !important;
}

/* MAS NO HEADER DEVE SER BRANCO (sobrescrever) */
body .header .user-name,
body header .user-name,
html body .header .header-user .user-name,
html body header .header-user .user-name {
    color: white !important;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 1200px) {
    .header .header-content {
        max-width: 98% !important;
    }
    
    .header .nav-link {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .header .header-title h1 {
        font-size: 0.9rem !important;
    }
    
    .header .header-title p {
        font-size: 0.68rem !important;
    }

    .header .nav-links {
        gap: 0.3rem !important;
    }

    .header .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.7rem !important;
    }

    .header .user-name {
        font-size: 0.75rem !important;
        max-width: 100px !important;
    }

    .header .user-email {
        font-size: 0.65rem !important;
        max-width: 100px !important;
    }

    .header .header-nav {
        margin: 0 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .header .header-title p {
        display: none !important; /* Esconder subtÃ­tulo */
    }

    .header .header-content {
        padding: 0.5rem !important;
        min-height: 55px !important;
    }
}

/* ===== FORÃ‡AR LAYOUT EM UMA LINHA ===== */

.header .header-content {
    display: flex !important;
    flex-wrap: nowrap !important; /* NUNCA quebrar linha */
    align-items: center !important;
    justify-content: space-between !important;
}

.header .header-brand,
.header .header-nav,
.header .header-user {
    flex-shrink: 1 !important; /* Permitir encolher proporcionalmente */
}

/* ===== FIM DA CORREÃ‡ÃƒO ===== */

/* =====================================================
 * PatrimÃ´nioTech - CSS PAGINAÃ‡ÃƒO COM !IMPORTANT
 * Sobrescreve estilos inline da paginaÃ§Ã£o
 * Cole no FINAL do styles.css
 * ===================================================== */

/* ===== FORÃ‡AR ESTILOS NOS CONTAINERS ===== */

/* Container principal da paginaÃ§Ã£o */
div[style*="margin-top: 20px"][style*="text-align: center"],
div[style*="margin-top: 30px"][style*="text-align: center"] {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-top: 32px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    text-align: center !important;
}

/* Container dos botÃµes de navegaÃ§Ã£o */
div[style*="display: inline-flex"][style*="gap: 5px"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}

/* ===== BOTÃ•ES DE PAGINAÃ‡ÃƒO ===== */

/* Todos os links de paginaÃ§Ã£o */
a[style*="padding: 8px 12px"][style*="border: 1px solid"],
a[href*="page="][style*="padding: 8px"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    background: white !important;
    color: #4b5563 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* Hover nos botÃµes */
a[style*="padding: 8px 12px"][style*="border: 1px solid"]:hover,
a[href*="page="]:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #1f2937 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08) !important;
}

/* PÃ¡gina atual (botÃ£o azul) */
a[style*="background: #007bff"],
a[style*="background: blue"],
a[style*="background: #0d6efd"],
a[style*="color: white"][style*="background:"] {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%) !important;
    border-color: #1E40AF !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3) !important;
    cursor: default !important;
}

a[style*="background: #007bff"]:hover,
a[style*="background: blue"]:hover,
a[style*="color: white"][style*="background:"]:hover {
    transform: none !important;
}

/* ===== INFORMAÃ‡Ã•ES E CONTROLES ===== */

/* Select de registros por pÃ¡gina */
select[name="limit"],
.pagination-select,
select[style*="padding"] {
    padding: 8px 32px 8px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: white !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
}

select[name="limit"]:hover,
.pagination-select:hover {
    border-color: #9ca3af !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.08) !important;
}

select[name="limit"]:focus,
.pagination-select:focus {
    outline: none !important;
    border-color: #1E40AF !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15) !important;
}

/* Container do formulÃ¡rio com select */
form[method="GET"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 16px !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
}

/* Label do select */
label[style*="font"] {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    margin: 0 !important;
}

/* Texto de informaÃ§Ãµes */
div[style*="text-align: center"] > strong,
div[style*="text-align: center"] strong {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

/* ===== MELHORIAS ESPECÃFICAS ===== */

/* Ãcones nos botÃµes */
a[href*="page="] i,
a[style*="padding: 8px"] i {
    font-size: 13px !important;
}

/* Separador entre informaÃ§Ãµes */
div[style*="text-align: center"]:last-child {
    font-size: 14px !important;
    color: #6b7280 !important;
    padding-top: 16px !important;
    border-top: 1px solid #e5e7eb !important;
    margin-top: 16px !important;
}

/* ===== RESPONSIVO ===== */

@media (max-width: 768px) {
    div[style*="text-align: center"] {
        padding: 16px !important;
        margin-top: 24px !important;
    }
    
    div[style*="display: inline-flex"] {
        gap: 6px !important;
        margin-bottom: 16px !important;
    }
    
    a[href*="page="] {
        min-width: 38px !important;
        height: 38px !important;
        padding: 0 12px !important;
        font-size: 13px !important;
    }
    
    form[method="GET"] {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    label[style*="font"] {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    select[name="limit"] {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    div[style*="text-align: center"] {
        padding: 12px !important;
        border-radius: 8px !important;
    }
    
    div[style*="display: inline-flex"] {
        gap: 4px !important;
    }
    
    a[href*="page="] {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
    
    /* Esconder texto dos botÃµes primeira/Ãºltima em mobile */
    a[href*="page=1"] span,
    a[href*="page="][href*="Primeira"] {
        font-size: 0 !important;
    }
    
    a[href*="page=1"] i,
    a[href*="Primeira"] i {
        font-size: 13px !important;
        margin: 0 !important;
    }
}

/* ===== ANIMAÃ‡ÃƒO DE ENTRADA ===== */

div[style*="margin-top: 20px"][style*="text-align: center"],
div[style*="margin-top: 30px"][style*="text-align: center"] {
    animation: fadeInUp 0.3s ease !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ACESSIBILIDADE ===== */

a[href*="page="]:focus-visible {
    outline: 2px solid #1E40AF !important;
    outline-offset: 2px !important;
}

select[name="limit"]:focus-visible {
    outline: 2px solid #1E40AF !important;
    outline-offset: 2px !important;
}

/* ===== PRINT ===== */

@media print {
    div[style*="margin-top: 20px"][style*="text-align: center"],
    div[style*="margin-top: 30px"][style*="text-align: center"] {
        display: none !important;
    }
}

/* =============================================
   FILTROS EM LINHA - VERSÃƒO CORRIGIDA
   ForÃ§a TODOS os filtros na mesma linha
   ============================================= */

/* IMPORTANTE: Remove os mÃºltiplos .filter-row e coloca tudo em flex */

/* FORÃ‡A MÃXIMA - .filter-row vira "contents" para nÃ£o quebrar */
.filter-form > .filter-row,
form.filter-form > .filter-row,
.filter-form .filter-row,
.card .card-content .filter-form .filter-row,
.card-content .filter-form .filter-row,
.card-content form .filter-row,
.card-content .filter-row,
form .filter-row,
div.filter-row,
.filter-row {
    display: contents !important; /* Os filhos aparecem como se nÃ£o tivesse div */
    /* Remover flex e grid para nÃ£o criar agrupamento */
    flex-flow: unset !important;
    flex-wrap: unset !important;
    gap: unset !important;
    margin-bottom: unset !important;
    align-items: unset !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
}

/* Grupos de filtro - tamanho controlado e MENOR */
.card .card-content .filter-form .filter-row .filter-group,
.card-content .filter-form .filter-row .filter-group,
.card-content form .filter-row .filter-group,
.card-content .filter-row .filter-group,
.filter-form .filter-row .filter-group,
form.filter-form .filter-row .filter-group,
form .filter-row .filter-group,
.filter-row .filter-group,
div.filter-group,
.filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    flex: 0 1 auto !important; /* NÃƒO cresce, apenas encolhe */
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    flex-basis: auto !important;
    min-width: 120px !important; /* Reduzido para caber mais */
    max-width: 180px !important; /* Reduzido tambÃ©m */
    width: auto !important;
}

/* Campo de busca um pouco maior, mas nÃ£o muito */
.filter-row .filter-group:has(input[name="busca"]),
.filter-row .filter-group:has(input[placeholder*="CÃ³digo"]),
.filter-row .filter-group:has(input[placeholder*="Nome"]),
.filter-row .filter-group:has(input[placeholder*="nome"]),
.filter-row .filter-group:has(input[placeholder*="email"]) {
    flex: 0 1 auto !important;
    flex-grow: 0 !important;
    min-width: 180px !important; /* Um pouco maior que os outros */
    max-width: 240px !important;
}

/* Labels */
.filter-group label.form-label,
.filter-group .form-label,
.filter-row .filter-group label,
.filter-row label.form-label,
label.form-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
}

/* Inputs e selects */
.filter-group input.form-input,
.filter-group select.form-select,
.filter-group .form-input,
.filter-group .form-select,
.filter-row input.form-input,
.filter-row select.form-select,
input.form-input,
select.form-select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.625rem 0.875rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    background: white !important;
    box-sizing: border-box !important;
}

.filter-group input.form-input:focus,
.filter-group select.form-select:focus,
.filter-group .form-input:focus,
.filter-group .form-select:focus {
    outline: none !important;
    border-color: #1E40AF !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1) !important;
}

/* AÃ§Ãµes - botÃµes embaixo CENTRALIZADOS - ocupa linha inteira */
.card .card-content .filter-form .filter-actions,
.card-content .filter-form .filter-actions,
.card-content form .filter-actions,
.card-content .filter-actions,
.filter-form .filter-actions,
form.filter-form .filter-actions,
form .filter-actions,
div.filter-actions,
.filter-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.75rem !important;
    align-items: center !important;
    width: 100% !important; /* ForÃ§a quebra de linha */
    flex-basis: 100% !important; /* Garante que ocupe linha inteira */
    padding-top: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
    justify-content: flex-start !important; /* CENTRALIZADO */
    margin-top: 0 !important;
    flex-wrap: wrap !important;
    order: 999 !important; /* Garante que fica por Ãºltimo */
}

/* VariaÃ§Ãµes de nomes - FILTER-FORM tambÃ©m vira flex */
.card-content .filter-form,
.filter-form,
form.filter-form,
form.filters-form,
.filters-form {
    display: flex !important;
    flex-flow: row wrap !important;
    flex-wrap: wrap !important;
    gap: 0.625rem !important;
    align-items: flex-end !important;
    justify-content: flex-start !important; /* Filtros Ã  esquerda */
}

/* Esconder inputs hidden para nÃ£o ocupar espaÃ§o */
.filter-form input[type="hidden"],
form input[type="hidden"] {
    display: none !important;
}

.filters-row,
div.filters-row {
    display: flex !important;
    flex-flow: row wrap !important;
    flex-wrap: wrap !important;
    gap: 0.875rem !important;
    align-items: flex-end !important;
    grid-template-columns: none !important;
}

.filters-row .filter-group {
    flex: 1 1 auto !important;
    min-width: 150px !important;
    max-width: 220px !important;
}

/* Para relatÃ³rios que usam filters-grid */
.filters-grid,
div.filters-grid {
    display: flex !important;
    flex-flow: row wrap !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: flex-end !important;
    grid-template-columns: none !important;
}

.filters-grid .form-group,
.filters-grid .filter-group {
    flex: 1 1 auto !important;
    min-width: 150px !important;
    max-width: 220px !important;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */

/* Tablets mÃ©dios */
@media (max-width: 1200px) {
    .filter-group,
    .filters-row .filter-group,
    .filters-grid .filter-group,
    .filters-grid .form-group {
        min-width: 140px !important;
        max-width: 200px !important;
    }
    
    .filter-row .filter-group:has(input[name="busca"]),
    .filter-row .filter-group:has(input[placeholder*="CÃ³digo"]),
    .filter-row .filter-group:has(input[placeholder*="Nome"]) {
        min-width: 180px !important;
        max-width: 280px !important;
    }
}

/* Tablets - 2 por linha */
@media (max-width: 992px) {
    .filter-row,
    .filters-row,
    .filters-grid {
        gap: 0.875rem !important;
    }
    
    .filter-group,
    .filters-row .filter-group,
    .filters-grid .filter-group,
    .filters-grid .form-group {
        flex: 1 1 calc(50% - 0.5rem) !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    
    .filter-row .filter-group:has(input[name="busca"]),
    .filter-row .filter-group:has(input[placeholder*="CÃ³digo"]),
    .filter-row .filter-group:has(input[placeholder*="Nome"]) {
        flex: 1 1 100% !important;
        max-width: none !important;
    }
    
    .filter-actions {
        width: 100% !important;
        justify-content: flex-start !important;
    }
}

/* Mobile - 1 por linha */
@media (max-width: 768px) {
    .filter-row,
    .filters-row,
    .filters-grid {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .filter-group,
    .filters-row .filter-group,
    .filters-grid .filter-group,
    .filters-grid .form-group {
        flex: 1 1 100% !important;
        min-width: 100% !important;
        max-width: none !important;
    }
    
    .filter-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .filter-actions .btn {
        width: 100% !important;
        justify-content: flex-start !important;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .filter-row,
    .filters-row,
    .filters-grid {
        gap: 0.75rem !important;
    }
    
    .filter-group .form-input,
    .filter-group .form-select {
        font-size: 16px !important;
        padding: 0.625rem 0.875rem !important;
    }
    
    .form-label {
        font-size: 0.8125rem !important;
    }
}

/* =============================================
   INSTRUÃ‡Ã•ES CRÃTICAS
   ============================================= 
   
   âš ï¸ TESTE PRIMEIRO:
   1. Cole este CSS no FINAL do styles.css
   2. Salve e atualize a pÃ¡gina
   3. Se ver BORDA VERMELHA nos filtros = CSS estÃ¡ funcionando!
   4. Se NÃƒO ver borda vermelha = problema de cache ou caminho do arquivo
   
   âš ï¸ SE VER A BORDA VERMELHA:
   - Remova a linha "border: 2px solid red !important;"
   - Os filtros devem funcionar
   
   âš ï¸ SE NÃƒO VER A BORDA VERMELHA:
   - Verifique se estÃ¡ editando o arquivo certo (styles.css)
   - Limpe o cache: Ctrl+Shift+Delete
   - Ou teste em aba anÃ´nima: Ctrl+Shift+N
   - Ou force reload: Ctrl+F5
   
   ============================================= */

   /* =====================================================
   ðŸŽ¨ DROPDOWNS PADRONIZADOS - AMBOS BRANCOS
   PatrimÃ´nioTech - Dropdowns Consistentes
   ===================================================== */

/* ===== DROPDOWN DE NAVEGAÃ‡ÃƒO (PatrimÃ´nio, etc) ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white !important; /* BRANCO SÃ“LIDO */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151 !important; /* TEXTO ESCURO */
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: white !important; /* FUNDO BRANCO */
}

.nav-dropdown .dropdown-menu .dropdown-item:hover {
    background: #f3f4f6 !important; /* HOVER CINZA CLARO */
    color: #1E40AF !important; /* TEXTO AZUL NO HOVER */
}

/* Item destacado (QR Code) - mantÃ©m destaque amarelo */
.nav-dropdown .dropdown-menu .dropdown-item.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%) !important;
    color: #d97706 !important;
    font-weight: 600;
    border-left: 4px solid #f59e0b;
}

.nav-dropdown .dropdown-menu .dropdown-item.highlight:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%) !important;
    color: #92400e !important;
}

.nav-dropdown .dropdown-menu .dropdown-item i {
    color: #6b7280; /* ÃCONES CINZA */
    font-size: 0.875rem;
}

.nav-dropdown .dropdown-menu .dropdown-item:hover i {
    color: currentColor; /* ÃCONE HERDA COR DO TEXTO */
}

.nav-dropdown .dropdown-menu .dropdown-item.highlight i {
    color: #f59e0b; /* ÃCONE AMARELO NO HIGHLIGHT */
}

.nav-dropdown .dropdown-menu .dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* ===== DROPDOWN DO USUÃRIO ===== */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white !important; /* BRANCO SÃ“LIDO */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151 !important; /* TEXTO ESCURO */
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    background: white !important; /* FUNDO BRANCO */
}

.user-dropdown .dropdown-item:hover {
    background: #f3f4f6 !important; /* HOVER CINZA CLARO */
    color: #1E40AF !important; /* TEXTO AZUL NO HOVER */
}

.user-dropdown .dropdown-item.logout-item:hover {
    background: #fef2f2 !important; /* HOVER VERMELHO CLARO */
    color: #dc2626 !important; /* TEXTO VERMELHO */
}

.user-dropdown .dropdown-item i {
    color: #6b7280; /* ÃCONES CINZA */
    font-size: 0.875rem;
}

.user-dropdown .dropdown-item:hover i {
    color: currentColor; /* ÃCONE HERDA COR DO TEXTO */
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* ===== MOBILE RESPONSIVO ===== */
@media (max-width: 768px) {
    /* Dropdown de navegaÃ§Ã£o no mobile */
    .nav-dropdown .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: white !important;
        display: none;
        margin-left: 1rem;
        margin-top: 0.5rem;
    }
    
    .nav-dropdown.show .dropdown-menu {
        display: block;
    }
    
    /* Dropdown do usuÃ¡rio centralizado no mobile */
    .user-dropdown {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: 100%;
        margin-top: 0.5rem;
    }
    
    .user-dropdown.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== GARANTIR FUNDO BRANCO SÃ“LIDO ===== */
.nav-dropdown .dropdown-menu,
.user-dropdown,
.nav-dropdown .dropdown-menu .dropdown-item,
.user-dropdown .dropdown-item {
    background-color: white !important;
    backdrop-filter: none !important;
}

/* Apenas o item highlight tem fundo diferente */
.nav-dropdown .dropdown-menu .dropdown-item.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%) !important;
}

/* ===== Z-INDEX HIERARCHY ===== */
.header {
    z-index: 50;
}

.nav-dropdown .dropdown-menu,
.user-dropdown {
    z-index: 1000;
}

/* ===== ANIMAÃ‡Ã•ES ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ACESSIBILIDADE ===== */
.dropdown-item:focus-visible {
    outline: 2px solid #1E40AF;
    outline-offset: -2px;
}

/* ===== SETA DO DROPDOWN (opcional) ===== */
.dropdown-arrow {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== FIM DA CORREÃ‡ÃƒO ===== */

img{
    max-width: 100%;
}

/* =====================================================
   ðŸ“± MELHORIAS MOBILE - PatrimÃ´nioTech
   Adicione este CSS ao FINAL do styles.css
   ===================================================== */

/* ===== VARIÃVEIS MOBILE ===== */
:root {
    --mobile-small: 480px;
    --mobile: 768px;
    --tablet: 992px;
    --touch-target-min: 44px;
    --header-mobile-height: 60px;
    --sidebar-width: 280px;
}

/* =====================================================
   ðŸ“± MENU MOBILE - HAMBURGER MENU
   ===================================================== */

/* BotÃ£o Hamburger */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* AnimaÃ§Ã£o do hamburger para X */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Sidebar Mobile */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding: calc(var(--header-mobile-height) + 20px) 1rem 1rem;
}

.mobile-sidebar.active {
    left: 0;
}

/* Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Links da sidebar mobile */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-link:active {
    transform: scale(0.98);
}

.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

/* Submenu mobile */
.mobile-submenu {
    margin-left: 2rem;
    margin-top: 0.5rem;
    display: none;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu .mobile-nav-link {
    padding: 0.75rem;
    font-size: 0.9rem;
}

/* BotÃ£o de expansÃ£o do submenu */
.mobile-expand-btn {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mobile-expand-btn.active {
    transform: rotate(180deg);
}

/* =====================================================
   ðŸ“Š TABELAS RESPONSIVAS
   ===================================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-scroll-indicator {
    display: none;
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(90deg, transparent, #1E40AF, transparent);
    color: white;
    font-size: 0.75rem;
    animation: pulseIndicator 2s ease-in-out infinite;
}

@keyframes pulseIndicator {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* =====================================================
   ðŸ‘† BOTÃ•ES TOUCH-FRIENDLY
   ===================================================== */

.fab-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
    text-decoration: none;
}

.fab-button:active {
    transform: scale(0.95);
}

.fab-button i {
    font-size: 1.5rem;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    cursor: pointer;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:active {
    transform: scale(0.9);
}

/* =====================================================
   ðŸ“± MEDIA QUERIES - MOBILE
   ===================================================== */

@media (max-width: 768px) {
    /* Menu hamburger visÃ­vel */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* FAB visÃ­vel */
    .fab-button {
        display: flex;
    }
    
    /* Esconder navegaÃ§Ã£o desktop */
    .header-nav {
        display: none;
    }
    
    /* Ajustar header */
    .header-content {
        min-height: var(--header-mobile-height);
        padding: 0.75rem 1rem;
        gap: 1rem;
    }
    
    .header-brand {
        flex: 1;
        min-width: 0;
    }
    
    .header-title h1 {
        font-size: 1rem;
    }
    
    .header-title p {
        display: none;
    }
    
    /* Logo menor */
    .header-icon {
        width: 40px;
        height: 40px;
        padding: 0.5rem;
    }
    
    .header-icon img {
        max-width: 100%;
        height: auto;
    }
    
    /* User menu compacto */
    .user-info {
        flex-direction: row;
    }
    
    .user-details {
        display: none;
    }
    
    .user-email {
        display: none;
    }
    
    /* Body */
    body {
        font-size: 0.9rem;
        padding-bottom: 80px;
    }
    
    /* Container */
    .container,
    .content-wrapper {
        padding: 0.5rem;
    }
    
    /* Tabelas com scroll */
    .table-scroll-indicator {
        display: block;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* Cards */
    .card {
        margin: 0.5rem 0;
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    /* FormulÃ¡rios */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        width: 100% !important;
        flex: none;
        margin-bottom: 1rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important;
        padding: 0.875rem;
        min-height: var(--touch-target-min);
    }
    
    .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        min-height: var(--touch-target-min);
        font-size: 1rem;
        justify-content: center;
    }
    
    /* BotÃµes maiores */
    .btn {
        min-height: var(--touch-target-min);
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* Stats em 2 colunas */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* PaginaÃ§Ã£o */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .pagination-link,
    .pagination-current {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
    }
    
    /* TÃ­tulos */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .page-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Modais em tela cheia */
    .modal-container {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Alertas */
    .alert,
    .message-box {
        margin: 0.5rem;
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        font-size: 0.8rem;
        padding: 1rem;
        text-align: center;
    }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
    /* Stats em coluna Ãºnica */
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* BotÃµes das aÃ§Ãµes em coluna */
    .table-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Card actions em coluna */
    .card-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .card-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   âš¡ SCROLL SUAVE E PERFORMANCE
   ===================================================== */

html {
    scroll-behavior: smooth;
}

.scrollable {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* =====================================================
   FIM DAS MELHORIAS MOBILE
   ===================================================== */

   /* ===== CORREÃ‡ÃƒO BOTÃƒO HAMBURGER ===== */
@media (max-width: 768px) {
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        order: 1;
    }
    
    .header-brand {
        order: 2;
        flex: 1;
    }
    
    .header-user {
        order: 3;
    }
    
    .header-nav {
        display: none !important;
    }
}

/* ===== CORREÃ‡ÃƒO HEADER MOBILE ===== */
@media (max-width: 768px) {
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        padding: 0.75rem 1rem !important;
        flex-wrap: nowrap !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        order: 1 !important;
        flex-shrink: 0 !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        border-radius: 10px !important;
    }
    
    .hamburger-icon {
        width: 24px !important;
        height: 18px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .hamburger-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: white !important;
        border-radius: 2px !important;
    }
    
    .header-brand {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    
    .header-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .header-title h1 {
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    .header-nav {
        display: none !important;
    }
    
    .header-user {
        order: 3 !important;
        flex-shrink: 0 !important;
    }
    
    .user-info,
    .user-dropdown-arrow {
        display: none !important;
    }
}

/* ===== HEADER MOBILE - JUSTIFICADO Ã€ DIREITA ===== */
@media (max-width: 768px) {
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1.5rem !important;
        padding: 0.75rem 1rem !important;
        min-height: 60px !important;
    }
    
    /* BotÃ£o Ã  esquerda */
    .mobile-menu-toggle {
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
    /* Logo/TÃ­tulo puxado para direita */
    .header-brand {
        order: 2 !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.75rem !important;
        margin-left: auto !important;
        margin-right: 1rem !important;
    }
    
    /* TÃ­tulo alinhado Ã  direita */
    .header-title {
        text-align: right !important;
    }
    
    .header-title h1 {
        font-size: 1rem !important;
        margin: 0 !important;
        text-align: right !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    /* User menu Ã  direita */
    .header-user {
        order: 3 !important;
        flex-shrink: 0 !important;
    }
    
    /* Esconder elementos extras */
    .user-info,
    .user-dropdown-arrow {
        display: none !important;
    }
    
    .header-nav {
        display: none !important;
    }
}

/* ===== HEADER MOBILE - BOTÃƒO DENTRO DO HEADER ===== */
@media (max-width: 768px) {
    /* Header com altura correta */
    .header {
        position: relative !important;
        width: 100% !important;
    }
    
    /* Container flex correto */
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        padding: 1rem !important;
        min-height: 64px !important;
        box-sizing: border-box !important;
    }
    
    /* BotÃ£o hamburger - POSITION RELATIVE (nÃ£o flutua) */
    .mobile-menu-toggle {
        display: flex !important;
        position: relative !important; /* â† CHAVE: nÃ£o absolute/fixed */
        order: 1 !important;
        width: 44px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        border-radius: 10px !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }
    
    .hamburger-icon {
        width: 24px !important;
        height: 18px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .hamburger-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: white !important;
        border-radius: 2px !important;
    }
    
    /* Logo/TÃ­tulo centralizados */
    .header-brand {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.75rem !important;
    }
    
    .header-icon {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }
    
    .header-title h1 {
        font-size: 1.1rem !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    /* User menu Ã  direita */
    .header-user {
        order: 3 !important;
        flex-shrink: 0 !important;
    }
    
    .user-avatar {
        width: 44px !important;
        height: 44px !important;
    }
    
    .user-info,
    .user-dropdown-arrow {
        display: none !important;
    }
    
    .header-nav {
        display: none !important;
    }
}

/* ===== HAMBURGER Ã€ DIREITA ===== */
@media (max-width: 768px) {
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
        min-height: 64px !important;
        gap: 1rem !important;
    }
    
    /* Logo Ã  ESQUERDA */
    .header-brand {
        order: 1 !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .header-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    .header-title h1 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    /* User menu no CENTRO */
    .header-user {
        order: 2 !important;
        flex-shrink: 0 !important;
    }
    
    .user-avatar {
        width: 44px !important;
        height: 44px !important;
    }
    
    .user-info,
    .user-dropdown-arrow {
        display: none !important;
    }
    
    /* Hamburger Ã  DIREITA */
    .mobile-menu-toggle {
        order: 3 !important;
        display: flex !important;
        position: relative !important;
        width: 44px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        border-radius: 10px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hamburger-icon {
        width: 24px !important;
        height: 18px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .hamburger-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: white !important;
        border-radius: 2px !important;
    }
    
    .header-nav {
        display: none !important;
    }
}

/* =====================================================
   ðŸ“± PATRIMÃ”NIOTECH - ESTILOS MOBILE
   Adicione este conteÃºdo ao final do seu styles.css
   ===================================================== */

/* ===== VARIÃVEIS MOBILE ===== */
:root {
    /* Breakpoints */
    --mobile-small: 480px;
    --mobile: 768px;
    --tablet: 992px;
    --desktop: 1200px;
    
    /* EspaÃ§amentos Mobile */
    --mobile-padding: 1rem;
    --mobile-margin: 0.75rem;
    
    /* Touch Targets */
    --touch-target-min: 44px;
    
    /* Menu Mobile */
    --header-mobile-height: 60px;
    --sidebar-width: 280px;
}

/* =====================================================
   ðŸ“Š TABELAS RESPONSIVAS
   ===================================================== */

/* Container com scroll horizontal */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Indicador de scroll */
.table-scroll-indicator {
    display: none;
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(90deg, transparent, #1E40AF, transparent);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--rounded-lg);
    margin-bottom: 1rem;
    animation: pulseIndicator 2s ease-in-out infinite;
}

@keyframes pulseIndicator {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@media (max-width: 768px) {
    /* Mostrar indicador de scroll */
    .table-scroll-indicator {
        display: block;
    }
    
    /* Tabelas mantÃªm largura mÃ­nima para scroll horizontal */
    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* ===== TRANSFORMAR EM CARDS ===== */
    .data-table.mobile-cards {
        display: block;
        min-width: auto;
    }
    
    .data-table.mobile-cards thead {
        display: none;
    }
    
    .data-table.mobile-cards tbody {
        display: block;
    }
    
    .data-table.mobile-cards tr {
        display: block;
        background: white;
        border-radius: var(--rounded-lg);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid var(--gray-200);
    }
    
    .data-table.mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border: none;
        border-bottom: 1px solid var(--gray-200);
        white-space: normal;
    }
    
    .data-table.mobile-cards td:last-child {
        border-bottom: none;
    }
    
    /* Data labels (tÃ­tulos das colunas em mobile) */
    .data-table.mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-700);
        margin-right: 1rem;
        flex-shrink: 0;
    }
    
    /* AÃ§Ãµes em coluna no mobile */
    .data-table.mobile-cards .table-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .data-table.mobile-cards .table-actions::before {
        display: none;
    }
    
    .data-table.mobile-cards .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* BotÃµes de aÃ§Ã£o menores no mobile pequeno */
@media (max-width: 480px) {
    .table-actions .btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .table-actions .btn i {
        margin-right: 0.25rem;
    }
}

/* =====================================================
   ðŸ“ FORMULÃRIOS MOBILE
   ===================================================== */

@media (max-width: 768px) {
    /* FormulÃ¡rios ocupam largura total */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group {
        width: 100% !important;
        flex: none;
        margin-bottom: 1rem;
    }
    
    /* Inputs maiores para touch */
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important; /* Previne zoom no iOS */
        padding: 0.875rem;
        min-height: var(--touch-target-min);
    }
    
    /* Labels mais visÃ­veis */
    .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    /* BotÃµes de formulÃ¡rio */
    .form-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        margin: 0 -1rem -1rem;
    }
    
    .form-actions .btn {
        flex: 1;
        min-height: 50px;
        font-size: 1rem;
        justify-content: center;
    }
    
    /* Upload de arquivo */
    .file-upload {
        padding: 1.5rem;
        text-align: center;
    }
    
    .file-upload-input {
        min-height: var(--touch-target-min);
    }
    
    /* Preview de imagem */
    .image-preview {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .image-preview img {
        max-width: 100%;
        height: auto;
        border-radius: var(--rounded-lg);
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .form-card {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .card-content {
        padding: 1rem;
    }
}

/* ===== UPLOAD DE ARQUIVO OTIMIZADO ===== */
.file-upload-container {
    position: relative;
    margin-bottom: 1rem;
}

.form-input-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 2rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--rounded-lg);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload-label:active {
    transform: scale(0.98);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.file-upload-text {
    text-align: center;
}

.file-upload-text strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.file-upload-text span {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Preview */
.image-preview-container {
    margin-top: 1rem;
}

.image-preview-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.image-preview-img {
    width: 100%;
    height: auto;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
}

.image-preview-actions {
    margin-top: 1rem;
    text-align: center;
}

.current-image-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--rounded-lg);
}

/* Mobile */
@media (max-width: 768px) {
    .file-upload-label {
        min-height: 100px;
        padding: 1.5rem 1rem;
    }
    
    .file-upload-icon {
        font-size: 2rem;
    }
    
    .file-upload-text strong {
        font-size: 0.9rem;
    }
    
    .file-upload-text span {
        font-size: 0.8rem;
    }
}

/* =====================================================
   ðŸ‘† BOTÃ•ES TOUCH-FRIENDLY
   ===================================================== */

@media (max-width: 768px) {
    /* BotÃµes maiores para touch */
    .btn,
    button,
    a.btn {
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Ãcones maiores */
    .btn i {
        font-size: 1.1rem;
    }
    
    /* BotÃµes pequenos tambÃ©m respeitam mÃ­nimo */
    .btn-sm {
        min-height: 40px;
        min-width: 40px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* BotÃµes grandes */
    .btn-lg {
        min-height: 50px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Feedback tÃ¡til */
    .btn:active,
    button:active,
    a.btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
    
    /* Grupos de botÃµes */
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* ExceÃ§Ã£o: table-actions mantÃ©m linha */
    .table-actions.btn-group {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ===== FAB - FLOATING ACTION BUTTON ===== */
.fab-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #1E3A8A 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
    display: none; /* Oculto por padrÃ£o */
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.5);
}

.fab-button:active {
    transform: scale(0.95);
}

.fab-button i {
    font-size: 1.5rem;
}

/* Mostrar FAB apenas no mobile */
@media (max-width: 768px) {
    .fab-button {
        display: flex;
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 998;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.scroll-to-top:active {
    transform: scale(0.95);
}

/* =====================================================
   ðŸ“Š CARDS E ESTATÃSTICAS MOBILE
   ===================================================== */

@media (max-width: 768px) {
    /* Stats em 2 colunas no tablet */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Stats em coluna Ãºnica no mobile */
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Cards menores */
    .card {
        margin: 0.5rem 0;
        border-radius: var(--rounded-lg);
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .card-actions .btn {
        flex: 1;
    }
    
    .card-content {
        padding: 1rem;
    }
}

/* =====================================================
   ðŸ–¼ï¸ IMAGENS RESPONSIVAS
   ===================================================== */

/* Base */
img {
    max-width: 100%;
    height: auto;
}

/* Galeria de imagens */
.image-gallery {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1200px) {
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* ===== LIGHTBOX MOBILE ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

/* QR Codes responsivos */
.qr-code-container {
    text-align: center;
    padding: 1rem;
}

@media (max-width: 768px) {
    .qr-code-container img {
        max-width: 250px;
    }
}

/* =====================================================
   ðŸ“„ PAGINAÃ‡ÃƒO MOBILE
   ===================================================== */

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .pagination-link {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
    }
    
    /* Esconder nÃºmeros extras no mobile */
    .pagination-link:not(.pagination-current):not(.pagination-first):not(.pagination-last):not(.pagination-prev):not(.pagination-next):not(:nth-child(-n+3)):not(:nth-last-child(-n+3)) {
        display: none;
    }
    
    /* InformaÃ§Ãµes de paginaÃ§Ã£o em baixo */
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        font-size: 0.85rem;
    }
}

/* =====================================================
   ðŸªŸ MODAIS MOBILE
   ===================================================== */

@media (max-width: 768px) {
    .modal-container {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        max-width: none;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* =====================================================
   ðŸ”” ALERTAS MOBILE
   ===================================================== */

@media (max-width: 768px) {
    .alert,
    .message-box {
        margin: 0.5rem;
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Alertas flutuantes (toast) */
    .toast-notification {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        max-width: 400px;
        z-index: 10000;
    }
}

/* =====================================================
   âš¡ PERFORMANCE MOBILE
   ===================================================== */

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Scroll com momentum no iOS */
.scrollable {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* =====================================================
   ðŸŽ¨ AJUSTES GERAIS MOBILE
   ===================================================== */

@media (max-width: 768px) {
    /* Body */
    body {
        font-size: 0.9rem;
        padding-bottom: 60px; /* EspaÃ§o para navegaÃ§Ã£o fixa */
    }
    
    /* Container */
    .container,
    .content-wrapper {
        padding: 0.5rem;
    }
    
    /* TÃ­tulos */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.95rem; }
    h6 { font-size: 0.9rem; }
    
    .page-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    /* Breadcrumbs */
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    /* Filtros */
    .filter-section {
        padding: 1rem 0.5rem;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    /* Footer */
    .footer {
        font-size: 0.8rem;
        padding: 1rem;
        text-align: center;
    }
}

/* Mobile muito pequeno */
@media (max-width: 380px) {
    body {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* =====================================================
   ðŸŽ¯ UTILIDADES MOBILE
   ===================================================== */

/* Mostrar/esconder baseado em tamanho de tela */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}

/* =====================================================
   ðŸ”§ FIX PARA PROBLEMAS COMUNS
   ===================================================== */

/* Prevenir zoom no iOS */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Prevenir overflow horizontal */
body {
    overflow-x: hidden;
}

/* Touch callout no iOS */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Links e botÃµes */
a, button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* ===== FIM DOS ESTILOS MOBILE ===== */

/* =====================================================
   ðŸ“¸ CSS CORRIGIDO - FOTOS NO MOBILE
   Copie este CSS e substitua na linha 616 do patrimonio_list.php
   ===================================================== */

/* ===== RESPONSIVO MOBILE ===== */
@media (max-width: 768px) {
    .table-scroll-indicator {
        display: block !important;
    }
    
    /* ðŸ“± MODO CARD MOBILE */
    .data-table.mobile-cards {
        display: block;
        min-width: auto;
    }
    
    .data-table.mobile-cards thead {
        display: none;
    }
    
    .data-table.mobile-cards tbody {
        display: block;
    }
    
    .data-table.mobile-cards tr {
        display: block;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 1rem;
        padding: 1rem;
        position: relative;
    }
    
    .data-table.mobile-cards td {
        display: flex;
        padding: 0.75rem 0;
        border: none;
        border-bottom: 1px solid #f3f4f6;
        align-items: center;
    }
    
    .data-table.mobile-cards td:last-child {
        border-bottom: none;
    }
    
    /* ========================================
       ðŸ“¸ FOTO NO MOBILE - CORREÃ‡ÃƒO PRINCIPAL
       ======================================== */
    
    /* Fazer a cÃ©lula de foto aparecer como bloco centralizado */
    .data-table.mobile-cards .foto-cell {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 1.5rem 0 !important;
        border-bottom: 2px solid #e5e7eb !important;
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
        border-radius: 12px;
    }
    
    /* Remover o data-label da foto */
    .data-table.mobile-cards .foto-cell::before {
        content: '' !important;
        display: none !important;
    }
    
    /* Aumentar tamanho das fotos no mobile */
    .data-table.mobile-cards .foto-miniatura,
    .data-table.mobile-cards .foto-placeholder,
    .data-table.mobile-cards .foto-erro {
        width: 140px !important;
        height: 140px !important;
        border-radius: 16px;
        margin: 0 auto;
    }
    
    .data-table.mobile-cards .foto-miniatura {
        border-width: 3px;
        box-shadow: 0 4px 16px rgba(184, 134, 11, 0.2);
    }
    
    .data-table.mobile-cards .foto-miniatura:active {
        transform: scale(0.95);
    }
    
    .data-table.mobile-cards .foto-placeholder {
        font-size: 3.5rem;
        background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    }
    
    .data-table.mobile-cards .foto-erro {
        font-size: 2.5rem;
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    }
    
    /* ========================================
       ðŸ“ DATA-LABELS PARA OUTRAS CÃ‰LULAS
       ======================================== */
    
    .data-table.mobile-cards td:not(.foto-cell)::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        margin-right: 1rem;
        min-width: 100px;
        flex-shrink: 0;
        font-size: 0.9rem;
    }
    
    /* Ajustar alinhamento do conteÃºdo */
    .data-table.mobile-cards td:not(.foto-cell) {
        justify-content: space-between;
    }
    
    /* ========================================
       ðŸ”˜ AÃ‡Ã•ES EM COLUNA NO MOBILE
       ======================================== */
    
    .data-table.mobile-cards .table-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .data-table.mobile-cards .table-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 0.95rem;
    }
    
    /* ========================================
       ðŸ” MODAL DE FOTO NO MOBILE
       ======================================== */
    
    .modal-foto-lista {
        padding: 0.5rem;
    }
    
    .modal-foto-content {
        width: 100%;
    }
    
    .modal-foto-content img {
        max-width: 95vw;
        max-height: 70vh;
        border-radius: 8px;
    }
    
    .modal-foto-close-btn {
        top: 10px !important;
        right: 10px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 1.8rem;
        z-index: 10001;
    }
    
    .modal-foto-info {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        max-width: 95vw;
        word-wrap: break-word;
    }
}

/* ========================================
   ðŸ“± MOBILE MUITO PEQUENO (< 480px)
   ======================================== */

@media (max-width: 480px) {
    .data-table.mobile-cards tr {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .data-table.mobile-cards .foto-cell {
        padding: 1rem 0 !important;
    }
    
    /* Fotos um pouco menores em telas muito pequenas */
    .data-table.mobile-cards .foto-miniatura,
    .data-table.mobile-cards .foto-placeholder,
    .data-table.mobile-cards .foto-erro {
        width: 110px !important;
        height: 110px !important;
    }
    
    .data-table.mobile-cards .foto-placeholder {
        font-size: 3rem;
    }
    
    .data-table.mobile-cards .foto-erro {
        font-size: 2rem;
    }
    
    /* Labels menores */
    .data-table.mobile-cards td:not(.foto-cell)::before {
        min-width: 80px;
        font-size: 0.85rem;
    }
    
    /* Modal ajustado */
    .modal-foto-content img {
        max-height: 60vh;
    }
    
    .modal-foto-close-btn {
        width: 44px !important;
        height: 44px !important;
    }
}

/* ========================================
   ðŸŽ¨ ANIMAÃ‡Ã•ES E TRANSIÃ‡Ã•ES
   ======================================== */

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.modal-foto-lista.active {
    animation: fadeIn 0.2s ease;
}

.data-table.mobile-cards .foto-miniatura img {
    transition: transform 0.3s ease;
}

.data-table.mobile-cards .foto-miniatura:active img {
    transform: scale(0.95);
}

/* =====================================================
   ðŸŽ¯ PATCH GRID - SOLUÃ‡ÃƒO DEFINITIVA
   ===================================================== 
   
   Usando CSS GRID ao invÃ©s de FLEX
   Garante que tudo fique lado a lado
   
   INSTRUÃ‡Ã•ES:
   1. APAGUE todos os patches anteriores
   2. Copie TODO este cÃ³digo
   3. Cole no FINAL do styles.css
   4. Salve e recarregue
   
   ===================================================== */

/* =====================================================
   ðŸ“± MOBILE - LAYOUT COM GRID
   ===================================================== */

@media (max-width: 768px) {
    
    /* ===== HEADER CONTENT - GRID LAYOUT ===== */
    .header-content {
        display: grid !important;
        grid-template-columns: 44px auto 44px !important;
        grid-template-areas: "hamburger brand user" !important;
        align-items: center !important;
        gap: 0.75rem !important;
        min-height: 60px !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* ===== HAMBURGER - Coluna 1 ===== */
    .mobile-menu-toggle {
        display: flex !important;
        grid-area: hamburger !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: none !important;
        border-radius: 8px !important;
        color: white !important;
        cursor: pointer !important;
    }
    
    /* ===== BRAND - Coluna 2 (Logo + Texto) ===== */
    .header-brand {
        display: grid !important;
        grid-area: brand !important;
        grid-template-columns: 40px 1fr !important;
        grid-template-areas: "logo text" !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    /* ===== LOGO - Dentro do Brand ===== */
    .header-icon {
        display: flex !important;
        grid-area: logo !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .header-icon img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    /* ===== TEXTO - Dentro do Brand ===== */
    .header-title {
        display: flex !important;
        grid-area: text !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 0.125rem !important;
    }
    
    .header-title h1 {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        color: white !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .header-title p {
        font-size: 0.65rem !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        color: white !important;
        opacity: 0.9 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* ===== USER - Coluna 3 ===== */
    .header-user {
        display: flex !important;
        grid-area: user !important;
        justify-content: flex-end !important;
    }
    
    .user-menu {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        cursor: pointer !important;
    }
    
    .user-avatar {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        color: white !important;
        font-size: 1.5rem !important;
    }
    
    .user-avatar img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    
    /* Esconder elementos desnecessÃ¡rios */
    .user-info,
    .user-dropdown-arrow {
        display: none !important;
    }
    
    .header-nav {
        display: none !important;
    }
}

/* =====================================================
   ðŸ“± MOBILE PEQUENO (< 400px)
   ===================================================== */

@media (max-width: 400px) {
    
    .header-content {
        grid-template-columns: 40px auto 40px !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
    }
    
    .header-brand {
        grid-template-columns: 32px 1fr !important;
        gap: 0.5rem !important;
    }
    
    .header-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .header-title h1 {
        font-size: 0.85rem !important;
    }
    
    .header-title p {
        display: none !important;
    }
    
    .user-menu {
        width: 40px !important;
        height: 40px !important;
    }
    
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 1.25rem !important;
    }
    
    .user-avatar img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* =====================================================
   ðŸ“± LANDSCAPE
   ===================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    
    .header-content {
        min-height: 50px !important;
        padding: 0.375rem 1rem !important;
    }
    
    .header-title p {
        display: none !important;
    }
}

/* Arrumar overflow da tabela */

td div{
    width: fit-content !important;
}

/* ============================================
   ESTILOS PARA LISTAGEM DE ROLES
   ============================================ */

/* Ícone do role na listagem */
.role-icon-display {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 10px;
    box-sizing: border-box;
}

/* Nome do role */
.role-name-display strong {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
}

/* Descrição do role */
.role-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Badge de nível */
.badge-nivel {
    font-weight: 700;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
    display: inline-block;
    min-width: 45px;
    text-align: center;
}

/* Grid de permissões */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Módulo de permissão */
.permission-module {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.permission-module h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Item de permissão */
.permission-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.permission-item:last-child {
    border-bottom: none;
}

.permission-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #4b5563;
    transition: color 0.2s;
}

.permission-item label:hover {
    color: #1f2937;
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* Badge inativo */
.badge-inactive {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   ESTILOS PARA LISTAGEM DE USUÁRIOS
   ============================================ */

/* Detalhes do usuário */
.user-details {
    min-width: 0;
}

.user-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
    color: #1f2937;
}

.user-username {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Link de email */
.email-link {
    color: #3b82f6;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

/* Informações de data/hora */
.datetime-info .date {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.datetime-info .time {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Ícone mini do role (na lista de usuários) */
.role-icon-mini {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    padding: 4px;
    box-sizing: border-box;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #15803d;
}

.status-inactive {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   RESPONSIVIDADE MOBILE
   ============================================ */

@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .permission-module {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .role-icon-display {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
        padding: 8px;
    }
}

/* ============================================
   AVATAR FIX - COM !IMPORTANT (FORÇA BRUTAL)
   Adicione no FINAL do styles.css
   ============================================ */

.user-avatar-img {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 2px solid #e5e7eb !important;
    display: block !important;
    transition: transform 0.2s !important;
    flex-shrink: 0 !important;
}

.user-avatar-placeholder {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    transition: transform 0.2s !important;
    flex-shrink: 0 !important;
}

.data-table td[data-label="#"] {
    min-width: 75px !important;
    padding: 0.875rem !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Se AINDA não funcionar, adicione isto também: */
table.data-table tbody tr td:first-child img,
table.data-table tbody tr td:first-child div {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
}