/* admin/css/login.css - Premium AliTravels Admin Login */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.login-page {
    background: #0b1a3a;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 24px 20px;
}

/* ---- Background ---- */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.22), transparent 45%),
        radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.14), transparent 40%),
        radial-gradient(circle at 78% 88%, rgba(250, 204, 21, 0.12), transparent 45%),
        linear-gradient(160deg, #0b1a3a 0%, #122a58 50%, #0d2147 100%);
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: orbFloat 14s ease-in-out infinite;
}

.login-bg-orb-1 { width: 380px; height: 380px; background: rgba(59, 130, 246, 0.30); top: -120px; left: -100px; }
.login-bg-orb-2 { width: 300px; height: 300px; background: rgba(56, 189, 248, 0.22); bottom: -80px; right: -90px; animation-delay: -5s; }
.login-bg-orb-3 { width: 200px; height: 200px; background: rgba(250, 204, 21, 0.14); top: 60%; left: 55%; animation-delay: -9s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -35px) scale(1.12); }
}

.login-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 35% 50%, rgba(0,0,0,0.9), transparent 78%);
    mask-image: radial-gradient(ellipse at 35% 50%, rgba(0,0,0,0.9), transparent 78%);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to   { background-position: 48px 48px; }
}

.login-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.lpart {
    position: absolute;
    bottom: -10px;
    background: rgba(147, 197, 253, 0.6);
    border-radius: 50%;
    animation: particleRise linear infinite;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

@keyframes particleRise {
    0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    8%   { opacity: 0.7; }
    85%  { opacity: 0.5; }
    100% { transform: translateY(-110vh) translateX(60px) scale(0.4); opacity: 0; }
}

/* Flying travel icons */
.background-icon { position: absolute; pointer-events: none; }

.background-icon i {
    color: rgba(255, 255, 255, 0.08);
    animation: iconFloat 16s ease-in-out infinite;
}

.background-icon-1 { font-size: 5.5rem; top: 10%; left: 12%; }
.background-icon-1 i { animation-delay: 0s; }
.background-icon-2 { font-size: 7rem; top: 68%; left: 8%; }
.background-icon-2 i { animation-delay: -3s; }
.background-icon-3 { font-size: 4.5rem; top: 22%; right: 10%; }
.background-icon-3 i { animation-delay: -6s; }
.background-icon-4 { font-size: 6rem; bottom: 12%; right: 12%; }
.background-icon-4 i { animation-delay: -9s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-45px) rotate(8deg); }
}

/* ---- Layout shell ---- */
.login-shell {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1120px;
    min-height: 640px;
    margin: auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(2, 8, 22, 0.6), 0 0 0 1px rgba(255,255,255,0.06);
}

/* ---- Left: card ---- */
.login-main {
    flex: 0 0 46%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
}

.tilt-scene { perspective: 1200px; width: 100%; max-width: 400px; }

.login-box {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    will-change: transform;
    padding: 40px 8px 30px;
}

.box-shine {
    position: absolute;
    top: 0; left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-20deg);
    animation: shineSlide 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes shineSlide {
    0%, 55% { left: -80%; }
    100%    { left: 140%; }
}

/* ---- Back to Home ---- */
.login-topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #f8fafc;
    color: #1a2f5e;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.home-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.home-btn:hover {
    background: #1a2f5e;
    border-color: #1a2f5e;
    color: #fff;
    box-shadow: 0 8px 20px rgba(26, 47, 94, 0.25);
    transform: translateY(-2px);
}

.home-btn:hover i {
    transform: translateX(-3px);
}

/* Logo */
.login-logo { text-align: center; margin-bottom: 30px; }

.login-brand { display: flex; align-items: center; justify-content: center; gap: 14px; }

.brand-icon-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #eef3ff, #dbe7ff);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(26, 47, 94, 0.20), inset 0 -3px 8px rgba(26,47,94,0.08);
    border: 1px solid rgba(26, 47, 94, 0.12);
    animation: brandBounce 3.8s ease-in-out infinite;
}

@keyframes brandBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-5px) rotate(-3deg); }
    60% { transform: translateY(0) rotate(2deg); }
}

.brand-icon { font-size: 1.55rem; color: #1a2f5e; }

.brand-emoji {
    position: absolute;
    right: -7px;
    bottom: -7px;
    font-size: 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.login-brand h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
    color: #1a2f5e;
}

.login-brand h2 span {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.login-logo p {
    color: #6b7280;
    margin: 12px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 22px 0 0;
}

.login-divider span {
    width: 56px;
    height: 4px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1a2f5e, #3b82f6);
}

/* Alert */
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

/* Form */
.login-form .form-group { position: relative; margin-bottom: 20px; }

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

.login-form .form-group label i { color: #1a2f5e; font-size: 0.78rem; }

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

.input-wrap .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #9ca3af;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1;
}

.input-wrap input {
    width: 100%;
    padding: 14px 46px 14px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.input-wrap input::placeholder { color: #9ca3af; }

.input-wrap input:hover { border-color: #c7d2e8; }

.input-wrap input:focus {
    outline: none;
    border-color: #1a2f5e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 47, 94, 0.12);
    transform: scale(1.015);
}

.input-wrap.focus .input-icon { color: #1a2f5e; }

.toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.9rem;
    transition: all 0.3s;
    z-index: 1;
}

.toggle-pw:hover { color: #1a2f5e; background: #eef2ff; }

/* Button */
.login-btn {
    width: 100%;
    position: relative;
    padding: 15px;
    background: linear-gradient(135deg, #1a2f5e, #274a94);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    margin-top: 6px;
    box-shadow: 0 12px 30px rgba(26, 47, 94, 0.35);
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(26, 47, 94, 0.45);
}

.login-btn:hover::before { left: 120%; }

.btn-arrow { display: inline-flex; transition: transform 0.35s ease; }
.login-btn:hover .btn-arrow { transform: translateX(6px); }

.btn-spinner { display: none; font-size: 1rem; animation: spinLoader 0.8s linear infinite; }

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

.login-btn.loading .btn-arrow { display: none; }
.login-btn.loading .btn-spinner { display: inline-flex; }
.login-btn.loading { cursor: progress; opacity: 0.9; }

/* Footer */
.login-footer { margin-top: 28px; padding-top: 22px; border-top: 1px solid #eef2f7; }

.secure-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
}

.secure-badge .fa-shield-alt { color: #22c55e; font-size: 0.95rem; }

.shield-pulse {
    position: absolute;
    right: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.35);
    animation: shieldPulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes shieldPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ---- Right: visual panel ---- */
.login-visual {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 46px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(59, 130, 246, 0.22), transparent 50%),
        linear-gradient(160deg, #13284f, #0d1f45 60%, #0a1836);
    color: #fff;
    overflow: hidden;
}

.visual-orbit { position: relative; width: 240px; height: 240px; margin-bottom: 30px; }

.orbit-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 96px; height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2.6rem;
    color: #60a5fa;
    background: radial-gradient(circle at 30% 25%, rgba(59,130,246,0.25), rgba(10,25,54,0.3));
    border: 2px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.35), inset 0 0 30px rgba(59,130,246,0.2);
    animation: coreGlow 4s ease-in-out infinite;
}

@keyframes coreGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.3), inset 0 0 24px rgba(59,130,246,0.18); }
    50% { box-shadow: 0 0 70px rgba(59, 130, 246, 0.55), inset 0 0 40px rgba(59,130,246,0.3); }
}

.orbit-path {
    position: absolute;
    top: 50%; left: 50%;
    border: 1.5px solid rgba(96, 165, 250, 0.28);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-path-1 { width: 100%; height: 100%; animation: spin 16s linear infinite; }
.orbit-path-2 { width: 72%; height: 72%; animation: spin 22s linear infinite reverse; border-color: rgba(250, 204, 21, 0.22); }

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.orbit-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; }
.orbit-dot-1 { top: 11%; left: 50%; background: #fbbf24; box-shadow: 0 0 12px #fbbf24; }
.orbit-dot-2 { bottom: 16%; right: 14%; background: #38bdf8; box-shadow: 0 0 12px #38bdf8; }
.orbit-dot-3 { top: 28%; left: 10%; background: #f472b6; box-shadow: 0 0 12px #f472b6; }

.orbit-plane {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: #fbbf24;
    animation: planeOrbit 16s linear infinite;
    transform-origin: 0 130px;
}

@keyframes planeOrbit {
    0% { transform: rotate(0deg) translateX(0); }
    100% { transform: rotate(360deg); }
}

.orbit-plane i { display: block; transform: translate(-50%, -50%) rotate(20deg); }

.visual-title { font-size: 2.1rem; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.5px; }

.visual-title span {
    background: linear-gradient(135deg, #93c5fd, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-subtitle { color: rgba(255,255,255,0.78); font-size: 0.98rem; line-height: 1.7; max-width: 380px; margin: 0 0 30px; }

.visual-stats { display: flex; gap: 22px; margin-bottom: 34px; }

.stat {
    display: flex;
    align-items: center;
    gap: 11px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 12px 16px;
    backdrop-filter: blur(6px);
    transition: all 0.3s;
}

.stat:hover { transform: translateY(-3px); background: rgba(255,255,255,0.11); }

.stat-icon {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
}

.stat-meta { display: flex; flex-direction: column; text-align: left; }
.stat-meta strong { font-size: 1.05rem; font-weight: 700; color: #fff; }
.stat-meta span { font-size: 0.72rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 1px; }

.route-line { position: relative; width: 100%; max-width: 420px; margin-bottom: 28px; }
.route-line svg { width: 100%; height: auto; display: block; }

.route-path { animation: routeDash 5s linear infinite; }

@keyframes routeDash {
    to { stroke-dashoffset: -140; }
}

.route-line .plane {
    position: absolute;
    top: 34px;
    right: 14px;
    font-size: 1.1rem;
    color: #fbbf24;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    animation: routePlane 5s linear infinite;
}

@keyframes routePlane {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-280px, 45px) rotate(6deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.visual-footer {
    margin-top: auto;
    padding-top: 26px;
    color: rgba(255,255,255,0.45);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}

/* ---- Responsive ---- */
@media (max-width: 920px) {
    .login-visual { display: none; }
    .login-main { flex: 1; }
    .login-shell { max-width: 500px; min-height: 0; }
    .login-main { padding: 36px 30px; }
}

@media (max-height: 700px) {
    .login-page { padding: 16px 20px; }
    .login-shell { margin: auto; }
    .login-shell { min-height: 0; }
    .login-box { padding: 24px 8px 18px; }
    .login-logo { margin-bottom: 20px; }
    .brand-icon-wrap { width: 48px; height: 48px; }
    .login-brand h2 { font-size: 1.7rem; }
    .login-form .form-group { margin-bottom: 14px; }
    .login-footer { margin-top: 16px; padding-top: 14px; }
}

@media (max-width: 480px) {
    .login-page { padding: 14px; }
    .login-main { padding: 28px 20px; }
    .visual-stats { flex-wrap: wrap; }
    .login-shell { border-radius: 20px; }
    .login-brand { gap: 10px; }
    .brand-icon-wrap { width: 50px; height: 50px; border-radius: 15px; }
    .login-brand h2 { font-size: 1.7rem; }
    .input-wrap input { padding: 13px 44px 13px 42px; }
    .login-topbar { position: static; justify-content: flex-start; margin-bottom: 18px; }
}

@media (max-width: 360px) {
    .login-page { padding: 12px; }
    .login-main { padding: 24px 16px; }
    .home-btn { padding: 7px 11px; font-size: 0.78rem; }
    .input-wrap input { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .login-bg-orb, .lpart, .background-icon i, .brand-icon-wrap,
    .orbit-path, .orbit-plane, .route-path, .route-line .plane,
    .box-shine, .shield-pulse { animation: none !important; }
    .login-btn::before { display: none; }
}