@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #09090b 0%, #03001e 30%, #120078 70%, #09090b 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-blue: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.35);
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(255, 255, 255, 0.12);
}

.login-body-override {
    background: var(--bg-gradient) !important;
    background-size: 400% 400% !important;
    animation: gradientShift 15s ease infinite !important;
    font-family: 'Outfit', sans-serif !important;
    color: var(--text-primary) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container,
.register-container {
    width: 100%;
    padding: 20px;
    margin: auto;
}

.login-container {
    max-width: 440px;
}

.register-container {
    max-width: 580px;
}

/* Custom select dropdown and textarea styling */
select.form-input-custom {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

select.form-input-custom option {
    background-color: #09090b !important;
    color: var(--text-primary) !important;
}

textarea.form-input-custom {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05) rotate(3deg);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.form-group-custom {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.form-label-custom {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input-custom {
    width: 100%;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: var(--text-primary) !important;
    font-size: 15px !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    font-family: 'Outfit', sans-serif !important;
}

.form-input-custom:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px var(--accent-glow) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.checkbox-custom-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-custom-label {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-custom-label input {
    margin-right: 8px;
    accent-color: var(--accent-blue);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.login-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
    font-family: 'Outfit', sans-serif !important;
}

.login-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35) !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.login-btn-primary:active {
    transform: translateY(1px);
}

.login-btn-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 11px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-top: 12px !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}

.login-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.login-footer-links {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
}

.login-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Custom Message/Error styles for login */
.login-message-alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInAlert 0.3s ease forwards;
}

.login-message-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.login-message-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

@keyframes fadeInAlert {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Remove MVC global margins/paddings on container when custom login is active */
.login-body-override .thisMainContainer {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Custom segmented OTP input styling */
.otp-input-field {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: 0.35em !important;
    text-align: center !important;
    padding: 12px 12px 12px 20px !important;
    color: #ffffff !important;
    max-width: 180px !important;
    margin: 24px auto !important;
    display: block !important;
    outline: none !important;
    transition: all 0.25s ease !important;
}

.otp-input-field:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px var(--accent-glow) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Explicit placeholder color styling */
.form-input-custom::placeholder,
.otp-input-field::placeholder {
    color: #6b7280 !important; /* Standard slate/gray color */
    opacity: 1 !important; /* Required for Firefox compatibility */
}
