/* Global Design Variables */
:root {
    --primary: #4F46E5; 
    --primary-glow: rgba(79, 70, 229, 0.1);
    --text-main: #1E293B; 
    --text-muted: #64748B;
    --bg-light: #FFFFFF;
    --bg-subtle: #F8FAFC; 
    --border: #E2E8F0;
    --error-bg: #FFF1F2;
    --error-text: #E11D48;
    --error-border: #FECDD3;
}

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

/* Body Layout Configuration */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-main);
}

/* UI Component: Login Card Container */
.login-card {
    background: var(--bg-light);
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
    text-align: center;
}

/* Brand Identity: Logo Box */
.logo-container {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin: 0 auto 20px;
    font-style: italic;
}

/* Typography: Headings and Subtext */
h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Form Layout: Inputs and Labels */
form { text-align: left; }
.input-group { margin-bottom: 16px; }

label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
    margin-left: 2px;
}

/* Input Field Styling */
input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* UI Component: Password Visibility Toggle */
.field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

/* UI Component: Primary Action Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

/* State: Hover effect for the main action button */
.btn-submit:hover {
    background-color: #4338CA; 
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px var(--primary-glow); 
}

/* State: Active (click) effect for the main action button */
.btn-submit:active {
    transform: translateY(0); 
}

/* UI Component: Section Divider */
.divider {
    margin: 20px 0;
    position: relative;
    height: 1px;
    background: var(--border);
}

.divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-light);
    padding: 0 12px;
    font-size: 10px;
    font-weight: 800;
    color: #94A3B8;
    text-transform: uppercase;
}

/* UI Component: Social Login Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

/* Messaging: Error Alert Styles */
.error-alert {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: left;
}

/* Footer Context Links */
.footer-text {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}
/* --- Entrance Animations: Creates the building effect --- */

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

/* Apply base animation settings to all elements inside the card */
.logo-container, 
h1, 
.subtitle, 
.input-group, 
.btn-submit, 
.divider, 
.btn-google, 
.footer-text {
    animation: slideUp 0.5s ease forwards;
    opacity: 0; /* Elements start invisible */
}

/* Staggered Delays: Top to Bottom sequence */
.logo-container { animation-delay: 0.1s; }
h1              { animation-delay: 0.15s; }
.subtitle       { animation-delay: 0.2s; }

/* Form fields sequence */
.input-group:nth-of-type(1) { animation-delay: 0.25s; }
.input-group:nth-of-type(2) { animation-delay: 0.3s; }

/* Action elements sequence */
.btn-submit     { animation-delay: 0.4s; }
.divider        { animation-delay: 0.45s; }
.btn-google     { animation-delay: 0.5s; }
.footer-text    { animation-delay: 0.6s; }