:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    animation: slideUp 0.5s ease;
}

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

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    opacity: 0.9;
    font-size: 14px;
}

.auth-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* ============================================
   VALIDAÇÃO DE ERROS - ADICIONADO
   ============================================ */

.form-control.is-invalid {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.form-control.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--danger);
    font-weight: 500;
}

.invalid-feedback strong {
    font-weight: 600;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ============================================
   ALERTAS - MELHORADO
   ============================================ */

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: block;
    animation: fadeInAlert 0.3s ease;
}

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

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ============================================
   SELEÇÃO DE EMPRESA
   ============================================ */

.empresa-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.empresa-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.empresa-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.empresa-info p {
    font-size: 13px;
    color: var(--secondary);
}

.empresa-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

/* ============================================
   CHECKBOX
   ============================================ */

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary);
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

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

.mt-3 {
    margin-top: 16px;
}

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.link-primary:hover {
    text-decoration: underline;
}

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

@media (max-width: 480px) {
    .auth-header {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-body {
        padding: 30px 20px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 12px 20px;
    }

    .empresa-card {
        padding: 16px;
    }

    .empresa-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
