/* MOBILE FIRST (max 393px) */
:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --error: #e74c3c;
    --error-bg: #fde8e8;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #ddd;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 393px;
}

.auth-section {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.logo {
  width: 120px;
  height: auto; 
  margin-bottom: 0.5px;
}

h2 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.error-message {
    color: var(--error);
    background: var(--error-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
}

/* TABLET (min-width: 600px) */
@media (min-width: 600px) {
    .auth-section {
        padding: 30px;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .logo {
        width: 120px;
    }
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 40px; /* Make space for the eye icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    color: var(--text-light);
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Adjust input focus to account for the button */
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    padding-right: 40px; /* Maintain space when focused */
}


.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.remember-me input {
    width: auto;
    order: 2; /* This moves it after the label in the flex order */
}

.remember-me label {
    order: 1;
}