:root {
    --primary-red: #dc2626;
    --secondary-red: #ef4444;
    --dark-red: #b91c1c;
    --light-red: #fef2f2;
    --primary-black: #1f1f1f;
    --secondary-black: #374151;
    --light-gray: #f8fafc;
    --border-gray: #e5e7eb;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 50%, var(--primary-black) 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background Animation */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.8;
    }
}

body {
    overflow-y: auto;
}
/* Main Container */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    padding: 40px 30px;
    width: 100%;
    max-width: 430px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: auto;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-hmg {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--secondary-black);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.4);
    position: relative;
}

.logo-container::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.logo-icon {
    color: white;
    font-size: 45px;
}

.brand-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-black);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.brand-subtitle {
    color: var(--secondary-black);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
}

/* Form Styles */
.form-floating {
    margin-bottom: 25px;
}

.form-control {
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 18px 15px 8px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.3s ease;
    height: auto;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
    background: white;
}

.form-floating > label {
    color: var(--secondary-black);
    font-weight: 500;
    padding-left: 15px;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group-text {
    background: var(--light-gray);
    border: 2px solid var(--border-gray);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 12px 15px;
    color: var(--secondary-black);
}

.form-control:focus,
.input-group-text:focus-within,
.password-toggle:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
    background: white;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-red);
    background: white;
}

.input-group:focus-within .form-control {
    border-color: var(--primary-red);
}

.input-group:focus-within .password-toggle {
    border-color: var(--primary-red);
}

.password-toggle {
    background: var(--light-gray);
    border: 2px solid var(--border-gray);
    border-left: none;
    color: var(--secondary-black);
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-red);
}

/* Remember Me */
.form-check {
    margin: 25px 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-gray);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.form-check-label {
    color: var(--secondary-black);
    font-weight: 500;
    margin-left: 8px;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-weight: 700;
    font-size: 16px;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(220, 38, 38, 0.4);
    color: white;
}

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

.btn-login .loading {
    display: none;
}

.btn-login.loading .normal-text {
    display: none;
}

.btn-login.loading .loading {
    display: inline-flex;
    align-items: center;
}

.spinner-border-sm {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

/* Footer Links */
.login-footer {
    text-align: center;
    margin-top: 30px;
}

.forgot-password {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-danger {
    background: var(--light-red);
    color: var(--dark-red);
    border-left: 4px solid var(--primary-red);
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid #22c55e;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-card {
        margin: 10px;
        padding: 35px 25px;
    }

    .logo-container {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .logo-container::after {
        width: 100px;
        height: 100px;
    }

    .logo-icon {
        font-size: 35px;
    }

    .brand-name {
        font-size: 28px;
    }

    .form-control {
        padding: 16px 15px 6px;
    }

    .btn-login {
        padding: 16px;
        font-size: 15px;
    }
}

/* Accessibility */
.form-control:focus {
    outline: none;
}

.btn-login:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Congo Flag Colors Integration */
.congo-accent {
    background: linear-gradient(90deg, #002266 0%, #ffcd00 50%, #cc0000 100%);
    height: 3px;
    width: 60px;
    margin: 15px auto;
    border-radius: 2px;
}