@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-primary:   #3b82f6;
    --brand-secondary: #8b5cf6;
    --brand-accent:    #06b6d4;
    --text-dark: #1e293b;
    --text-grey: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', sans-serif; }

body {
    background: #f1f5f9;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#liquid-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.3;
}

.main-stage {
    position: relative;
    z-index: 10;
    display: flex;
    width: 85%;
    max-width: 2000px;
    align-items: center;
    justify-content: center;
    gap: 100px;
}

/* Hero / Slider */
.hero-section {
    flex: 1;
    max-width: 550px;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 450px;
}

.hero-slider {
    display: grid;
    grid-template-areas: "slide";
    align-items: end;
    position: relative;
    min-height: 320px;
    width: 100%;
    margin-bottom: 20px;
}

.text-slide {
    grid-area: slide;
    width: 100%;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease-out;
    pointer-events: none;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.text-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    visibility: visible;
}

.slide-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.slide-title {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-desc {
    font-size: 1.05rem;
    color: var(--text-dark);
    opacity: 0.8;
    max-width: 500px;
    line-height: 1.6;
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.4);
    color: var(--brand-primary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    font-size: 1rem;
}

.control-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: scale(1.05);
}

.slider-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.5;
}

.dot.active {
    background: var(--brand-primary);
    width: 24px;
    border-radius: 4px;
    opacity: 1;
}

.card-entry-animation {
    animation: floatUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-base {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.05),
        0 1px 0 rgba(255,255,255,0.5) inset;
    transform: perspective(1000px) rotateY(-2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-base:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

@keyframes floatUp {
    from { opacity: 0; transform: translateY(40px) perspective(1000px) rotateY(-2deg); }
    to   { opacity: 1; transform: translateY(0)   perspective(1000px) rotateY(-2deg); }
}

.login-card {
    width: 500px;
    padding: 35px;
}

.register-card {
    width: 620px;
    padding: 35px;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.legacy-logo {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto;
}

.card-header h2 {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
}

.input-field {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 0.3px solid #cbd5e1;
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.input-field:focus {
    background: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-grey);
    margin-bottom: 8px;
    margin-left: 5px;
}

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

.recaptcha-container {
    margin: 10px 0 25px 0;
    display: flex;
    justify-content: center;
}

.btn-fluid {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    color: white; font-weight: 700; font-size: 1rem; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background-image: linear-gradient(45deg, var(--brand-primary) 0%, var(--brand-secondary) 51%, var(--brand-primary) 100%);
    background-size: 200% auto; transition: 0.5s;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.btn-fluid:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.5);
}

.btn-fluid.is-disabled {
    cursor: not-allowed; pointer-events: none;
    background-image: linear-gradient(45deg, #94a3b8 0%, #64748b 51%, #94a3b8 100%);
    box-shadow: 0 6px 14px -5px rgba(100,116,139,0.65);
    opacity: 0.95;
}

.btn-loading-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.card-footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.85rem;
}

.footer-link { color: var(--text-grey); text-decoration: none; font-weight: 600; }
.footer-link:hover { color: var(--brand-primary); }

.legal-links {
    margin-top: 25px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}
.legal-links a { color: #94a3b8; text-decoration: none; margin: 0 6px; }
.legal-links a:hover { color: var(--brand-primary); }

/* Toast */
.toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 99999;
    display: flex; flex-direction: column; gap: 12px;
    max-width: 420px; width: calc(100vw - 48px); pointer-events: none;
}

.toast-notification {
    pointer-events: all; display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px; border-radius: 18px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
    position: relative; overflow: hidden;
    animation: toastSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform: translateX(120%);
}

.toast-notification.toast-hiding {
    animation: toastSlideOut 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0);    opacity: 1; max-height: 200px; margin-bottom: 0; padding: 16px 18px; }
    60%  { transform: translateX(120%); opacity: 0; max-height: 200px; padding: 16px 18px; }
    100% { transform: translateX(120%); opacity: 0; max-height: 0; padding: 0 18px; margin-bottom: -12px; }
}

.toast-icon-wrapper {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

.toast-notification.toast-danger  .toast-icon-wrapper { background: linear-gradient(135deg,#fee2e2,#fecaca); color:#dc2626; }
.toast-notification.toast-warning .toast-icon-wrapper { background: linear-gradient(135deg,#fef3c7,#fde68a); color:#d97706; }
.toast-notification.toast-success .toast-icon-wrapper { background: linear-gradient(135deg,#d1fae5,#a7f3d0); color:#059669; }
.toast-notification.toast-info    .toast-icon-wrapper { background: linear-gradient(135deg,#dbeafe,#bfdbfe); color:#2563eb; }

.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 3px; letter-spacing: 0.2px; }

.toast-notification.toast-danger  .toast-title { color: #991b1b; }
.toast-notification.toast-warning .toast-title { color: #92400e; }
.toast-notification.toast-success .toast-title { color: #065f46; }
.toast-notification.toast-info    .toast-title { color: #1e40af; }

.toast-message { font-size: 0.82rem; color: #475569; line-height: 1.5; word-break: break-word; }

.toast-close {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    color: #94a3b8; cursor: pointer; font-size: 0.85rem; padding: 4px;
    border-radius: 8px; transition: all 0.2s; line-height: 1;
}
.toast-close:hover { background: rgba(0,0,0,0.06); color: #475569; }

.toast-progress {
    position: absolute; bottom: 0; left: 0; height: 3px;
    border-radius: 0 0 18px 18px;
    animation: toastProgress 6s linear forwards;
}

.toast-notification.toast-danger  .toast-progress { background: linear-gradient(90deg,#f87171,#dc2626); }
.toast-notification.toast-warning .toast-progress { background: linear-gradient(90deg,#fbbf24,#d97706); }
.toast-notification.toast-success .toast-progress { background: linear-gradient(90deg,#34d399,#059669); }
.toast-notification.toast-info    .toast-progress { background: linear-gradient(90deg,#60a5fa,#2563eb); }

@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

.toast-notification::before {
    content: ''; position: absolute; left: 0; top: 10%; height: 80%; width: 3.5px; border-radius: 0 3px 3px 0;
}
.toast-notification.toast-danger::before  { background: linear-gradient(180deg,#f87171,#dc2626); }
.toast-notification.toast-warning::before { background: linear-gradient(180deg,#fbbf24,#d97706); }
.toast-notification.toast-success::before { background: linear-gradient(180deg,#34d399,#059669); }
.toast-notification.toast-info::before    { background: linear-gradient(180deg,#60a5fa,#2563eb); }

/* Responsivo */
@media (max-width: 1200px) {
    body { height: auto; min-height: 100vh; overflow-y: auto; overflow-x: hidden; display: block; }
    .main-stage { width: 100%; min-height: 100vh; padding: 40px 20px; justify-content: center; align-items: center; gap: 0; }
    .hero-section { display: none; }
    .login-card, .register-card { width: 100%; max-width: 480px; transform: none; padding: 30px 25px; margin: 0 auto; }
    .card-base:hover { transform: none; }
}

@media (max-width: 768px) {
    .main-stage { padding: 20px 15px; }
    .register-card { max-width: 100%; padding: 25px 20px; border-radius: 24px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .phone-grid { grid-template-columns: 70px 1fr; gap: 10px; }
    .input-field { padding: 14px 16px; font-size: 16px; margin-bottom: 15px; }
    .input-label { font-size: 0.8rem; margin-bottom: 6px; }
    .btn-fluid { padding: 14px; font-size: 0.95rem; }
    .recaptcha-container { transform: scale(0.9); transform-origin: center; }
}

@media (max-width: 480px) {
    body { padding-top: 0; }
    .main-stage { padding: 8px; min-height: 100vh; min-height: 100dvh; justify-content: center; align-items: center; }
    .register-card { padding: 16px 14px; border-radius: 18px; margin: 0 auto; box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
    .card-header { margin-bottom: 12px; }
    .card-header h2 { font-size: 1.1rem; }
    .legacy-logo { max-width: 120px; max-height: 50px; margin: 0 auto 10px auto; }
    .input-field { padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 16px; }
    .phone-grid { grid-template-columns: 55px 1fr; gap: 6px; }
    .btn-fluid { padding: 12px; border-radius: 10px; font-size: 0.88rem; }
    .recaptcha-container { transform: scale(0.82); transform-origin: center; margin: 6px 0 12px 0; }
    .card-footer { margin-top: 14px; font-size: 0.78rem; }
    #liquid-canvas { display: none; }
}

@media (max-width: 360px) {
    .main-stage { padding: 5px; }
    .register-card { padding: 12px 10px; border-radius: 14px; }
    .card-header h2 { font-size: 1rem; }
    .legacy-logo { max-width: 100px; max-height: 40px; }
    .input-field { padding: 9px 10px; font-size: 15px; margin-bottom: 8px; }
    .phone-grid { grid-template-columns: 50px 1fr; gap: 5px; }
    .btn-fluid { padding: 11px; font-size: 0.85rem; }
    .recaptcha-container { transform: scale(0.72); margin: 4px 0 10px 0; }
    .card-footer { margin-top: 10px; font-size: 0.72rem; }
}
