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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2c5530 0%, #1a3d1f 50%, #0f2612 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Elements */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    z-index: 1;
}

.map-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../assets/images/login-bg.png') no-repeat center;
    background-size: cover;
    opacity: 0.4;
}

/* Government Header */
.gov-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #2c5530;
    color: white;
    padding: 8px 20px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.gov-header .left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gov-flag {
    width: 20px;
    height: 15px;
    background: url('../../assets/images/flag.png') no-repeat center;
    background-size: cover;
    border-radius: 2px;
}

.language-selector {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Animation Keyframes */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Main Container */
.login-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    animation: fadeInScale 0.8s ease-out;
}

/* Logo Section */
.login-logo {
    text-align: center;
}

.login-logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1px;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.login-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    text-align: center;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 50px 12px 16px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #FFC80F;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 200, 15, 0.3);
    color: #ffffff;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Password Toggle */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 200, 15, 0.2);
    border: 1px solid rgba(255, 200, 15, 0.4);
    border-radius: 6px;
    color: #FFC80F;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 6px 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}

.password-toggle:hover {
    background: rgba(255, 200, 15, 0.3);
    border-color: #FFC80F;
    color: #ffffff;
}

/* Remember Me */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #FFC80F;
}

.checkbox-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    cursor: pointer;
}

.forgot-link {
    color: #FFC80F;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-align: center;
    display: block;
    margin: 15px 0;
}

.forgot-link:hover {
    color: #ffb300;
}

/* Login Button */
.login-button {
    background: linear-gradient(135deg, #FFC80F 0%, #ffb300 100%);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background: linear-gradient(135deg, #ffb300 0%, #FFC80F 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 200, 15, 0.3);
}

/* Button Container */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Register Button */
.register-button {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 2px solid #ffc709;
    color: #ffc709;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.register-button:hover {
    background: #ffc709;
    color: #2c5530;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 199, 9, 0.3);
}

.register-button:active {
    transform: translateY(0);
}

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

/* Error/Success Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #6bcf7f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
        margin-top: 80px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .back-home {
        position: static;
        margin: 20px;
        margin-top: 80px;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-button {
    background: #666;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-button.loading {
    background: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.7);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    animation: slideInUp 0.3s ease-out;
    backdrop-filter: blur(3px);
}

.error-message::before {
    content: "⚠️";
    margin-right: 8px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Government Info Popup */
.gov-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.gov-popup {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: #4a6fa5;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: none;
}

.gov-popup-header {
    background: #3d5a91;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gov-popup-header-icon {
    font-size: 14px;
    line-height: 1;
}

.gov-popup-header-text {
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.gov-popup-content {
    padding: 0;
    display: flex;
}

.gov-info-section {
    flex: 1;
    padding: 20px;
    color: white;
}

.gov-info-section:first-child {
    background: #4a6fa5;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.gov-info-section:last-child {
    background: #5a7fb5;
}

.gov-info-icon {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 8px;
}

.gov-info-title {
    color: white;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
}

.gov-info-text {
    color: white;
    font-size: 11px;
    line-height: 1.3;
}

.gov-domain {
    color: #ffc709;
    font-weight: bold;
}

@media (max-width: 768px) {
    .gov-popup {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform: none;
        top: 50px;
    }

    .gov-popup-content {
        flex-direction: column;
    }
}