* {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, rgb(224, 242, 255), rgb(255, 244, 184));
    min-height: 100vh;
}

main.auth-page {
    padding: 3rem 1.5rem 5rem;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(24, 37, 110, 0.14);
    border: 1px solid rgba(24, 37, 110, 0.08);
    animation: slideIn 0.45s ease;
    backdrop-filter: blur(10px);
}

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

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand img {
    width: 80px;
    border-radius: 12px;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(24, 37, 110, 0.06);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    background: none;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgb(64, 80, 122);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.tab-btn:hover {
    color: rgb(24, 37, 110);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgb(24, 37, 110), rgb(41, 128, 225));
    color: white;
    box-shadow: 0 4px 14px rgba(24, 37, 110, 0.25);
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

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

.auth-form h2 {
    font-size: 1.6rem;
    color: rgb(24, 37, 110);
    margin-bottom: 0.35rem;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: #40507a;
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-weight: 600;
    color: rgb(24, 37, 110);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.password-wrap {
    position: relative;
    display: flex;
    width: 100%;
}

.password-wrap input {
    flex: 1;
    min-width: 0;
    padding-right: 2.8rem !important;
}

.toggle-pw {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-pw:hover {
    color: rgb(24, 37, 110);
}

.form-group input {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid rgba(24, 37, 110, 0.18);
    font-size: 0.93rem;
    font-family: 'Poppins', sans-serif;
    background: white;
    color: #40507a;
    transition: all 0.25s ease;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group input:hover {
    border-color: rgba(41, 128, 225, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: rgb(41, 128, 225);
    box-shadow: 0 0 0 3px rgba(41, 128, 225, 0.15);
}

/* Auth message */
.auth-msg {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.auth-msg.success {
    background: rgba(74, 200, 130, 0.12);
    color: #1a7a46;
    border: 1px solid rgba(74, 200, 130, 0.35);
}

.auth-msg.error {
    background: rgba(220, 60, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(220, 60, 60, 0.25);
}

.submit-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, rgb(24, 37, 110), rgb(41, 128, 225));
    color: white;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.25s ease;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(24, 37, 110, 0.28);
}

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

.form-toggle {
    text-align: center;
    font-size: 0.88rem;
    color: #40507a;
}

.form-toggle a {
    color: rgb(41, 128, 225);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-toggle a:hover {
    color: rgb(24, 37, 110);
}
