/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body, html {
    height: 100%;
    width: 100%;
}

/* Background & Wrapper */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
    background: url('../img/bg.jpeg') no-repeat center center fixed; 
    background-size: cover;
}

/* Glassmorphism Card (Matches rounded-[2.5rem] and shadow-2xl) */
.login-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 2.5rem; /* React: rounded-[2.5rem] */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 448px; /* React: max-w-md */
    transition: all 0.3s ease;
}

/* Exact Logo Styling */
.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-text {
    font-size: 2.25rem; /* React: text-3xl md:text-4xl */
    font-weight: 800; /* React: font-extrabold */
    letter-spacing: -0.025em; /* React: tracking-tight */
    color: #111111;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.brand-green {
    color: #25D366;
}

.welcome-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111111;
}

.sub-text {
    color: #64748b; /* slate-500 */
    font-size: 0.875rem;
    margin-top: 4px;
    font-style: italic;
}

/* Toggle Segment (Matches bg-slate-100) */
.toggle-container {
    display: flex;
    background: #f1f5f9; /* slate-100 */
    border-radius: 0.75rem;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b; /* slate-500 */
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #ffffff;
    color: #111111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Inputs (Matches bg-slate-50 border-slate-200) */
.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.icon-container {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8; /* slate-400 */
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

/* React: focus-within group */
.input-wrapper:focus-within .icon-container {
    color: #25D366;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem; /* pl-11 pr-4 py-3 */
    background: #f8fafc; /* slate-50 */
    border: 1px solid #e2e8f0; /* slate-200 */
    border-radius: 0.75rem; /* rounded-xl */
    font-size: 1rem;
    font-weight: 500;
    color: #111111;
    transition: all 0.2s;
}

.input-field::placeholder {
    color: #94a3b8; /* slate-400 */
}

.input-field:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3); /* focus:ring-[#25D366]/30 */
    background: #ffffff;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.password-toggle:hover {
    color: #64748b;
}

/* Primary Button (Matches bg-[#111111]) */
.btn {
    width: 100%;
    padding: 0.875rem; /* py-3.5 */
    border: none;
    border-radius: 0.75rem; /* rounded-xl */
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #4F46E5;
    color: #ffffff;
    margin-top: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
    background: #4338ca;
}

/* Google Button */
.btn-google {
    background: #ffffff;
    color: #111111;
    border: 1px solid #e2e8f0;
    gap: 10px;
    text-decoration: none;
    border-radius: 9999px; /* React: shape="pill" */
}

.btn-google:hover {
    background: #f8fafc;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 10px;
    background: white; /* Matches pill design */
    border-radius: 4px;
}

/* Error Handling */
.error-container {
    margin-bottom: 1.5rem;
}

.error-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fff1f2; /* rose-50 */
    border: 1px solid #ffe4e6; /* rose-100 */
    color: #e11d48; /* rose-600 */
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.error-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Extreme Mobile Responsiveness */
@media screen and (max-width: 400px) {
    .login-box {
        padding: 1.5rem;
        border-radius: 2rem;
    }
    .logo-text {
        font-size: 1.875rem;
    }
}