/* CobraDiario - Login personalizado */
* { box-sizing: border-box; }
body.cd-login-page,
.cd-login-embed.cd-login-page {
    margin: 0; padding: 0; min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #1e3a5f 50%, #0f172a 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.cd-login-embed.cd-login-page {
    min-height: 80vh; padding: 40px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 25%, #1e3a5f 50%, #0f172a 100%);
    border-radius: 12px; margin: 20px 0;
}

.cd-login-wrap {
    display: flex; width: 100%; max-width: 1100px; min-height: 100vh;
    background: transparent;
}

.cd-login-left {
    flex: 1; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center;
}

.cd-login-brand {
    display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
}

.cd-login-logo {
    width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
    background: rgba(14, 165, 233, 0.3); padding: 8px;
}

.cd-login-empresa { font-size: 1.75rem; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.02em; }
.cd-login-tagline { font-size: 0.95rem; color: rgba(255,255,255,0.8); margin: 0; }

.cd-login-desc {
    font-size: 1.1rem; line-height: 1.6; color: rgba(255,255,255,0.95);
    margin: 0 0 40px 0; max-width: 420px;
}

.cd-login-features {
    display: flex; flex-direction: column; gap: 24px; margin-bottom: 48px;
}

.cd-login-feature {
    display: flex; align-items: flex-start; gap: 16px;
}

.cd-feature-icon {
    flex-shrink: 0; width: 24px; height: 24px; color: #38bdf8;
}

.cd-login-feature strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.cd-login-feature p { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.85); line-height: 1.5; }

.cd-login-garantias {
    display: flex; gap: 48px;
}

.cd-garantia { display: flex; flex-direction: column; }
.cd-garantia-valor { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.cd-garantia-label { font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* Panel derecho - formulario */
.cd-login-right {
    flex: 0 0 420px; padding: 48px; display: flex; align-items: center; justify-content: center;
}

.cd-login-card {
    width: 100%; max-width: 400px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
}

.cd-login-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 8px 0; }
.cd-login-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.8); margin: 0 0 28px 0; }

.cd-login-error {
    background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5; padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem;
}

.cd-login-form .cd-form-group {
    margin-bottom: 20px;
}

.cd-login-form label {
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500;
    margin-bottom: 8px; color: rgba(255,255,255,0.95);
}

.cd-login-form label svg { color: rgba(255,255,255,0.7); flex-shrink: 0; }

.cd-login-form input[type="text"],
.cd-login-form input[type="password"] {
    width: 100%; padding: 14px 16px; font-size: 1rem;
    background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px; color: #fff;
}

.cd-login-form input::placeholder { color: rgba(255,255,255,0.4); }

.cd-login-form input:focus {
    outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.cd-password-row { display: block; }
.cd-password-row input { width: 100%; display: block; }
.cd-forgot-wrap { margin-top: 8px; }

.cd-forgot-link {
    font-size: 0.85rem; color: #38bdf8; text-decoration: none; white-space: nowrap;
}

.cd-forgot-link:hover { text-decoration: underline; color: #7dd3fc; }

.cd-btn-login {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; margin-top: 24px; margin-bottom: 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cd-btn-login:hover {
    transform: translateY(-1px); box-shadow: 0 4px 20px rgba(14, 165, 233, 0.5);
}

.cd-btn-login svg { flex-shrink: 0; }

.cd-register-link {
    text-align: center; font-size: 0.9rem; color: rgba(255,255,255,0.85); margin: 0;
}

.cd-register-link a { color: #38bdf8; text-decoration: none; }
.cd-register-link a:hover { text-decoration: underline; color: #7dd3fc; }

.cd-copyright {
    margin: 24px 0 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem; color: rgba(255,255,255,0.5); text-align: center;
}

@media (max-width: 900px) {
    .cd-login-wrap { flex-direction: column; }
    .cd-login-left { padding: 32px 24px; }
    .cd-login-right { flex: none; padding: 24px; }
    .cd-login-garantias { flex-wrap: wrap; gap: 24px; }
}

/* Página consulta standalone (mismo diseño que login) */
body.cd-consulta-standalone .cd-consulta-card-login {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    padding: 32px; border-radius: 16px; margin-bottom: 16px;
}
body.cd-consulta-standalone .cd-consulta-card-login .cd-login-title,
body.cd-consulta-standalone .cd-consulta-card-login .cd-login-subtitle {
    color: rgba(255,255,255,0.95);
}
body.cd-consulta-standalone .cd-consulta-card-login .cd-login-subtitle { opacity: 0.85; }
body.cd-consulta-standalone #cd-consulta-result {
    max-height: 70vh; overflow-y: auto; margin-bottom: 16px;
}
body.cd-consulta-standalone #cd-consulta-result .cd-tarjeta-publica-card { background: #fff; color: #111; }
body.cd-consulta-standalone #cd-consulta-result .cd-error { color: #fca5a5; }
