@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@400;500;600;700&family=Inter:wght@400;600&display=swap");

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #FAFAFA;
    font-family: "Poppins", sans-serif;
    color: #222;
}

.LOGIN-PAGE {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    height: 72px;
    padding: 0 60px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #222;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    transition: .25s;
}

.back-btn::before {
    content: "←";
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F3F3F3;
    border: 1px solid #D9D9D9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #181818;
    font-size: 20px;
}

.back-btn img {
    display: none;
}

.back-btn:hover {
    color: #181818;
    transform: translateX(-3px);
}

/* Main */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 55px 22px;
}

.login-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #E5E5E5;
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
    overflow: hidden;
}

/* Brand Header */
.card-header {
    background: linear-gradient(135deg, #111, #2C2C2C);
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-size: 1.55rem;
    font-weight: 700;
}

.card-header .logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.8);
}

.card-content {
    padding: 38px 42px 42px;
    text-align: center;
}

.welcome-section h1 {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-section p {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* Messages */
.error-msg {
    color: #b42318;
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
}

/* Toggle */
.auth-toggle {
    background: #F3F3F3;
    border: 1px solid #E5E5E5;
    border-radius: 999px;
    display: flex;
    padding: 5px;
    margin-bottom: 28px;
}

.toggle-btn {
    flex: 1;
    border: none;
    padding: 11px;
    border-radius: 999px;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
    color: #555;
    transition: .25s;
    font-family: "Poppins", sans-serif;
}

.toggle-btn.active {
    background: #181818;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    height: 48px;
    background: #F8F8F8;
    border: 1px solid #D9D9D9;
    border-radius: 12px;
    padding: 0 15px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: .25s;
}

.input-group input:focus {
    border-color: #181818;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}

.submit-btn {
    background: #181818;
    color: #fff;
    border: none;
    height: 50px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    letter-spacing: .5px;
    transition: .25s;
    font-family: "Poppins", sans-serif;
}

.submit-btn:hover {
    background: #2C2C2C;
    transform: translateY(-2px);
}

/* Divider */
.divider {
    margin: 26px 0;
    font-size: 13px;
    color: #999;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

/* Google */
.social-grid {
    display: flex;
    width: 100%;
}

.social-btn {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    color: #333;
    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    transition: .25s;
}

.social-btn:hover {
    border-color: #181818;
    background: #F5F5F5;
    transform: translateY(-2px);
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.google-only {
    flex: none;
}

.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    margin-bottom: 18px;
}

.forgot-password a {
    color: #181818;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.success-msg {
    background: #eaf8ef;
    color: #20894d;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 15px;
}

.error-msg,
.success-msg {
    transition: opacity .5s ease, transform .5s ease;
}

.alert-hide {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .top-bar {
        padding: 0 22px;
    }

    .login-container {
        padding: 35px 18px;
        align-items: flex-start;
    }

    .card-content {
        padding: 32px 24px 34px;
    }

    .card-header {
        min-height: 78px;
        font-size: 1.35rem;
    }

    .welcome-section h1 {
        font-size: 1.75rem;
    }
}

.success-msg {
    color: #20894d;
    background: #eaf8ef;
    border: 1px solid #bfe8cc;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
}

.resend-form {
    margin-top: 18px;
    text-align: center;
}

.resend-btn {
    border: none;
    background: transparent;
    color: #181818;
    font-weight: 700;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
}

.resend-btn:hover {
    text-decoration: underline;
}

.resend-form {
    margin-top: 14px;
    text-align: center;
}

.resend-btn {
    border: none;
    background: transparent;
    color: #181818;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.resend-btn:disabled {
    color: #999;
    cursor: not-allowed;
}

.success-msg {
    background: #eaf8ef;
    color: #20894d;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 15px;
}