/* ==========================================================
   TALA — AUTH PAGES: ACTIVE MOTION ANIMATED THEME
   Centered Card + Top-Left EmpireOne Logo + TALA Branding
   ========================================================== */

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

:root {
    --teal-1:         #0D9488;
    --teal-2:         #14B8A6;
    --teal-3:         #5EEAD4;
    --teal-4:         #F0FDFA;
    --cyan-1:         #0891B2;
    --cyan-2:         #06B6D4;
    --cyan-3:         #67E8F9;
    --cyan-4:         #CFFAFE;

    --gradient-main:  linear-gradient(135deg, #0D9488 0%, #0891B2 50%, #06B6D4 100%);
    --gradient-btn:   linear-gradient(135deg, #0D9488 0%, #06B6D4 100%);
    --gradient-text:  linear-gradient(135deg, #0D9488 0%, #06B6D4 100%);

    --text-dark:      #0F172A;
    --text-mid:       #334155;
    --text-muted:     #64748B;
    --text-light:     #94A3B8;

    --border:         #E2E8F0;
    --border-focus:   #06B6D4;

    --success:        #10B981;
    --danger:         #EF4444;

    --shadow-card:    0 30px 80px -15px rgba(5, 30, 45, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.95);
    --shadow-teal:    0 8px 30px rgba(6, 182, 212, 0.4);

    --ease:           cubic-bezier(0.16, 1, 0.3, 1);
    --transition:     all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-body {
    background: #061926;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow-x: hidden;
    padding: 70px 16px 30px;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   TOP-LEFT EMPIREONE BRANDING
   ========================================================== */
.auth-top-left-brand {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.auth-top-left-brand:hover {
    transform: translateY(-1px);
}

.auth-top-left-logo {
    height: 38px;
    max-width: 170px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

.auth-top-left-divider {
    height: 22px;
    width: 1.5px;
    background: rgba(255, 255, 255, 0.25);
}

.auth-top-left-badge {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #67E8F9;
    text-transform: uppercase;
}

/* ==========================================================
   DYNAMIC MOTION ANIMATED BACKGROUND
   ========================================================== */
.auth-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0B2538 0%, #071A27 60%, #041018 100%);
}

/* Animated shifting gradient mesh */
.auth-bg-canvas::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: 
        radial-gradient(ellipse 900px 700px at 15% 20%, rgba(13, 148, 136, 0.45) 0%, transparent 65%),
        radial-gradient(ellipse 800px 600px at 85% 85%, rgba(6, 182, 212, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 700px 500px at 50% 30%, rgba(14, 165, 233, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 600px 600px at 80% 15%, rgba(20, 184, 166, 0.35) 0%, transparent 60%);
    animation: gradientFlow 14s ease-in-out infinite alternate;
}

/* Tech grid overlay */
.auth-bg-canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 45px 45px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

@keyframes gradientFlow {
    0%   { transform: scale(1) translate(0, 0) rotate(0deg); }
    50%  { transform: scale(1.1) translate(40px, -30px) rotate(4deg); }
    100% { transform: scale(1) translate(-30px, 40px) rotate(-3deg); }
}

/* ACTIVE FLOATING GLOWING ORBS WITH MOTION */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(55px);
    pointer-events: none;
}

.orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.55) 0%, transparent 70%);
    top: -5%;
    left: -5%;
    animation: orbMotion1 18s ease-in-out infinite;
}

.orb-2 {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.5) 0%, transparent 70%);
    bottom: -5%;
    right: -5%;
    animation: orbMotion2 22s ease-in-out infinite;
}

.orb-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%);
    top: 40%;
    right: 15%;
    animation: orbMotion3 16s ease-in-out infinite;
}

.orb-4 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.4) 0%, transparent 70%);
    bottom: 25%;
    left: 10%;
    animation: orbMotion4 20s ease-in-out infinite;
}

@keyframes orbMotion1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(80px, 60px) scale(1.15); }
    66%      { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes orbMotion2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-70px, -80px) scale(1.2); }
    66%      { transform: translate(-40px, 30px) scale(0.95); }
}

@keyframes orbMotion3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-60px, -50px) scale(1.18); }
}

@keyframes orbMotion4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(50px, 40px) scale(1.12); }
}

/* ROTATING GEOMETRIC TECH RINGS */
.tech-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px dashed rgba(6, 182, 212, 0.18);
    pointer-events: none;
}

.ring-1 {
    width: 620px;
    height: 620px;
    top: 50%;
    left: 50%;
    margin-top: -310px;
    margin-left: -310px;
    animation: spinClockwise 45s linear infinite;
}

.ring-2 {
    width: 900px;
    height: 900px;
    top: 50%;
    left: 50%;
    margin-top: -450px;
    margin-left: -450px;
    border-style: solid;
    border-color: rgba(13, 148, 136, 0.1);
    animation: spinCounterClockwise 65s linear infinite;
}

@keyframes spinClockwise {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

/* FLOATING GLOWING PARTICLES */
.particle-group {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(103, 232, 249, 0.6);
    box-shadow: 0 0 12px rgba(103, 232, 249, 0.8);
    animation: particleDrift 10s ease-in-out infinite;
}

.p1 { width: 6px; height: 6px; top: 20%; left: 18%; animation-duration: 8s; }
.p2 { width: 8px; height: 8px; top: 70%; left: 22%; animation-duration: 12s; animation-delay: 1s; }
.p3 { width: 5px; height: 5px; top: 30%; right: 20%; animation-duration: 9s; animation-delay: 2s; }
.p4 { width: 7px; height: 7px; top: 75%; right: 25%; animation-duration: 11s; animation-delay: 3s; }
.p5 { width: 4px; height: 4px; top: 15%; right: 40%; animation-duration: 7s; }
.p6 { width: 6px; height: 6px; bottom: 15%; left: 45%; animation-duration: 10s; animation-delay: 2s; }

@keyframes particleDrift {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50%      { transform: translateY(-35px) translateX(20px); opacity: 0.9; }
}

/* ==========================================================
   CENTERED AUTH CONTAINER & CARD
   ========================================================== */
.auth-center-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    margin: auto;
    animation: cardEntrance 0.6s var(--ease) both;
}

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

.auth-center-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 26px;
    padding: 38px 38px 34px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.95);
    position: relative;
}

/* TOP CARD BRANDING — TALA */
.auth-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-tala-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--gradient-btn);
    color: #fff;
    font-size: 24px;
    box-shadow: var(--shadow-teal);
    margin-bottom: 14px;
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4); }
    50%      { transform: scale(1.05); box-shadow: 0 12px 32px rgba(6, 182, 212, 0.6); }
}

.auth-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--teal-4);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 50px;
    padding: 4px 13px;
    font-size: 11px;
    font-weight: 700;
    color: var(--teal-1);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.auth-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.tala-highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.auth-card-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================
   FORM CONTROLS & INPUTS
   ========================================================== */
.auth-field {
    margin-bottom: 16px;
    text-align: left;
}

.auth-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap .field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
}

.auth-input-wrap:focus-within .field-icon {
    color: var(--teal-1);
}

.auth-input {
    width: 100%;
    background: #F8FAFC;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px 12px 44px;
    font-size: 14px;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.auth-input::placeholder {
    color: var(--text-light);
}

.auth-input:focus {
    border-color: var(--teal-2);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.auth-toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 15px;
    padding: 4px;
    transition: var(--transition);
}

.auth-toggle-pwd:hover {
    color: var(--teal-1);
}

.auth-extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.auth-forgot {
    color: var(--teal-1);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-forgot:hover {
    color: var(--cyan-1);
    text-decoration: underline;
}

.auth-checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
}

.auth-checkbox {
    width: 17px;
    height: 17px;
    accent-color: var(--teal-1);
    cursor: pointer;
    border-radius: 4px;
}

.auth-checkbox-row label {
    font-size: 13px;
    color: var(--text-mid);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.auth-btn-primary {
    width: 100%;
    background: var(--gradient-btn);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 13px 24px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.auth-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.45);
}

.auth-btn-primary:hover::before {
    opacity: 1;
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-btn-ghost {
    width: 100%;
    background: transparent;
    color: var(--text-mid);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 11px 24px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-ghost:hover:not(:disabled) {
    border-color: var(--teal-2);
    color: var(--teal-1);
    background: var(--teal-4);
}

.auth-btn-ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 20px;
    transition: var(--transition);
    font-weight: 500;
}

.auth-back-link:hover {
    color: var(--teal-1);
}

/* ==========================================================
   ALERTS & FEEDBACK
   ========================================================== */
.auth-alert {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 11px 15px;
    font-size: 13px;
    color: #B91C1C;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlide 0.35s var(--ease) both;
}

.auth-alert.success {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}

.auth-alert.info {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

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

/* OTP Timer */
.otp-timer-wrap {
    margin-bottom: 16px;
}

.otp-timer-bar {
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.otp-timer-fill {
    height: 100%;
    background: var(--gradient-btn);
    border-radius: 2px;
    transition: width 1s linear;
}

.otp-timer-text {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.otp-timer-text strong {
    color: var(--teal-1);
    font-weight: 700;
}

/* Password strength guide */
.pwd-rule-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 6px 0 16px;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
}

/* Footer note */
.auth-card-footer {
    margin-top: 22px;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    font-size: 12px;
    color: var(--text-light);
}

@media (max-width: 480px) {
    .auth-top-left-brand {
        top: 16px;
        left: 16px;
    }
    .auth-top-left-logo {
        height: 30px;
    }
    .auth-center-card {
        padding: 30px 22px;
    }
}
