/* Estilos globais - Portal MR Consultoria */

:root {
    --primary-color: #2f84a8;
    --secondary-color: #e0e0e0;
    --background-color: white;
    --text-color: #333;
    --error-color: #f44336;
    --success-color: #4caf50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: var(--text-color);
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--background-color);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-logo {
    max-height: 50px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-nav a, .header-nav button {
    color: var(--primary-color);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.2s;
}

.header-nav a:hover, .header-nav button:hover {
    background: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #256a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-color);
}

thead {
    background-color: #808080;
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--secondary-color);
}

tbody tr:hover {
    background-color: #f5f5f5;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--background-color);
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: var(--primary-color);
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.close:hover {
    color: var(--text-color);
}

/* Grid de clientes */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.client-card {
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-color);
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.client-card img {
    max-height: 80px;
    width: auto;
    margin-bottom: 15px;
}

.client-card h3 {
    color: var(--primary-color);
    margin-top: 15px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
}

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

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

/* Responsivo */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
}
