/* ==========================================================================
   Login V2 — Premium 2026 SaaS admin login for Uma Foods
   Self-contained: does not depend on admin-v2.css (this page uses its own
   standalone layout, layouts.without_login_app). Always dark by design.
   ========================================================================== */

:root {
    --login-bg: #050505;
    --login-card-bg: rgba(255, 255, 255, 0.08);
    --login-card-border: rgba(255, 255, 255, 0.12);
    --login-text: #FFFFFF;
    --login-text-muted: #9CA3AF;
    --login-primary-gradient: linear-gradient(135deg, #00d4ff, #0099ff);
    --login-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body { height: 100%; }

body {
    background: var(--login-bg) !important;
    font-family: var(--login-font);
    margin: 0;
    overflow-x: hidden;
}

.login-page-v2 {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
}

/* ambient animated glow blobs */
.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.login-glow-1 {
    width: 480px;
    height: 480px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, #0099ff, transparent 70%);
    animation: loginGlowFloat1 14s ease-in-out infinite;
}

.login-glow-2 {
    width: 520px;
    height: 520px;
    bottom: -160px;
    right: -120px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    animation: loginGlowFloat2 16s ease-in-out infinite;
}

@keyframes loginGlowFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes loginGlowFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -40px) scale(1.06); }
}

/* faint abstract grid/shape backdrop */
.login-page-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.06) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 153, 255, 0.06) 0, transparent 40%);
    z-index: 0;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    display: flex;
    align-items: center;
    gap: 64px;
}

/* ---------------------------------------------------------------------- */
/* Brand side                                                              */
/* ---------------------------------------------------------------------- */

.login-brand-side {
    flex: 1 1 420px;
    animation: loginFadeInUp 0.7s ease both;
}

.login-brand-logo {
    font-size: 70px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
}

.brand-uma {
    background: var(--login-primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-foods {
    color: #FFFFFF;
}

.login-tagline {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--login-text);
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.login-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--login-text-muted);
    max-width: 380px;
    margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Card side                                                               */
/* ---------------------------------------------------------------------- */

.login-card-side {
    flex: 1 1 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
}

.login-card {
    width: 100%;
    background: var(--login-card-bg);
    border: 1px solid var(--login-card-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 40px 36px;
    box-sizing: border-box;
    animation: loginFadeInUp 0.7s ease 0.1s both;
}

.login-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--login-text);
    margin: 0 0 8px;
}

.login-card-subtitle {
    font-size: 13.5px;
    color: var(--login-text-muted);
    margin: 0 0 28px;
}

.login-form-v2 { display: flex; flex-direction: column; gap: 18px; }

.login-field {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field i {
    position: absolute;
    left: 16px;
    color: var(--login-text-muted);
    font-size: 15px;
    transition: color 0.2s ease;
    pointer-events: none;
}

.login-field input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--login-text);
    font-size: 14px;
    padding: 0 16px 0 44px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field input::placeholder { color: rgba(255, 255, 255, 0.35); }

.login-field input:focus {
    border-color: #0099ff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 153, 255, 0.18);
}

.login-field input:focus + i,
.login-field:focus-within i {
    color: #00d4ff;
}

.login-submit-btn {
    height: 50px;
    border-radius: 14px;
    border: none;
    background: var(--login-primary-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    box-shadow: 0 10px 28px rgba(0, 153, 255, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 153, 255, 0.45);
    filter: brightness(1.08);
}

.login-submit-btn:active { transform: translateY(0); }

.login-copyright {
    margin-top: 22px;
    font-size: 12px;
    color: var(--login-text-muted);
    text-align: center;
}

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

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 900px) {
    .login-shell {
        flex-direction: column;
        gap: 36px;
        text-align: center;
    }

    .login-brand-side { display: flex; flex-direction: column; align-items: center; }
    .login-description { max-width: 100%; }
    .login-tagline { font-size: 26px; }
    .login-card-side { max-width: 440px; width: 100%; }
}

@media (max-width: 480px) {
    .login-page-v2 { padding: 16px; }
    .login-card { padding: 30px 22px; border-radius: 20px; }
    .login-brand-logo { font-size: 24px; }
    .login-tagline { font-size: 21px; }
    .login-description { font-size: 13.5px; }
}

/* ---------------------------------------------------------------------- */
/* Login processing loader — full-page centered overlay.                   */
/* Lives as the last node in the page (sibling after .login-page-v2, not   */
/* nested inside the form/card), and toggled via .css('display','flex')    */
/* rather than jQuery's .show() — jQuery's show() restores the tag's       */
/* browser-default display ("block" for a div, sniffed from a blank        */
/* iframe with no author styles), so it can never re-apply a "flex"        */
/* display coming from this stylesheet. That mismatch was why the loader   */
/* previously collapsed to an unpositioned, top-left, non-centered box.    */
/* ---------------------------------------------------------------------- */
.login-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999999;
}

.login-loader-box {
    min-width: 260px;
    padding: 35px;
    text-align: center;
    border-radius: 20px;
    background: #050505;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-loader-box .login-loader-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--login-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 0 0 8px rgba(0, 153, 255, 0.14);
    animation: loginLoaderPulse 1.4s ease-in-out infinite;
}

.login-loader-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
}

.login-loader-box p {
    margin: 4px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #A1A1AA;
}

.login-loader-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
}

.login-loader-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00d4ff;
    animation: loginLoaderDot 1.2s ease-in-out infinite;
}

.login-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.login-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

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

@keyframes loginLoaderDot {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-4px); }
}

@media (max-width: 480px) {
    .login-loader-box { padding: 22px 20px; min-width: 0; width: 85%; }
    .login-loader-box .login-loader-icon { width: 48px; height: 48px; font-size: 20px; margin-bottom: 12px; }
    .login-loader-box h3 { font-size: 14px; white-space: normal; }
}
