/**
 * Eduzentra — Premium Login & Register UI
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ec-auth-royal: #0a2a6e;
    --ec-auth-electric: #2563eb;
    --ec-auth-cyan: #06b6d4;
    --ec-auth-purple: #7c3aed;
    --ec-auth-white: #ffffff;
    --ec-auth-gray: #64748b;
    --ec-auth-border: rgba(255, 255, 255, 0.12);
    --ec-auth-glass: rgba(255, 255, 255, 0.72);
    --ec-auth-radius: 24px;
    --ec-auth-shadow: 0 32px 64px rgba(3, 27, 78, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.ec-auth-body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: #030712 !important;
    margin: 0;
    min-height: 100vh;
}

body.ec-auth-body #wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

body.ec-auth-body .preloader {
    background: #030712 !important;
}

/* ─── Ambient background ─── */
.ec-auth-page {
    position: relative;
    width: 100%;
    max-width: 1180px;
    z-index: 1;
}

.ec-auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ec-auth-bg__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.ec-auth-bg__glow--1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, #2563eb 0%, transparent 70%);
}

.ec-auth-bg__glow--2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -60px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
}

.ec-auth-bg__glow--3 {
    width: 360px;
    height: 360px;
    top: 40%;
    left: 45%;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    opacity: 0.35;
}

.ec-auth-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: ec-auth-float 8s ease-in-out infinite;
}

.ec-auth-particle:nth-child(1) { width: 8px; height: 8px; top: 18%; left: 12%; animation-delay: 0s; }
.ec-auth-particle:nth-child(2) { width: 12px; height: 12px; top: 72%; left: 8%; animation-delay: 1.2s; }
.ec-auth-particle:nth-child(3) { width: 6px; height: 6px; top: 35%; right: 15%; animation-delay: 2s; }
.ec-auth-particle:nth-child(4) { width: 10px; height: 10px; bottom: 22%; right: 28%; animation-delay: 0.6s; }
.ec-auth-particle:nth-child(5) { width: 14px; height: 14px; top: 55%; left: 55%; animation-delay: 1.8s; opacity: 0.5; }

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

/* ─── Main card ─── */
.ec-auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 640px;
    border-radius: var(--ec-auth-radius);
    overflow: hidden;
    box-shadow: var(--ec-auth-shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--ec-auth-white);
}

/* ─── Brand panel ─── */
.ec-auth-brand {
    position: relative;
    padding: 2.5rem 2.25rem;
    background: linear-gradient(145deg, #031b4e 0%, #0a2a6e 35%, #1d4ed8 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ec-auth-brand::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -25%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.35) 0%, transparent 68%);
    pointer-events: none;
}

.ec-auth-brand::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.ec-auth-brand__logo {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.ec-auth-brand__logo img {
    max-height: 42px;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ec-auth-brand__logo-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.ec-auth-brand__logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ec-auth-brand__title {
    position: relative;
    z-index: 2;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}

.ec-auth-brand__subtitle {
    position: relative;
    z-index: 2;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 1.5rem;
    max-width: 380px;
}

.ec-auth-features {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.ec-auth-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.ec-auth-feature i {
    font-size: 1rem;
    color: #93c5fd;
}

/* ─── 3D-style illustration scene ─── */
.ec-auth-scene {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 200px;
    margin-top: auto;
}

.ec-auth-scene__orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.9), rgba(37, 99, 235, 0.6));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45), inset 0 -8px 20px rgba(0, 0, 0, 0.15);
    animation: ec-auth-orb 6s ease-in-out infinite;
}

.ec-auth-scene__orb--main {
    width: 100px;
    height: 100px;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
}

.ec-auth-scene__float {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 1.35rem;
    animation: ec-auth-float 5s ease-in-out infinite;
}

.ec-auth-scene__float--cap {
    width: 52px;
    height: 52px;
    top: 20px;
    left: 18%;
    animation-delay: 0.3s;
}

.ec-auth-scene__float--book {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 20%;
    animation-delay: 0.8s;
}

.ec-auth-scene__float--passport {
    width: 40px;
    height: 40px;
    bottom: 100px;
    left: 12%;
    animation-delay: 1.1s;
}

.ec-auth-scene__float--laptop {
    width: 56px;
    height: 56px;
    bottom: 90px;
    right: 10%;
    animation-delay: 0.5s;
    font-size: 1.5rem;
}

.ec-auth-scene__plane {
    position: absolute;
    top: 42px;
    left: 58%;
    font-size: 1.25rem;
    color: #93c5fd;
    animation: ec-auth-plane 4s ease-in-out infinite;
}

@keyframes ec-auth-orb {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes ec-auth-plane {
    0%, 100% { transform: translate(0, 0) rotate(-8deg); }
    50% { transform: translate(12px, -8px) rotate(4deg); }
}

/* ─── Form panel ─── */
.ec-auth-form-panel {
    padding: 2rem 2.25rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.ec-auth-glass {
    width: 100%;
    max-width: 420px;
    padding: 1.75rem 1.85rem 1.85rem;
    border-radius: 22px;
    background: var(--ec-auth-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ec-auth-tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem;
    background: #f1f5f9;
    border-radius: 14px;
    margin-bottom: 1.5rem;
}

.ec-auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.55rem 1rem;
    border-radius: 11px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ec-auth-gray);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ec-auth-tab:hover {
    color: #0f172a;
    text-decoration: none;
}

.ec-auth-tab.is-active {
    background: #fff;
    color: var(--ec-auth-electric);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.ec-auth-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.ec-auth-subheading {
    font-size: 0.875rem;
    color: var(--ec-auth-gray);
    margin: 0 0 1.35rem;
}

.ec-auth-field {
    margin-bottom: 1rem;
}

.ec-auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.ec-auth-input-wrap {
    position: relative;
}

.ec-auth-input-wrap > i.ec-auth-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.ec-auth-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ec-auth-input:focus {
    outline: none;
    border-color: var(--ec-auth-electric);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ec-auth-input--plain {
    padding-left: 1rem;
}

.ec-auth-toggle-pw {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem;
    cursor: pointer;
    z-index: 2;
    font-size: 1.1rem;
    line-height: 1;
}

.ec-auth-toggle-pw:hover {
    color: #475569;
}

.ec-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ec-auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--ec-auth-gray);
    cursor: pointer;
    margin: 0;
}

.ec-auth-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--ec-auth-electric);
    cursor: pointer;
}

.ec-auth-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ec-auth-electric);
    text-decoration: none;
}

.ec-auth-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.ec-auth-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #06b6d4 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ec-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(124, 58, 237, 0.45);
}

.ec-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.ec-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ec-auth-divider::before,
.ec-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.ec-auth-social {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.ec-auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ec-auth-social-btn:hover:not(:disabled) {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
    color: #0f172a;
    text-decoration: none;
}

.ec-auth-social-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ec-auth-social-btn svg,
.ec-auth-social-btn i {
    font-size: 1.1rem;
}

.ec-auth-footer {
    text-align: center;
    margin-top: 1.35rem;
    font-size: 0.875rem;
    color: var(--ec-auth-gray);
}

.ec-auth-footer a {
    font-weight: 700;
    color: var(--ec-auth-electric);
    text-decoration: none;
}

.ec-auth-footer a:hover {
    text-decoration: underline;
}

/* Register-specific */
.ec-auth-glass--register {
    max-width: 460px;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.ec-auth-form-panel--register {
    align-items: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.ec-auth-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ec-auth-error {
    display: none;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.35rem;
}

/* Alerts */
.ec-auth-glass .alert {
    border-radius: 12px;
    font-size: 0.875rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    position: relative;
}

.ec-auth-glass .alert .btn-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
}

/* intl tel on register */
.ec-auth-glass .iti {
    width: 100%;
}

.ec-auth-glass .iti input.modern-input,
.ec-auth-glass .iti input.ec-auth-input {
    padding-left: 3.5rem !important;
}

/* Responsive */
@media (max-width: 991.98px) {
    .ec-auth-card {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .ec-auth-brand {
        display: none;
    }

    body.ec-auth-body #wrapper {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .ec-auth-glass {
        padding: 1.35rem 1.25rem;
    }

    .ec-auth-name-row {
        grid-template-columns: 1fr;
    }

    .ec-auth-social {
        grid-template-columns: 1fr;
    }
}
