/**
 * TeleLive — auth pages (login / register / forgot / reset) v2
 * Compact, centered card — fits laptop viewport; Google below primary CTA.
 */

.tl-auth-route #pageLoader {
    display: none !important;
}

.tl-auth-route .main-content {
    padding: 0;
    min-height: calc(100vh - 64px);
}

.tl-auth-modern {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 24px 16px 40px;
    overflow: hidden;
    isolation: isolate;
}

.tl-auth-modern__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.tl-auth-modern__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: tlAuthOrb 12s ease-in-out infinite alternate;
}

.tl-auth-modern__orb--1 {
    width: min(50vw, 320px);
    height: min(50vw, 320px);
    background: #1e56f5;
    top: -12%;
    inset-inline-start: -8%;
}

.tl-auth-modern__orb--2 {
    width: min(45vw, 260px);
    height: min(45vw, 260px);
    background: #7c3aed;
    bottom: -10%;
    inset-inline-end: -6%;
    animation-delay: -5s;
    opacity: 0.35;
}

.tl-auth-modern__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
    animation: tlAuthGridPulse 8s ease-in-out infinite;
}

@keyframes tlAuthOrb {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(16px, -12px) scale(1.06); }
}

@keyframes tlAuthGridPulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 0.55; }
}

.tl-auth-modern__inner {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 0;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 14, 18, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 28px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: tlAuthCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tl-auth-modern__hero {
    padding: 36px 32px;
    background:
        linear-gradient(145deg, rgba(30, 86, 245, 0.22), transparent 55%),
        linear-gradient(220deg, rgba(124, 58, 237, 0.12), transparent 50%),
        rgba(10, 10, 14, 0.5);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.tl-auth-hero-showcase {
    gap: 14px;
}

.tl-auth-hero__scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(30, 86, 245, 0.08) 45%, transparent 90%);
    animation: tlAuthScan 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tlAuthScan {
    0%, 100% { transform: translateY(-30%); opacity: 0.4; }
    50%      { transform: translateY(30%); opacity: 0.85; }
}

.tl-auth-hero__visual {
    position: relative;
    width: fit-content;
    margin-bottom: 4px;
}

.tl-auth-hero__ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px solid rgba(82, 128, 255, 0.35);
    animation: tlAuthRing 3.2s ease-out infinite;
}

.tl-auth-hero__ring--2 {
    animation-delay: 1.1s;
    inset: -22px;
    border-color: rgba(124, 58, 237, 0.2);
}

@keyframes tlAuthRing {
    0%   { transform: scale(0.92); opacity: 0.9; }
    100% { transform: scale(1.18); opacity: 0; }
}

.tl-auth-hero-showcase .tl-auth-modern__hero-logo {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
}

.tl-auth-hero__live {
    position: absolute;
    bottom: -4px;
    inset-inline-end: -8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.92);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.45);
    animation: tlAuthLivePulse 2s ease-in-out infinite;
}

.tl-auth-hero__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: tlAuthLiveBlink 1.2s ease-in-out infinite;
}

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

@keyframes tlAuthLiveBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.tl-auth-hero__lead {
    margin: 0;
    color: var(--text-muted, #a1a1aa);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 34ch;
}

.tl-auth-hero-showcase .tl-auth-modern__features li {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: tlAuthFeatIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.12s + var(--i, 0) * 0.08s);
}

@keyframes tlAuthFeatIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

[dir="rtl"] .tl-auth-hero-showcase .tl-auth-modern__features li {
    animation-name: tlAuthFeatInRtl;
}

@keyframes tlAuthFeatInRtl {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.tl-auth-hero__mock {
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: tlAuthMockIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

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

.tl-auth-hero__mock-bar {
    display: flex;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-auth-hero__mock-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.tl-auth-hero__mock-bar span:first-child { background: #f43f5e; }
.tl-auth-hero__mock-bar span:nth-child(2) { background: #eab308; }
.tl-auth-hero__mock-bar span:nth-child(3) { background: #22c55e; }

.tl-auth-hero__mock-body {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 6px;
    padding: 8px;
}

.tl-auth-hero__mock-video {
    border-radius: 8px;
    min-height: 52px;
    background: linear-gradient(135deg, rgba(30, 86, 245, 0.45), rgba(124, 58, 237, 0.25));
    animation: tlAuthMockVideo 3s ease-in-out infinite alternate;
}

@keyframes tlAuthMockVideo {
    from { filter: brightness(0.95); }
    to   { filter: brightness(1.15); }
}

.tl-auth-hero__mock-chat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.tl-auth-hero__mock-chat span {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    animation: tlAuthChatLine 2.4s ease-in-out infinite;
}

.tl-auth-hero__mock-chat span:nth-child(2) { width: 85%; animation-delay: 0.3s; }
.tl-auth-hero__mock-chat span.short { width: 55%; animation-delay: 0.6s; }

@keyframes tlAuthChatLine {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

.tl-auth-modern__hero-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(30, 86, 245, 0.35);
    animation: tlAuthLogoPulse 4s ease-in-out infinite;
}

.tl-auth-modern__hero h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tl-auth-modern__hero > p {
    margin: 0;
    color: var(--text-muted, #a1a1aa);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 32ch;
}

.tl-auth-modern__features {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tl-auth-modern__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: #c4c4cc;
}

.tl-auth-modern__features i {
    color: var(--brand-soft, #6b9fff);
    width: 18px;
    text-align: center;
}

.tl-auth-modern__panel {
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: calc(100vh - 64px - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

@keyframes tlAuthCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.tl-auth-modern__head {
    margin-bottom: 20px;
    animation: tlAuthStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.tl-auth-modern__head h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.tl-auth-modern__head > p {
    margin: 0;
    color: var(--text-muted, #a1a1aa);
    font-size: 0.88rem;
    line-height: 1.45;
}

.tl-auth-modern__body {
    animation: tlAuthStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

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

.tl-auth-modern .auth-form .form-group {
    animation: tlAuthFieldIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tl-auth-modern .auth-form .form-group:nth-child(1) { animation-delay: 0.12s; }
.tl-auth-modern .auth-form .form-group:nth-child(2) { animation-delay: 0.16s; }
.tl-auth-modern .auth-form .form-group:nth-child(3) { animation-delay: 0.2s; }
.tl-auth-modern .auth-form .form-group:nth-child(4) { animation-delay: 0.24s; }
.tl-auth-modern .auth-form .form-group:nth-child(5) { animation-delay: 0.28s; }
.tl-auth-modern .auth-form .form-group:nth-child(6) { animation-delay: 0.32s; }

@keyframes tlAuthFieldIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] .tl-auth-modern .auth-form .form-group {
    animation-name: tlAuthFieldInRtl;
}

@keyframes tlAuthFieldInRtl {
    from {
        opacity: 0;
        transform: translateX(8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tl-auth-modern .form-group {
    margin-bottom: 12px;
}

.tl-auth-modern .form-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #d4d4dc;
}

.tl-auth-modern .form-group label i {
    color: var(--brand-soft, #6b9fff);
    font-size: 0.85rem;
    width: 14px;
}

.tl-auth-modern .form-group input[type="text"],
.tl-auth-modern .form-group input[type="email"],
.tl-auth-modern .form-group input[type="tel"],
.tl-auth-modern .form-group input[type="password"] {
    width: 100%;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.94rem;
    transition: border-color 0.2s, box-shadow 0.25s, background 0.2s, transform 0.15s;
    box-sizing: border-box;
}

.tl-auth-modern .form-group input:focus {
    outline: none;
    border-color: rgba(30, 86, 245, 0.7);
    box-shadow: 0 0 0 3px rgba(30, 86, 245, 0.22);
    background: rgba(0, 0, 0, 0.55);
    transform: translateY(-1px);
}

.tl-auth-modern .password-input {
    position: relative;
}

.tl-auth-modern .password-input input {
    padding-inline-end: 42px;
}

.tl-auth-modern .toggle-password {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 7px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.tl-auth-modern .toggle-password:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.tl-auth-modern .form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.tl-auth-modern .form-error {
    min-height: 1.1em;
    margin: 6px 0 10px;
    font-size: 0.84rem;
    color: #f43f5e;
}

.tl-auth-modern .form-error.is-success {
    color: #22c55e;
}

.tl-auth-modern__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 12px;
    flex-wrap: wrap;
}

.tl-auth-modern__remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.84rem;
    cursor: pointer;
    color: #c4c4cc;
    user-select: none;
}

.tl-auth-modern__remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--brand, #1e56f5);
    cursor: pointer;
}

.tl-auth-modern__remember-text {
    line-height: 1.3;
}

.tl-auth-modern__link {
    font-size: 0.82rem;
    color: var(--brand-soft, #6b9fff);
    font-weight: 600;
    text-decoration: none;
}

.tl-auth-modern__link:hover {
    text-decoration: underline;
}

.tl-auth-modern .btn-auth-primary {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 11px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a4fd4 0%, #5280ff 45%, #1e56f5 100%);
    background-size: 200% 100%;
    box-shadow: 0 8px 28px rgba(30, 86, 245, 0.4);
    transition: transform 0.15s, box-shadow 0.2s, background-position 0.4s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tl-auth-modern .btn-auth-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: tlAuthBtnShine 4s ease-in-out infinite;
}

@keyframes tlAuthBtnShine {
    0%, 70%, 100% { transform: translateX(-100%); }
    85%           { transform: translateX(100%); }
}

.tl-auth-modern .btn-auth-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(30, 86, 245, 0.5);
    background-position: 100% 0;
}

.tl-auth-modern .btn-auth-primary:active:not(:disabled) {
    transform: translateY(0);
}

.tl-auth-modern .btn-auth-primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

.tl-auth-modern .btn-auth-outline {
    width: 100%;
    margin-top: 8px;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #e4e4e7;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tl-auth-modern .btn-auth-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Google — always below primary action */
.tl-auth-modern .auth-oauth-block {
    margin: 18px 0 0;
    padding-top: 4px;
    animation: tlAuthStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.tl-auth-modern .auth-oauth-block .auth-divider {
    margin: 0 0 14px;
}

.tl-auth-modern .auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: lowercase;
}

.tl-auth-modern .auth-divider::before,
.tl-auth-modern .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.tl-auth-modern .btn-google {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 11px;
    padding: 11px 14px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s, background 0.15s;
}

.tl-auth-modern .btn-google:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    background: #f8fafc;
    color: #111;
}

.tl-auth-modern__footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
    animation: tlAuthStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}

.tl-auth-modern__footer a {
    color: var(--brand-soft);
    font-weight: 700;
    text-decoration: none;
}

.tl-auth-modern__footer a:hover {
    text-decoration: underline;
}

.tl-auth-modern__alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 11px;
    margin-bottom: 14px;
    font-size: 0.84rem;
    line-height: 1.45;
}

.tl-auth-modern__alert--warn {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fecdd3;
}

.tl-auth-modern details.auth-email-alt {
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.tl-auth-modern details.auth-email-alt summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-soft);
}

.tl-auth-modern .tl-otp-input {
    letter-spacing: 0.35em;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

@media (max-width: 860px) {
    .tl-auth-modern__inner {
        grid-template-columns: 1fr;
    }

    .tl-auth-modern__hero {
        display: none;
    }

    .tl-auth-modern__panel {
        padding: 26px 20px 22px;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .tl-auth-modern {
        padding: 12px 10px 24px;
    }

    .tl-auth-modern__inner {
        border-radius: 16px;
    }
}

@media (min-height: 700px) {
    .tl-auth-modern {
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl-auth-modern__orb,
    .tl-auth-modern__grid,
    .tl-auth-modern__hero-logo,
    .tl-auth-modern__inner,
    .tl-auth-modern__head,
    .tl-auth-modern__body,
    .tl-auth-modern__footer,
    .tl-auth-modern .auth-form .form-group,
    .tl-auth-modern .auth-oauth-block,
    .tl-auth-modern .btn-auth-primary::after {
        animation: none !important;
    }
}
