/* General Styles */
body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    background: #fff;
}

/* Left: welcome panel */
.image-panel {
    display: none;
    position: relative;
    width: 50%;
    overflow: hidden;
    background-color: #f9fafb;
}

.image-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.1) 50%, #ffffff 100%);
}

.image-text {
    position: absolute;
    top: 40px;
    left: 40px;
    max-width: 320px;
}

.image-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.image-text p {
    color: #4b5563;
    margin-top: 4px;
}

/* Right: form panel */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.form-panel-inner {
    width: 100%;
    max-width: 448px;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
}

.auth-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px 12px;
    margin-right: 32px;
    font-size: 1rem;
    font-weight: 500;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.auth-tab:hover {
    color: #4b5563;
}

.auth-tab.active {
    color: #111827;
    font-weight: 600;
    border-bottom-color: #3b82f6;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background-color: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.auth-form input::placeholder {
    color: #9ca3af;
}

.auth-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #60a5fa;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
}

.toggle-password:hover {
    color: #4b5563;
}

.auth-links {
    display: flex;
    justify-content: flex-end;
    font-size: 0.875rem;
    margin-top: 4px;
}

.auth-links a {
    color: #3b82f6;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    background-color: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

.auth-submit:hover {
    background-color: #2563eb;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Google button */
.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.google-btn:hover {
    background-color: #f9fafb;
}

/* Switch text */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 32px;
}

.auth-switch button {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.auth-switch button:hover {
    text-decoration: underline;
}

/* Error message */
.auth-error {
    display: none;
    font-size: 0.875rem;
    text-align: center;
    color: #ef4444;
    margin-top: 16px;
}

.auth-error.visible {
    display: block;
}

.auth-error.success {
    color: #16a34a;
}

/* Responsive */
@media (min-width: 1024px) {
    .image-panel {
        display: block;
    }
}
