/* Login Page Styles - Zencia Brand Theme (Fixed/No-Scroll) */

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

/* --- Base Overrides --- */
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden; /* COMMAND: STRICTLY NO SCROLLING */
    font-family: 'Inter', sans-serif;
}

body {
    /* Deep dark teal/black gradient foundation */
    background: radial-gradient(circle at top right, #1a2a2a 0%, #000000 100%),
                url('/static/images/integration-bvg.svg') center/cover no-repeat !important;
}

.login-container {
    position: absolute; /* Locks container to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* --- Animated Background Orbs --- */
/* Positioned absolutely within the fixed container */
.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 217, 213, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    left: -150px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 139, 139, 0.12) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px;
    right: -100px;
    border-radius: 50%;
    animation: float 14s ease-in-out infinite reverse;
    z-index: -1;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* --- The Glass Card --- */
.login-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Slightly compacted padding to ensure it fits vertical height */
    padding: 2.5rem 3rem; 
    border-radius: 24px;
    width: 90%; /* Responsive width */
    max-width: 440px;
    
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top accent line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00D9D5, transparent);
    opacity: 0.8;
}

/* --- Header --- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #a0a0a0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Form Elements --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Slightly reduced gap */
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e0e0;
    font-size: 0.875rem;
    margin-left: 4px;
}

/* Input Wrapper for Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #666;
    transition: color 0.3s ease;
    z-index: 2;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem; 
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder {
    color: #555;
}

.form-group input:focus {
    outline: none;
    border-color: #00D9D5;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 217, 213, 0.1);
}

.form-group input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #00D9D5;
}

/* --- Button --- */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #00D9D5 0%, #008B8B 100%) !important;
    color: #000000 !important;
    border: none !important;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 217, 213, 0.4);
    filter: brightness(1.1);
}

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* --- Messages --- */
.error-message {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #ff8888;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.3s ease-out;
}

/* --- Animations --- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); scale: 0.95; }
    to { opacity: 1; transform: translateY(0); scale: 1; }
}

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