/* === CSS para login.php === */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    animation: slideIn 0.4s ease;
}

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

.login-header {
    padding: 40px 30px 30px 30px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.logo-sivia {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-operador {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.powered-by {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.login-header h1 {
    font-size: 24px;
    color: #111827;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    font-size: 14px;
    color: #6b7280;
}

.ref-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ref-info {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.login-body {
    padding: 30px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    font-size: 13px;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* === Estilos de Registro === */
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.required { color: #ef4444; }
.optional { color: #9ca3af; font-weight: normal; font-size: 12px; }

.form-group input::placeholder { color: #9ca3af; }
.form-group small { color: #6b7280; font-size: 12px; display: block; margin-top: 6px; }

.operador-badge {
    background: #f0fdf4;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.operador-badge strong, .operador-badge span { color: #166534; font-weight: 600; }

.info-box {
    background: #eff6ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
    line-height: 1.6;
}

.info-box h3 { font-size: 16px; margin-bottom: 12px; font-weight: 600; color: #1e40af; }
.info-box ul { margin-left: 20px; color: #1e40af; }
.info-box li { margin-bottom: 6px; }

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #92400e;
}

.file-input-wrapper { position: relative; margin-top: 8px; }
.file-input-wrapper input[type="file"] {
    position: absolute; opacity: 0; width: 100%; height: 100%;
    top: 0; left: 0; cursor: pointer; z-index: 10;
}

.file-input-label {
    display: block; padding: 12px; border: 2px dashed #d1d5db;
    border-radius: 8px; text-align: center; color: #6b7280;
    cursor: pointer; transition: all 0.2s; position: relative; z-index: 1;
}

.file-input-label:hover {
    border-color: #3b82f6; color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.logo-img { max-height: 60px; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        border-radius: 0;
    }
    
    .logo-sivia {
        font-size: 42px;
    }
    
    .logo-operador {
        font-size: 28px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-body {
        padding: 24px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
