/* ========== LOGIN MODERN STYLES ========== */

:root {
    --login-primary: #147361;
    --login-secondary: #1a9981;
    --login-accent: #3b82f6;
    --login-bg-1: #0f172a;
    --login-bg-2: #1e293b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.07);
}

#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

body.login-page {
    background: var(--login-bg-1);
    background: radial-gradient(circle at top right, #1e3a8a 0%, transparent 40%),
                radial-gradient(circle at bottom left, #147361 0%, transparent 40%),
                var(--login-bg-1);
    background-attachment: fixed;
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(20, 115, 97, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    animation: move 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; animation-delay: 0s; }
.blob-2 { bottom: -10%; right: -10%; animation-delay: -5s; width: 400px; height: 400px; }

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 10;
}

/* Animated Border Card */
.login-card {
    position: relative;
    background: transparent; /* Changed to transparent to see the animated border */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: fadeInDown 0.8s ease-out;
}

/* The Animated Border Beam - More Intense */
.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        transparent, 
        transparent, 
        var(--login-secondary), 
        var(--login-accent),
        var(--login-secondary),
        transparent
    );
    animation: rotate 4s linear infinite;
    z-index: 1; /* Changed to 1 to be above background but behind after */
}

/* Inner Overlay - This covers the center of the card */
.login-card::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 21px;
    z-index: 2; /* Changed to 2 to be above the rotating beam */
}

/* Content wrapper needed to be above the pseudo-elements */
.login-header, .custom-alert, form, .login-footer {
    position: relative;
    z-index: 10;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 20px; /* Reduced margin */
}

.login-header .icon-box {
    margin-bottom: 12px !important; /* Reduced margin */
}

.login-header h2 {
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    font-size: 26px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 0;
}

.form-group-custom {
    margin-bottom: 16px; /* Reduced margin */
}

.form-group-custom label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #64748b;
    transition: all 0.3s;
    font-size: 16px;
}

.form-control-custom {
    width: 100%;
    padding: 10px 15px 10px 45px; /* Reduced vertical padding */
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.form-control-custom:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--login-secondary);
}

/* Captcha Styling */
.captcha-container {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.captcha-box {
    background: linear-gradient(135deg, var(--login-secondary) 0%, var(--login-primary) 100%);
    color: #fff;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

/* Button Styling */
.btn-login {
    width: 100%;
    padding: 12px; /* Reduced padding */
    background: linear-gradient(135deg, var(--login-secondary) 0%, var(--login-primary) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(20, 115, 97, 0.2);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(20, 115, 97, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 20px; /* Reduced margin */
    font-size: 13px;
    color: #64748b;
}

.login-footer .mt-4 {
    margin-top: 15px !important; /* Reduced margin */
}

/* Alert Styling */
.custom-alert {
    padding: 10px 15px; /* Reduced padding */
    border-radius: 10px;
    margin-bottom: 15px; /* Reduced margin */
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }
}
