/*
 * Standalone "aurora" background + glass login card for csp_login.jsp only.
 * Loaded exclusively by that page, so every rule here (including the
 * .header-main-banner / .main-sidebar overrides near the bottom, which
 * reach outside .vt-login-page) is scoped in practice by inclusion, not by
 * selector - this file is never linked from any other page.
 *
 * Palette/animations are adapted from https://ventura.fscx.my/ (the brand's
 * own "coming soon" splash) so the login page reads as the same product,
 * retinted so the venturaV1 app theme's accent (a warm tan/gold, #E7B789
 * base - see --vt-accent-* in theme.css) leads instead of the splash page's
 * blue or this file's own earlier purple.
 */

.vt-login-page {
    --vt-lp-primary: #D9A470;
    --vt-lp-primary-dark: #9C6329;
    --vt-lp-accent: #E7B789;
    --vt-lp-cyan: #06B6D4;
    --vt-lp-pink: #EC4899;
    --vt-lp-blue: #2563EB;
    --vt-lp-dark: #0F172A;
    --vt-lp-darker: #020617;
    --vt-lp-white: #FFFFFF;
    --vt-lp-gray: #64748B;
    --vt-lp-light-gray: #94A3B8;

    position: fixed;
    inset: 0;
    z-index: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: safe center;
    justify-content: safe center;
    background: var(--vt-lp-darker);
    color: var(--vt-lp-white);
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* This page owns the whole viewport - the legacy AdminLTE chrome (logo
   banner, collapsed sidebar, empty footer bar) that csp_layout.jsp always
   renders around the body tile would otherwise sit behind/around this as
   a mismatched light bar. Hiding it here is safe precisely because this
   stylesheet is only ever loaded on this one page. */
html, body {
    background: var(--vt-lp-darker) !important;
}

.header-main-banner,
.main-sidebar,
#sidebar-overlay,
.main-footer {
    display: none !important;
}

.wrapper {
    min-height: 0 !important;
    background: transparent !important;
}

/* ---------- Atmosphere ---------- */

.vt-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.vt-aurora-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: linear-gradient(45deg, transparent 40%, rgba(217, 164, 112, 0.05) 45%, rgba(231, 183, 137, 0.06) 50%, rgba(6, 182, 212, 0.03) 55%, transparent 60%);
    animation: vtLpAuroraMove 15s ease-in-out infinite;
}

.vt-aurora-layer:nth-child(2) {
    animation-delay: -5s;
    animation-duration: 20s;
    background: linear-gradient(-45deg, transparent 40%, rgba(236, 72, 153, 0.03) 45%, rgba(217, 164, 112, 0.05) 50%, rgba(231, 183, 137, 0.03) 55%, transparent 60%);
}

@keyframes vtLpAuroraMove {
    0%, 100% { transform: translateX(-20%) translateY(-20%) rotate(0deg); }
    50% { transform: translateX(20%) translateY(20%) rotate(180deg); }
}

.vt-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: vtLpGridMove 30s linear infinite;
}

@keyframes vtLpGridMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.vt-bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
    z-index: -1;
}

.vt-bg-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--vt-lp-primary);
    top: -250px;
    right: -200px;
    animation: vtLpFloat1 12s ease-in-out infinite;
}

.vt-bg-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--vt-lp-accent);
    bottom: -200px;
    left: -200px;
    animation: vtLpFloat2 15s ease-in-out infinite;
}

.vt-bg-orb-3 {
    width: 400px;
    height: 400px;
    background: var(--vt-lp-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.18;
    animation: vtLpFloat3 18s ease-in-out infinite;
}

@keyframes vtLpFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-80px, 80px) scale(1.2); }
    50% { transform: translate(-40px, 150px) scale(0.9); }
    75% { transform: translate(50px, 80px) scale(1.1); }
}

@keyframes vtLpFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -60px) scale(1.15); }
    50% { transform: translate(60px, -120px) scale(0.9); }
    75% { transform: translate(-30px, -60px) scale(1.1); }
}

@keyframes vtLpFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    33% { transform: translate(-30%, -80%) scale(1.3); opacity: 0.22; }
    66% { transform: translate(-70%, -20%) scale(0.7); opacity: 0.1; }
}

.vt-floating-icons {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.vt-ficon {
    position: absolute;
    font-size: 22px;
    font-weight: 600;
    color: var(--vt-lp-white);
    opacity: 0.08;
    animation: vtLpIconFloat 20s ease-in-out infinite;
}

@keyframes vtLpIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.vt-ficon-1 { top: 12%; left: 8%; animation-duration: 16s; }
.vt-ficon-2 { top: 22%; left: 85%; animation-duration: 19s; animation-delay: -4s; }
.vt-ficon-3 { top: 68%; left: 6%; animation-duration: 22s; animation-delay: -8s; }
.vt-ficon-4 { top: 78%; left: 90%; animation-duration: 17s; animation-delay: -2s; }
.vt-ficon-5 { top: 8%; left: 45%; animation-duration: 24s; animation-delay: -11s; }
.vt-ficon-6 { top: 45%; left: 92%; animation-duration: 21s; animation-delay: -6s; }
.vt-ficon-7 { top: 88%; left: 45%; animation-duration: 18s; animation-delay: -14s; }
.vt-ficon-8 { top: 35%; left: 3%; animation-duration: 23s; animation-delay: -9s; }
.vt-ficon-9 { top: 5%; left: 70%; animation-duration: 20s; animation-delay: -3s; }
.vt-ficon-10 { top: 60%; left: 50%; animation-duration: 25s; animation-delay: -17s; }
.vt-ficon-11 { top: 30%; left: 60%; animation-duration: 19s; animation-delay: -7s; }
.vt-ficon-12 { top: 90%; left: 20%; animation-duration: 22s; animation-delay: -12s; }

/* ---------- Content ---------- */

.vt-login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 40px 20px;
    text-align: center;
}

.vt-alert {
    display: block;
    text-align: left;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #FCA5A5;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}

.vt-alert p {
    margin: 0;
}

/* Login's own alert only ever shows failures (red by default above). The
   forgot-password flow needs a positive state too ("check your email"),
   applied as a modifier rather than a new component so it inherits the same
   shape/spacing. Green matches the app's own dark-mode success token
   (--vt-success: #4ADE80 in theme.css) for consistency. */
.vt-alert--success {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #4ADE80;
}

.vt-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(217, 164, 112, 0.12);
    color: var(--vt-lp-accent);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
}

.vt-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--vt-lp-accent);
    border-radius: 50%;
    margin-right: 9px;
    box-shadow: 0 0 10px var(--vt-lp-accent);
    animation: vtLpDotPulse 2s ease-in-out infinite;
}

@keyframes vtLpDotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--vt-lp-accent); }
    50% { transform: scale(1.3); box-shadow: 0 0 20px var(--vt-lp-accent), 0 0 40px var(--vt-lp-accent); }
}

.vt-logo {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 10px;
}

.vt-logo-text {
    background: linear-gradient(135deg, var(--vt-lp-primary), var(--vt-lp-accent), var(--vt-lp-cyan), var(--vt-lp-pink), var(--vt-lp-primary));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: vtLpGradientShift 8s ease infinite;
}

@keyframes vtLpGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.vt-tagline {
    font-size: 15px;
    color: var(--vt-lp-light-gray);
    font-weight: 400;
    margin: 0 0 22px;
}

.vt-divider {
    width: 70px;
    height: 3px;
    margin: 0 auto 30px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--vt-lp-primary), var(--vt-lp-accent), var(--vt-lp-cyan));
    background-size: 200% 100%;
    animation: vtLpDividerShift 3s ease infinite;
}

@keyframes vtLpDividerShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.vt-login-card {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.vt-field {
    margin-bottom: 18px;
}

.vt-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--vt-lp-light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.vt-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vt-input-icon {
    position: absolute;
    left: 14px;
    color: var(--vt-lp-gray);
    font-size: 14px;
    pointer-events: none;
}

.vt-input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    padding: 0 14px 0 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--vt-lp-white);
    font-size: 14px;
}

.vt-input::placeholder {
    color: var(--vt-lp-gray);
}

.vt-input:focus {
    outline: none;
    border-color: var(--vt-lp-accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(231, 183, 137, 0.18);
}

.vt-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.vt-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--vt-lp-light-gray);
    cursor: pointer;
    user-select: none;
}

.vt-checkbox input {
    width: 15px;
    height: 15px;
    accent-color: var(--vt-lp-accent);
    cursor: pointer;
}

.vt-link {
    font-size: 13px;
    color: var(--vt-lp-light-gray);
    text-decoration: none;
}

.vt-link:hover {
    color: var(--vt-lp-accent);
    text-decoration: underline;
}

.vt-submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--vt-lp-primary), var(--vt-lp-primary-dark));
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(217, 164, 112, 0.35);
}

.vt-submit:hover {
    background: linear-gradient(135deg, var(--vt-lp-primary-dark), var(--vt-lp-primary));
}

.vt-footer {
    margin-top: 26px;
    font-size: 12px;
    color: var(--vt-lp-gray);
    line-height: 1.8;
}

@media (max-width: 480px) {
    .vt-logo { font-size: 34px; }
    .vt-tagline { font-size: 13px; }
    .vt-login-card { padding: 26px 20px; }
    .vt-bg-orb { opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
    .vt-aurora-layer,
    .vt-grid-overlay,
    .vt-bg-orb,
    .vt-ficon,
    .vt-dot,
    .vt-logo-text,
    .vt-divider {
        animation: none !important;
    }
}
