/* ==========================================================================
   CSS CHO MÀN HÌNH ĐĂNG NHẬP PRO - HỘI CỰU CHIẾN BINH PHƯỜNG BẮC NHA TRANG
   Phong cách: Quân đội Uy Nghiêm, Sang Trọng, Ánh Kim Vàng (Gold Luxury)
   ========================================================================== */

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

:root {
    --gold-1: #fef08a;
    --gold-2: #eab308;
    --gold-3: #ca8a04;
    --gold-4: #854d0e;
    --army-dark: #071a10;
    --army-deep: #0e2e1c;
    --army-green: #1b4d2e;
    --army-light: #2d6a4f;
    --red-flag: #b91c1c;
    --red-dark: #7f1d1d;
    --glass-bg: rgba(10, 29, 18, 0.78);
    --glass-border: rgba(234, 179, 8, 0.35);
}

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

body.login-page {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 20%, #1c5232 0%, #0d2818 45%, #05140b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
    color: #f8fafc;
}

/* Background Effects */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
}

.bg-glow-orb-1 {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.18) 0%, rgba(27, 77, 46, 0.05) 70%, transparent 100%);
    filter: blur(60px);
    animation: orbPulse 8s infinite ease-in-out alternate;
}

.bg-glow-orb-2 {
    position: absolute;
    bottom: -15%;
    right: 10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.12) 0%, transparent 70%);
    filter: blur(80px);
}

@keyframes orbPulse {
    0% { transform: translateX(-50%) scale(0.9); opacity: 0.7; }
    100% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

/* Login Card Container */
.login-card-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card {
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(234, 179, 8, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b91c1c, #eab308, #16a34a, #eab308, #b91c1c);
    background-size: 300% 100%;
    animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Header & Logo */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.35) 0%, transparent 70%);
    animation: ringRotate 10s linear infinite;
    filter: blur(6px);
}

@keyframes ringRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.08); }
    100% { transform: rotate(360deg) scale(1); }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 16px rgba(234, 179, 8, 0.65));
    transition: transform 0.4s ease;
}

.logo-img:hover {
    transform: scale(1.06);
}

.national-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-1);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.sub-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 900;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.motto-banner {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(185, 28, 28, 0.3);
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-1);
    letter-spacing: 0.5px;
    font-style: italic;
}

/* Form Styles */
.form-title {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.form-title::before, .form-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: rgba(234, 179, 8, 0.25);
}

.form-title::before { left: 0; }
.form-title::after { right: 0; }

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.login-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .input-icon {
    position: absolute;
    left: 16px;
    color: #eab308;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    background: rgba(7, 26, 16, 0.85);
    border: 1.5px solid rgba(234, 179, 8, 0.3);
    border-radius: 12px;
    padding: 13px 46px 13px 44px;
    color: #ffffff;
    font-size: 14.5px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-form input:focus {
    outline: none;
    border-color: var(--gold-2);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25), 0 0 15px rgba(234, 179, 8, 0.2);
    background: rgba(7, 26, 16, 0.98);
}

.login-form input:focus + .input-icon,
.login-form .input-wrapper:focus-within .input-icon {
    color: #fef08a;
    transform: scale(1.1);
}

.toggle-pwd {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 15px;
    transition: color 0.2s;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #cbd5e1;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    accent-color: #16a34a;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-login-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #15803d 0%, #166534 50%, #14532d 100%);
    border: 1.5px solid var(--gold-2);
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(21, 128, 61, 0.5), 0 0 15px rgba(234, 179, 8, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 12px 25px -4px rgba(21, 128, 61, 0.7), 0 0 25px rgba(234, 179, 8, 0.5);
    transform: translateY(-2px);
}

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

/* Quick Demo Selector */
.demo-accounts-card {
    margin-top: 24px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(234, 179, 8, 0.4);
    border-radius: 14px;
    padding: 14px 16px;
}

.demo-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.btn-demo-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e2e8f0;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.btn-demo-chip strong {
    color: #4ade80;
    font-size: 12px;
    margin-bottom: 2px;
}

.btn-demo-chip span {
    color: #94a3b8;
    font-size: 10.5px;
    font-family: monospace;
}

.btn-demo-chip:hover {
    background: rgba(234, 179, 8, 0.15);
    border-color: var(--gold-2);
    transform: translateY(-1px);
}

/* Alert Boxes */
.login-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.4s ease;
}

.alert-err {
    background: rgba(185, 28, 28, 0.35);
    border: 1px solid #ef4444;
    color: #fecaca;
}

.alert-succ {
    background: rgba(22, 101, 52, 0.35);
    border: 1px solid #22c55e;
    color: #bbf7d0;
}

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

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.5;
}

.login-footer span {
    color: var(--gold-3);
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .demo-grid {
        grid-template-columns: 1fr;
    }
    .national-title {
        font-size: 13.5px;
    }
    .sub-title {
        font-size: 15px;
    }
}
