/* ===================================================
   Techlink - Premium Login Modal Styles (Clean & Aligned)
   =================================================== */

.login-modal-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    padding: 1.25rem;
    box-sizing: border-box;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal-card {
    background: linear-gradient(160deg, #0f1f3b 0%, #162c4a 60%, #263c4e 90%, #81888b 100%);
    border: 1px solid rgba(9, 107, 169, 0.35);
    border-radius: 18px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(9, 107, 169, 0.2);
    width: 100%;
    max-width: 440px;
    padding: 2.25rem 2rem 2rem 2rem;
    position: relative;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #c5c6c7;
    box-sizing: border-box;
    overflow: hidden;
    margin: auto;
}

.login-modal-overlay.active .login-modal-card {
    transform: translateY(0) scale(1);
}

.login-modal-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(9, 107, 169, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Close Button - Fixed Top Right */
.login-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #a0aec0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.login-modal-close:hover {
    background: rgba(255, 99, 132, 0.2);
    border-color: rgba(255, 99, 132, 0.45);
    color: #ff6b81;
    transform: rotate(90deg);
}

.login-modal-header {
    position: relative;
    z-index: 1;
    padding-right: 36px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(9, 107, 169, 0.12);
    border: 1px solid rgba(9, 107, 169, 0.35);
    color: #096ba9;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.login-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #096ba9;
    box-shadow: 0 0 8px #096ba9;
    animation: loginPulse 2s infinite;
}

@keyframes loginPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.login-modal-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
}

.login-modal-subtitle {
    font-size: 0.86rem;
    color: #8c9ba5;
    margin-top: 0.35rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.login-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: none;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    animation: fadeInAlert 0.3s ease;
    box-sizing: border-box;
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-alert.error {
    background: rgba(255, 99, 132, 0.12);
    border: 1px solid rgba(255, 99, 132, 0.35);
    color: #ff6b81;
}

.login-alert.success {
    background: rgba(9, 107, 169, 0.15);
    border: 1px solid rgba(9, 107, 169, 0.4);
    color: #096ba9;
}

.login-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
}

.login-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-field-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #096ba9;
    font-size: 0.95rem;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 2.8rem 0.85rem 2.75rem;
    background: rgba(15, 31, 59, 0.85);
    border: 1px solid rgba(9, 107, 169, 0.28);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
    margin-bottom: 0;
    line-height: 1.4;
}

.login-input::placeholder {
    color: #64748b;
    opacity: 1;
    font-weight: 400;
}

.login-input:focus {
    outline: none;
    border-color: #096ba9;
    background: rgba(15, 31, 59, 0.98);
    box-shadow: 0 0 16px rgba(9, 107, 169, 0.35);
}

.login-input-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8c9ba5;
    cursor: pointer;
    font-size: 0.95rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
    z-index: 2;
}

.login-input-toggle:hover {
    color: #096ba9;
}

.login-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #096ba9, #80878a);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(9, 107, 169, 0.45);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
}

.login-submit-btn:hover {
    background: linear-gradient(135deg, #0b7dc5, #096ba9);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -4px rgba(9, 107, 169, 0.6);
    color: #ffffff;
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .login-modal-card {
        padding: 1.75rem 1.4rem;
        border-radius: 14px;
    }
    .login-modal-title {
        font-size: 1.35rem;
    }
}
