/* ===================================================
   login-page.css — Ca&Pe Courier S.A.C.
   Coloca este archivo en: wwwroot/css/login-page.css
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@300;400;500;600&display=swap');

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #060e2e 0%, #0A1B4B 50%, #0d2266 100%);
    position: relative;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
}

.bg-layer { position: absolute; inset: 0; pointer-events: none; }

.wave {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    animation: pulse 8s ease-in-out infinite;
}
.wave1 { width: 600px; height: 600px; background: #D40000; top: -200px; right: -150px; animation-delay: 0s; }
.wave2 { width: 400px; height: 400px; background: #4a6ef5; bottom: -100px; left: -100px; animation-delay: -3s; }
.wave3 { width: 300px; height: 300px; background: #D40000; bottom: 100px; right: 100px; animation-delay: -6s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.login-container {
    display: flex;
    width: 900px;
    min-height: 560px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    z-index: 2;
}

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

.brand-panel {
    flex: 1;
    background: linear-gradient(160deg, #D40000 0%, #9b0000 60%, #7a0000 100%);
    padding: 48px 40px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.brand-content { position: relative; z-index: 1; color: white; }

.brand-icon {
    width: 64px; height: 64px;
    margin-bottom: 24px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.brand-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    color: white;
}

.brand-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 32px;
}

.brand-features { display: flex; flex-direction: column; gap: 12px; }

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
}

.feature-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    flex-shrink: 0;
}

.form-panel {
    flex: 1.2;
    background: #ffffff;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.company-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 64px;
}

.logo-img {
    max-height: 70px;
    max-width: 240px;
    object-fit: contain;
}

.logo-fallback {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: 'Playfair Display', serif;
}
.logo-text-ca { font-size: 2.4rem; color: #0A1B4B; font-weight: 700; }
.logo-amp     { font-size: 2rem;   color: #D40000; font-weight: 700; }
.logo-text-pe { font-size: 2.4rem; color: #0A1B4B; font-weight: 700; }
.logo-courier {
    font-size: 0.85rem; color: #D40000; font-weight: 600;
    margin-left: 4px; align-self: flex-end; padding-bottom: 4px; letter-spacing: 0.04em;
}

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

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #0A1B4B;
    margin-bottom: 4px;
}

.form-subtitle { font-size: 0.875rem; color: #64748b; }

.alert-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid #D40000;
    border-radius: 10px;
    color: #9f1239;
    font-size: 0.85rem;
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
.alert-error svg { width: 18px; height: 18px; flex-shrink: 0; }

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.login-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0A1B4B;
    letter-spacing: 0.03em;
}

.field-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s ease;
    overflow: hidden;
}
.field-wrapper:focus-within {
    border-color: #0A1B4B;
    background: white;
    box-shadow: 0 0 0 3px rgba(10,27,75,0.1);
}

.field-icon {
    padding: 0 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.field-icon svg { width: 18px; height: 18px; }

.field-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 0;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    color: #1e293b;
    outline: none;
}
.field-input::placeholder { color: #cbd5e1; }

.toggle-password {
    padding: 0 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-password:hover { color: #0A1B4B; }
.toggle-password svg { width: 18px; height: 18px; }

.field-error { font-size: 0.78rem; color: #D40000; padding-left: 4px; }

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0A1B4B 0%, #1a3a8f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    letter-spacing: 0.02em;
}
.btn-login svg { width: 18px; height: 18px; transition: transform 0.2s; }
.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #D40000 0%, #ff2222 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(212,0,0,0.35);
}
.btn-login:hover:not(:disabled) svg { transform: translateX(4px); }
.btn-login:disabled { opacity: 0.75; cursor: not-allowed; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
.form-footer p { font-size: 0.75rem; color: #94a3b8; }

@media (max-width: 768px) {
    .login-container { flex-direction: column; width: 95%; }
    .brand-panel { padding: 32px 28px; }
    .form-panel { padding: 32px 28px; }
}
