/**
 * ============================================================================
 * GGV System — Login Page Stylesheet (Mapped for auth.php and login.php)
 * ============================================================================
 * Full-screen animated gradient background with glassmorphism login card.
 * Floating particles, glowing accents, and premium feel.
 * ============================================================================
 */

/* ──────────────────────────────────────────────
   Page Reset & General Defaults
   ────────────────────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-color: #0F172A;
    color: #F1F5F9;
    overflow-x: hidden;
}

/* ──────────────────────────────────────────────
   Animated Gradient Background & Backdrop Orbs
   ────────────────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    position: relative;
}

.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        #0F172A,
        #103E30,
        #15533E,
        #1E293B,
        #0F172A,
        #126345,
        #103E30,
        #0F172A
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 100% 50%; }
    50%  { background-position: 100% 100%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.auth-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(21, 150, 106, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 150, 106, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.8;
}

/* Glowing Background Orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.6;
}

.auth-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(21, 150, 106, 0.15);
    top: -100px;
    right: -100px;
    animation: orbPulse 8s ease-in-out infinite;
}

.auth-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(52, 185, 133, 0.12);
    bottom: -80px;
    left: -80px;
    animation: orbPulse 10s ease-in-out infinite 2s;
}

.auth-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(6, 182, 212, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbPulseCenter 12s ease-in-out infinite 4s;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%      { transform: scale(1.25); opacity: 0.35; }
}

@keyframes orbPulseCenter {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50%      { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
}

/* ──────────────────────────────────────────────
   Wrapper and Layout Container
   ────────────────────────────────────────────── */
.auth-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px 20px 20px;
    box-sizing: border-box;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.auth-footer {
    text-align: center;
    padding: 20px 0 10px 0;
    font-size: 13px;
    color: #64748B;
    pointer-events: auto;
}

.auth-footer p {
    margin: 0;
}

/* ──────────────────────────────────────────────
   Login Card (Glassmorphism)
   ────────────────────────────────────────────── */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(21, 150, 106, 0.2);
    border-radius: 24px;
    padding: 44px 38px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        0 0 100px rgba(21, 150, 106, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card shimmer edge */
.login-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(21, 150, 106, 0.45),
        rgba(52, 185, 133, 0.45),
        transparent
    );
}

/* ──────────────────────────────────────────────
   Branding Header
   ────────────────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.login-logo-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #15966A, #34B985);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #FFFFFF;
    box-shadow:
        0 8px 25px rgba(21, 150, 106, 0.3),
        0 0 40px rgba(21, 150, 106, 0.1);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        box-shadow:
            0 8px 25px rgba(21, 150, 106, 0.3),
            0 0 40px rgba(21, 150, 106, 0.1);
    }
    50% {
        box-shadow:
            0 8px 35px rgba(21, 150, 106, 0.55),
            0 0 60px rgba(21, 150, 106, 0.25);
    }
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #F8FAFC;
    letter-spacing: -0.5px;
    margin: 0 0 6px 0;
}

.login-subtitle {
    font-size: 13.5px;
    color: #94A3B8;
    margin: 0;
}

/* ──────────────────────────────────────────────
   Form Elements
   ────────────────────────────────────────────── */
.login-form .form-group {
    margin-bottom: 22px;
    position: relative;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8;
    margin-bottom: 8px;
}

.login-form .form-label i {
    color: #15966A;
}

/* Custom Input Group styling */
.input-group {
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-group:focus-within {
    border-color: #15966A;
    box-shadow: 0 0 0 3px rgba(21, 150, 106, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

.input-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    color: #64748B;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-group:focus-within .input-prefix {
    color: #15966A;
}

.form-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: none;
    background: transparent;
    padding: 0 16px;
    color: #F8FAFC;
    font-size: 14.5px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
}

.form-input::placeholder {
    color: #475569;
}

/* Password suffix toggle btn */
.input-suffix-btn {
    background: none;
    border: none;
    color: #64748B;
    font-size: 16px;
    cursor: pointer;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.input-suffix-btn:hover {
    color: #94A3B8;
}

.input-group:focus-within .input-suffix-btn {
    color: #94A3B8;
}

.input-group:focus-within .input-suffix-btn:hover {
    color: #F8FAFC;
}

.form-error {
    font-size: 12px;
    color: #EF4444;
    margin-top: 6px;
    display: none; /* Controlled via JS */
}

/* ──────────────────────────────────────────────
   Remember Me custom checkbox
   ────────────────────────────────────────────── */
.form-check-group {
    margin-top: 16px;
    margin-bottom: 26px;
}

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: rgba(15, 23, 42, 0.5);
    border: 2px solid #475569;
    border-radius: 5px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: #15966A;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #15966A;
    border-color: #15966A;
    box-shadow: 0 0 8px rgba(21, 150, 106, 0.4);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.custom-checkbox .checkmark::after {
    left: 4.5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.check-label {
    font-size: 13.5px;
    color: #94A3B8;
    transition: color 0.2s ease;
}

.custom-checkbox:hover .check-label {
    color: #F1F5F9;
}

/* ──────────────────────────────────────────────
   Submit Button
   ────────────────────────────────────────────── */
.btn-login {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #15966A, #34B985);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(21, 150, 106, 0.25);
    box-sizing: border-box;
}

.btn-login:hover {
    background: linear-gradient(135deg, #087F5B, #16835F);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 150, 106, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Shimmer Effect */
.btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-login:hover::after {
    left: 100%;
}

.btn-login-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Three dots bouncing spinner */
.spinner-dots {
    display: inline-flex;
    gap: 4px;
}

.spinner-dots span {
    width: 6px;
    height: 6px;
    background-color: #FFFFFF;
    border-radius: 50%;
    display: inline-block;
    animation: bounceDots 1.4s infinite ease-in-out both;
}

.spinner-dots span:nth-child(1) { animation-delay: -0.32s; }
.spinner-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceDots {
    0%, 80%, 100% { transform: scale(0); }
    40%           { transform: scale(1.0); }
}

/* ──────────────────────────────────────────────
   Card Footer
   ────────────────────────────────────────────── */
.login-footer {
    margin-top: 28px;
    text-align: center;
}

.login-help {
    font-size: 13px;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.login-help i {
    color: #15966A;
}

.auth-inline-link {
    color: #6ED9AB;
    font-size: 13.5px;
    text-decoration: none;
}
.auth-inline-link:hover,
.login-help a {
    color: #A7EACB;
    text-decoration: none;
}
.auth-alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.auth-alert.success {
    color: #BBF7D0;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}
.auth-alert.danger {
    color: #FECACA;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}
.support-textarea {
    min-height: 100px;
    resize: vertical;
    padding-top: 12px;
}
.mt-10 { margin-top: 10px !important; }

/* ──────────────────────────────────────────────
   Responsive Styles
   ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .login-logo-icon {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }

    .login-title {
        font-size: 21px;
    }

    .btn-login {
        height: 46px;
        font-size: 14.5px;
    }

    .form-input {
        height: 46px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 28px 18px;
    }
}
/* GGV authentication: responsive two-panel workspace entrance. */
.auth-body{background:#edf5ef;color:#173c2e;min-height:100dvh;height:auto}
.auth-bg{background:radial-gradient(ellipse at 15% 20%,#d5ebdc,transparent 55%),#edf5ef}
.auth-bg-gradient,.auth-bg-pattern,.auth-orb{display:none}
.auth-wrapper{min-height:100dvh;padding:40px 24px;display:flex;flex-direction:column;justify-content:center}
.auth-container{max-width:1040px;width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;background:#fff;border:1px solid #dbe8df;border-radius:28px;overflow:hidden;box-shadow:0 24px 80px #153d2412}
.auth-story{padding:54px 44px;background:linear-gradient(145deg,#103f2d,#176b49);color:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:56px;position:relative;overflow:hidden}
.auth-story:after{content:'';position:absolute;width:320px;height:320px;border:1px solid #ffffff14;border-radius:50%;right:-180px;bottom:-100px;box-shadow:0 0 0 45px #ffffff05,0 0 0 90px #ffffff04;pointer-events:none}
.auth-wordmark{font-size:28px;font-weight:800;letter-spacing:2px;display:flex;align-items:center;gap:12px}
.auth-wordmark i{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#ffffff15;font-size:24px}
.auth-eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:#b4e9cc;margin-bottom:16px}
.auth-story h2{font-size:42px;line-height:1.15;letter-spacing:-1.5px;font-weight:600;margin:0 0 22px}
.auth-story p{color:#d1e8db;font-size:14px;line-height:1.8;max-width:320px}
.auth-story-note{display:flex;gap:12px;align-items:center;font-size:12px;color:#d1e8db}
.login-card{max-width:none;border:0;border-radius:0;background:#fff;box-shadow:none;backdrop-filter:none;padding:52px 44px;animation:none;color:#173c2e}
.login-card:before{display:none}.login-header{text-align:left;margin-bottom:32px}.login-logo{justify-content:flex-start;margin-bottom:22px}.login-logo-icon{background:#e8f5ee;color:#087f5b;box-shadow:none;animation:none;width:48px;height:48px;border-radius:14px}
.login-title{color:#173c2e;font-size:28px;letter-spacing:-.8px}.login-subtitle{color:#64786c;font-size:13px;line-height:1.7;margin-top:8px}
.login-form .form-label{color:#314c3e;font-size:13px}.form-input{background:#f7faf8;border-color:#d9e5dd;color:#173c2e;font-size:16px;border-radius:10px;height:52px}.form-input::placeholder{color:#788b80}.form-input:focus{background:#fff;border-color:#087f5b;box-shadow:0 0 0 3px #087f5b18}
.input-prefix,.input-suffix-btn{color:#64786c}.input-suffix-btn:hover{color:#087f5b}.check-label{color:#52685a}.checkmark{background:#fff;border-color:#a6baac}.auth-inline-link,.login-help a{color:#087f5b}.auth-inline-link:hover{color:#064e3b;text-decoration:underline}
.btn-login{background:#087f5b;border-radius:10px;height:52px;box-shadow:0 6px 14px #087f5b18}.btn-login:hover{background:#066449;box-shadow:0 8px 18px #087f5b25;transform:none}.btn-login:before{display:none}
.login-footer{padding-top:24px;border-top:1px solid #e7eee9}.login-help{color:#64786c;font-size:12px;line-height:1.7}.auth-footer{color:#64786c;font-size:12px;padding-top:22px}.auth-alert.success{color:#065f46;background:#e9f7ef}.auth-alert.danger{color:#b42318;background:#fff0ee}.btn-pwa-install{color:#087f5b!important;background:#edf8f1!important;border-color:#b4d9c2!important;border-radius:10px!important;min-height:44px}
.auth-body :focus-visible{outline:3px solid #34b985;outline-offset:3px}.form-check-group{gap:12px;flex-wrap:wrap}
@media(max-width:760px){.auth-wrapper{padding:24px 16px}.auth-container{max-width:480px;grid-template-columns:minmax(0,1fr);border-radius:20px}.auth-story{padding:24px 28px;gap:22px}.auth-story h2{font-size:27px;margin-bottom:0;letter-spacing:-.7px}.auth-story .auth-eyebrow,.auth-story p,.auth-story-note{display:none}.auth-wordmark{font-size:22px}.login-card{padding:30px 28px}.login-logo{display:none}.login-title{font-size:25px}.login-header{margin-bottom:26px}}
@media(max-width:360px){.auth-wrapper{padding:12px}.auth-story,.login-card{padding:24px 20px}.auth-inline-link{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html:has(.auth-body){background:#edf5ef;height:auto}.auth-body{height:auto}.input-group,.input-group:focus-within{background:#f7faf8;border-color:#d9e5dd}.input-group:focus-within{border-color:#087f5b;box-shadow:0 0 0 3px #087f5b18}.input-group .form-input,.input-group .form-input:focus{background:transparent;box-shadow:none;outline:none}.input-suffix-btn{min-height:48px}.input-group:focus-within .input-suffix-btn:hover{color:#087f5b}

.auth-company-logo{width:64px;height:64px;object-fit:contain;background:#fff;padding:5px;border-radius:12px}

/* Allow auth panels to shrink below their form controls' intrinsic width. */
.auth-container > .auth-story,
.auth-container > .login-card { min-width: 0; }
