/* Common Auth Page Styles */
.auth-container {
    background: var(--surface-color);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: var(--elevation-4);
    overflow: hidden;
    margin: 0 auto;
}

/* Auth Header */
.auth-header {
    position: relative;
    padding: 24px 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--complementary-color));
    color: white;
}

.auth-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: white;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.auth-title {
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

/* Auth Body */
.auth-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--outline);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Work Sans', sans-serif;
    background: var(--surface-color);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(121, 215, 173, 0.1);
}

.form-input::placeholder {
    color: var(--on-surface-variant);
}

/* Password Field */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--on-surface);
}

/* Remember Me */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--outline);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.checkbox input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-custom {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.checkbox-label {
    font-size: 14px;
    color: var(--on-surface);
    cursor: pointer;
}

/* Links */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Work Sans', sans-serif;
}

.btn-primary {
    background: var(--complementary-color);
    color: white;
    margin-bottom: 12px;
}

.btn-primary:hover {
    background: var(--complementary-dark);
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
}

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

/* Google Button */
.btn-google {
    background: var(--surface-color);
    color: var(--on-surface);
    border: 1px solid var(--outline);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-google:hover {
    background: var(--background-color);
    border-color: var(--complementary-color);
    transform: translateY(-2px);
    box-shadow: var(--elevation-1);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
    color: var(--on-surface-variant);
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--outline);
}

.divider span {
    background: var(--surface-color);
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Terms */
.terms-text {
    font-size: 12px;
    color: var(--on-surface-variant);
    text-align: center;
    line-height: 1.5;
}

.terms-link {
    color: var(--complementary-color);
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Sign in link */
.signin-link {
    text-align: center;
    margin: 16px 0 12px 0;
    font-size: 14px;
    color: var(--on-surface-variant);
}

.signin-link a {
    color: var(--complementary-color);
    text-decoration: none;
    font-weight: 500;
}

.signin-link a:hover {
    text-decoration: underline;
}

/* Error Messages */
.messages {
    margin-bottom: 20px;
}

.messages .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.messages .alert-error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.messages .alert-success {
    background-color: #efe;
    color: #363;
    border-left: 4px solid #363;
}

/* Main container */
main {
    padding-top: 100px; /* Account for fixed header */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background-color) 0%, #f0f9f4 100%);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        width: 95%;
        margin: 10px;
    }

    .auth-header {
        padding: 20px 20px 12px;
    }

    .auth-body {
        padding: 20px;
    }

    main {
        padding-top: 80px;
    }
}

/* Google Button */
.btn-google {
    background: var(--surface-color);
    color: var(--on-surface);
    border: 1px solid var(--outline);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-google:hover {
    background: var(--background-color);
    border-color: var(--complementary-color);
    transform: translateY(-2px);
    box-shadow: var(--elevation-1);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
    color: var(--on-surface-variant);
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--outline);
}

.divider span {
    background: var(--surface-color);
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Messages */
.messages {
    margin-bottom: 16px;
}

.messages .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.messages .alert-success {
    background-color: #e6f7ee;
    color: #0d6832;
    border: 1px solid #a8e0c0;
}

.messages .alert-error {
    background-color: #fde8e8;
    color: #c53030;
    border: 1px solid #f8b4b4;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        width: 95%;
        margin: 20px auto;
    }
    
    .auth-body {
        padding: 20px 16px;
    }
    
    .btn {
        padding: 14px;
    }
}
