/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main";
    grid-template-columns: 250px 1fr;
    grid-template-rows: 70px 1fr;
    height: 100vh;
}

/* Cabeçalho */
.header {
    grid-area: header;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
    color: #ecf0f1;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* Menu Lateral */
.sidebar {
    grid-area: sidebar;
    background: #34495e;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #2c3e50;
    color: #ecf0f1;
    border-left-color: #3498db;
}

.nav-link.active {
    background: #2c3e50;
    color: #3498db;
    border-left-color: #3498db;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
}

/* Conteúdo Principal */
.main-content {
    grid-area: main;
    padding: 30px;
    overflow-y: auto;
    background: #f8f9fa;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Estilos específicos para botões nas tabelas */
table .btn-success,
table .btn-warning,
table .btn-danger,
table .btn-primary {
    width: 32px;
    height: 28px;
    padding: 6px;
    margin: 1px;
    font-size: 11px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

table .btn-primary {
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

table .btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Garantir que a coluna de ações tenha largura adequada */
table th:last-child,
table td:last-child {
    width: 140px;
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

/* Cards do Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card:nth-child(1) .card-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.card:nth-child(2) .card-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.card:nth-child(3) .card-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card:nth-child(4) .card-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.card-content h3 {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.card-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

/* Gráficos do Dashboard */
.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
    flex-shrink: 0;
}

.chart-container canvas {
    flex: 1;
    max-height: 280px !important;
    height: 280px !important;
}

#workOrdersChart {
    max-height: 280px !important;
    height: 280px !important;
}

.recent-activities {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recent-activities h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.recent-activities ul {
    list-style: none;
}

.recent-activities li {
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.recent-activities li:last-child {
    border-bottom: none;
}

.recent-activities li i {
    color: #3498db;
    width: 16px;
}

/* Filtros */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 200px;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
}

td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
    color: #7f8c8d;
}

/* Coluna de ações nas tabelas */
td:last-child {
    white-space: nowrap;
}

td:last-child button {
    display: inline-flex !important;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Estados e Prioridades */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-ativo {
    background: #d5f4e6;
    color: #27ae60;
}

.status-manutencao {
    background: #fef9e7;
    color: #f39c12;
}

.status-inativo {
    background: #fadbd8;
    color: #e74c3c;
}

.priority-baixa {
    background: #d5f4e6;
    color: #27ae60;
}

.priority-media {
    background: #fef9e7;
    color: #f39c12;
}

.priority-alta {
    background: #fdeaa7;
    color: #e67e22;
}

.priority-urgente {
    background: #fadbd8;
    color: #e74c3c;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

/* Formulários */
form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* Padronização dos botões nos modais */
.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions .btn-success,
.form-actions .btn-warning,
.form-actions .btn-danger {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    text-decoration: none;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.form-actions .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.form-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
}

.form-actions .btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.form-actions .btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.form-actions .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.form-actions .btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.form-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.form-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Botões específicos para modais de visualização */
.modal-view-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    flex-wrap: wrap;
}

.modal-view-actions .btn-primary,
.modal-view-actions .btn-secondary,
.modal-view-actions .btn-success,
.modal-view-actions .btn-warning,
.modal-view-actions .btn-danger {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
    text-decoration: none;
}

.modal-view-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.modal-view-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.modal-view-actions .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.modal-view-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
}

.modal-view-actions .btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.modal-view-actions .btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.modal-view-actions .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.modal-view-actions .btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.modal-view-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.modal-view-actions .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Menu hambúrguer para mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        grid-template-areas: 
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 70px;
        left: -250px;
        width: 250px;
        height: calc(100vh - 70px);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters input,
    .filters select {
        min-width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-number {
        font-size: 28px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-success,
    .form-actions .btn-warning,
    .form-actions .btn-danger {
        width: 100%;
        min-width: auto;
    }
    
    .modal-view-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-view-actions .btn-primary,
    .modal-view-actions .btn-secondary,
    .modal-view-actions .btn-success,
    .modal-view-actions .btn-warning,
    .modal-view-actions .btn-danger {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 10px;
    }
    
    .card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .card-number {
        font-size: 24px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    form {
        padding: 20px;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Melhorias para a seção de configurações */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.config-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.config-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-card h3 i {
    color: #3498db;
    font-size: 20px;
}

.data-management-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-management-buttons .btn-primary,
.data-management-buttons .btn-warning,
.data-management-buttons .btn-secondary,
.data-management-buttons .btn-danger {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-management-buttons .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.data-management-buttons .btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
}

.data-management-buttons .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.data-management-buttons .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
}

.data-management-buttons .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.data-management-buttons .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
}

/* Melhorias nos formulários */
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 0;
}

.form-group label:has(input[type="checkbox"]):hover {
    color: #3498db;
}

/* Melhorias nos status badges */
.status-agendada {
    background: #e8f5e8;
    color: #27ae60;
}

.status-vencida {
    background: #fdeaa7;
    color: #e67e22;
}

.status-concluida {
    background: #d5f4e6;
    color: #27ae60;
}

.status-ferias {
    background: #fef9e7;
    color: #f39c12;
}

/* Estilos para fotos de equipamentos */
.equipment-photo-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.equipment-photo-thumbnail:hover {
    border-color: #3498db;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.equipment-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 20px;
}

/* Melhorias no preview de foto no modal */
#photo-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
}

#preview-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    display: block;
    margin: 0 auto 15px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Melhorias no campo de upload de foto */
.form-group input[type="file"] {
    padding: 8px 12px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.form-group input[type="file"]:focus {
    border-color: #3498db;
    background: #e3f2fd;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Melhorias no modal para melhor scroll */
.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

form {
    padding: 25px;
}

/* Estilos para galeria de fotos */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.photo-gallery-item:hover {
    transform: scale(1.05);
}

.photo-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.photo-gallery-item .photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-gallery-item:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay button {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-overlay button:hover {
    background: white;
    transform: scale(1.1);
}

/* Melhorias na tabela para incluir coluna de foto */
.equipment-table-photo {
    width: 70px;
    text-align: center;
    padding: 10px;
}

/* Melhorias na responsividade */
@media (max-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .config-card {
        padding: 20px;
    }
    
    .data-management-buttons .btn-primary,
    .data-management-buttons .btn-warning,
    .data-management-buttons .btn-secondary,
    .data-management-buttons .btn-danger {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .equipment-photo-thumbnail,
    .equipment-photo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
}

/* Estilos para zoom de foto */
.photo-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.photo-zoom-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.photo-zoom-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.photo-zoom-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

.photo-zoom-close:hover {
    background: white;
}
