/* 
 * Estilos customizados - Cadastro de Corretores
 * Infinite Seguradora S.A.
 * Cores: Dourado #C9A962 | Azul Escuro #1A2B4A
 */

:root {
    --color-gold: #C9A962;
    --color-gold-dark: #b8994f;
    --color-navy: #1A2B4A;
    --color-navy-light: #2a3b5a;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: var(--color-navy);
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.header img {
    max-height: 60px;
    margin-bottom: 15px;
}

.header h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Card do formulário */
.form-card {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Seções do formulário */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h2 {
    color: var(--color-navy);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--color-gold);
    border-radius: 2px;
}

/* Grid de campos */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Grupos de campo */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    background: white;
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Upload de arquivos */
.upload-section {
    background: #f9fafb;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.upload-item {
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.upload-item:hover {
    border-color: var(--color-gold);
    background: #fffbf0;
}

.upload-item.has-file {
    border-color: #10b981;
    border-style: solid;
    background: #f0fdf4;
}

.upload-item .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-item .icon-pending {
    color: #9ca3af;
}

.upload-item .icon-success {
    color: #10b981;
}

.upload-item .title {
    font-weight: 600;
    color: var(--color-navy);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.upload-item .subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.upload-item .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-required {
    background: #fef2f2;
    color: #ef4444;
}

.badge-optional {
    background: #f3f4f6;
    color: #6b7280;
}

.upload-item input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-item .filename {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 500;
    word-break: break-all;
}

/* Botão de submit */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: var(--color-gold);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.btn-submit:hover {
    background: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.4);
}

.btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

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

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
    font-size: 0.85rem;
}

/* Checkbox customizado */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-gold);
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 640px) {
    .container {
        padding: 10px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
}

/* ======= ADMIN STYLES ======= */
.admin-header {
    background: var(--color-navy);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header img {
    height: 40px;
}

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

.admin-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.admin-nav a:hover {
    color: white;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-navy);
}

.stat-card .label {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 5px;
}

.stat-card.pendente { border-left: 4px solid #f59e0b; }
.stat-card.aprovado { border-left: 4px solid #10b981; }
.stat-card.rejeitado { border-left: 4px solid #ef4444; }
.stat-card.total { border-left: 4px solid var(--color-gold); }

/* Tabela */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h2 {
    font-size: 1.2rem;
    color: var(--color-navy);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    min-width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-gold);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f9fafb;
    padding: 15px 20px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: #fafafa;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-aprovado {
    background: #d1fae5;
    color: #065f46;
}

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

.btn-action {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

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

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

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

/* Login form */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-card img {
    display: block;
    margin: 0 auto 30px;
    max-height: 60px;
}

.login-card h1 {
    text-align: center;
    color: var(--color-navy);
    font-size: 1.3rem;
    margin-bottom: 30px;
}
