:root {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --bg-body: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --accent-glow: rgba(37, 99, 235, 0.15);
}

.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-body);
    overflow: hidden;
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Animated Background */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 10s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #2563eb;
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #7c3aed;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 50%;
    left: 20%;
    animation-delay: -2s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(10%, 10%); }
}

/* Login Card */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.login-header .logo h1 {
    color: var(--text-main);
    font-size: 2rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Forms */
.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: block; /* Removed flex to avoid layout issues with absolute children */
}

.input-wrapper > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 5;
}

.input-wrapper input {
    display: block;
    width: 100%;
    padding: 0.875rem 3.5rem 0.875rem 2.75rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

/* Remove default browser icons */
.input-wrapper input::-ms-reveal,
.input-wrapper input::-ms-clear {
    display: none;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-wrapper input::placeholder {
    color: #475569;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.toggle-password i {
    position: static;
    transform: none;
    color: inherit;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: white;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

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

.btn-login .loader {
    position: absolute;
    background: var(--primary);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error State */
.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: #fca5a5;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.login-footer {
    margin-top: 2.5rem;
    text-align: center;
}

.login-footer p {
    font-size: 0.75rem;
    color: #475569;
}
