/* Global Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #a1e5dc;
    color: #222;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: transparent;
}

.navbar .logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: #003333;
}

.navbar nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: #222;
    font-weight: 500;
}

.navbar nav a:hover {
    color: #ff5f33;
}

/* Layout */
main,
main.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

/* ==== Card (support both .signup-card and .auth-card) ==== */
.signup-card,
.auth-card {
    background-color: #fff;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 480px;
    width: 100%;
}

.signup-card h1,
.auth-card h1 {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
    color: #111;
}

.subtitle {
    margin: 0 0 1.25rem;
    color: #555;
}

/* ==== Form fields ==== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: #222;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.72rem 0.8rem;
    border: 1px solid #d3d8de;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: #111;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

input::placeholder {
    color: #9aa4af;
}

input:focus {
    border-color: #86d5cd;
    box-shadow: 0 0 0 4px rgba(134, 213, 205, 0.25);
}

/* Invalid state helper (if you add .is-invalid via JS) */
.is-invalid {
    border-color: #e57373 !important;
    box-shadow: 0 0 0 4px rgba(229, 115, 115, 0.18) !important;
}

/* ==== Password checklist (✅ / ❌) ==== */
.pw-checklist {
    margin: 8px 0 0;
    padding-left: 0;
    list-style: none;
}

.pw-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    margin: 6px 0;
    line-height: 1.25rem;
}

.pw-rule .mark {
    width: 1.2em;
    display: inline-block;
    text-align: center;
}

.pw-rule.bad {
    color: #c62828;
}

/* red */
.pw-rule.ok {
    color: #1b5e20;
}

/* green */

.hint {
    font-size: 0.88rem;
    color: #c62828;
    margin-top: 6px;
}

.hint.ok {
    color: #1b5e20;
}

.error {
    color: #c62828;
    font-size: 0.95rem;
    margin-top: 6px;
}

.success {
    color: #1b5e20;
    font-size: 0.95rem;
    margin-top: 6px;
}

.hidden {
    display: none !important;
}

/* ==== Buttons ==== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.02s ease-in, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background-color: #28a745;
    /* green */
    color: #fff;
    width: 100%;
    box-shadow: 0 6px 14px rgba(40, 167, 69, 0.22);
}

.btn.primary:hover {
    background-color: #218838;
}

.btn.primary:disabled,
.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #a7d8b7;
    box-shadow: none;
}

/* Google Button (kept from original) */
.google-btn,
button.google-btn {
    background-color: #fff;
    border: 1px solid #d3d8de;
    padding: 0.7rem;
    width: 100%;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 14px;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.google-btn:hover {
    background-color: #f7f9fb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Toggle link row */
.toggle-mode {
    margin: 10px 0 6px;
    font-size: 0.92rem;
    color: #444;
}

.toggle-mode a {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.toggle-mode a:hover {
    color: #0056b3;
}

/* Divider (optional if you use it) */
.divider {
    margin: 1.5rem 0;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ccc;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Small screens tweaks */
@media (max-width: 420px) {

    .signup-card,
    .auth-card {
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }

    .signup-card h1,
    .auth-card h1 {
        font-size: 1.35rem;
    }

    .pw-rule {
        font-size: 0.92rem;
    }
}

#email.valid {
    outline: 2px solid #1b5e20;
}

#email.invalid {
    outline: 2px solid #c62828;
}

#confirm-email.valid {
    outline: 2px solid #1b5e20;
}

#confirm-email.invalid {
    outline: 2px solid #c62828;
}

.google-btn {
    background-color: #fff;
    border: 1px solid #d3d8de;
    color: #3c4043;
    padding: 0.7rem;
    width: 100%;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 500;
    text-decoration: none;

    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 14px;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.google-btn:hover,
.google-btn:focus {
    background-color: #f7f9fb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}