/* Login Page Styles - Alpha Project */
/* Primary: #072890 | Secondary: #000 */

::selection {
    color: #ffffff;
    background-color: var(--app-primary, #072890);
}

* {
    padding: 0;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    text-decoration: none;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(7, 40, 144, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(7, 40, 144, 0.05) 0%, transparent 40%);
    animation: pulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* Login Container */
.login_form {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

/* Green accent line at top */
.login_form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #072890, #5fc40a);
    border-radius: 0 0 4px 4px;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 36px;
}

.brand-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.brand-icon svg {
    filter: drop-shadow(0 4px 12px rgba(7, 40, 144, 0.3));
    transition: transform 0.3s ease;
}

.brand-icon svg:hover {
    transform: scale(1.05);
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 15px;
    color: #6c757d;
    font-weight: 400;
}

/* Input focus animation */
.input_box.focused label {
    color: #072890;
}

/* Optgroup styling */
.input_box select optgroup {
    font-weight: 600;
    color: #000000;
    background-color: #f8f9fa;
}

.input_box select option {
    padding: 8px;
    font-weight: 400;
}

/* Input Boxes */
.input_box {
    margin-bottom: 24px;
}

.input_box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input_box input,
.input_box select {
    width: 100%;
    height: 52px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    color: #000000;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.input_box input::placeholder {
    color: #adb5bd;
}

.input_box input:focus,
.input_box select:focus {
    border-color: #072890;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(7, 40, 144, 0.1);
}

.input_box select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Password Field */
.password_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.password_title label {
    margin-bottom: 0;
}

.password_title a {
    font-size: 13px;
    color: #072890;
    font-weight: 500;
    transition: color 0.2s ease;
}

.password_title a:hover {
    color: #051c66;
    text-decoration: underline;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: color 0.2s ease;
    width: auto;
    height: auto;
}

.toggle-password:hover {
    color: #072890;
    background: none;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Submit Button */
button.authenticate,
button[type="submit"].authenticate {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #072890 0%, #051c66 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
}

button.authenticate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

button.authenticate:hover {
    background: linear-gradient(135deg, #5fc40a 0%, #072890 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(7, 40, 144, 0.3);
}

button.authenticate:hover::before {
    left: 100%;
}

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

button.authenticate .action.fa-sync {
    animation: spin 1s linear infinite;
}

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

/* Sign Up Link */
.sign_up {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 24px;
}

.sign_up a {
    color: #072890;
    font-weight: 600;
    transition: color 0.2s ease;
}

.sign_up a:hover {
    color: #051c66;
    text-decoration: underline;
}

/* Select2 Override for Account Type */
.select2-container--default .select2-selection--single {
    height: 52px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background-color: #f8f9fa;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 48px;
    padding-left: 16px;
    color: #000000;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px;
    right: 12px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #072890;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(7, 40, 144, 0.1);
}

.select2-dropdown {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #072890;
}

/* Responsive */
@media (max-width: 480px) {
    .login_form {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .form-title {
        font-size: 24px;
    }

    .input_box input,
    .input_box select {
        height: 48px;
    }

    button.authenticate {
        height: 50px;
    }
}

/* Dark scrollbar for body */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #072890;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5fc40a;
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

footer a {
    color: #072890;
}
