:root {
    --primary-green: #8d2644;
    --dark-green: #6f1e36;
    --light-gray: #f7f4f5;
    --text-gray: #5f6b72;
    --dark-text: #5f6b72;
    --white: #ffffff;
    --border-color: #d8dadd;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-gray);
    display: grid;
    place-items: center;
    height: 100%;
    margin: 0;
    color: var(--dark-text);
}

.login-page {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.logo-outside {
    width: 220px;
    height: auto;
    margin: 0 auto 36px;
    display: block;
}

.login-container {
    background-color: var(--white);
    padding: 18px 40px 34px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 18px;
    text-align: left;
}

.form-alert {
    background: #fde9e9;
    border: 1px solid #f0b6b6;
    color: #8b0000;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: left;
}

.form-alert.success {
    background: #e7f7ef;
    border-color: #a3e0bf;
    color: #17693b;
}

.floating-alert-wrap {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: min(50vw, 760px);
    max-width: 90vw;
    pointer-events: none;
}

.floating-alert {
    background: #fde9e9;
    border: 1px solid #f0b6b6;
    color: #8b0000;
    border-radius: 10px;
    padding: 18px 20px;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.floating-alert.success {
    background: #e7f7ef;
    border-color: #a3e0bf;
    color: #17693b;
}

.floating-alert.hide {
    opacity: 0;
}

form {
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000;
    font-size: 13px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(141, 38, 68, 0.18);
}

.login-button {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 4px;
}

.login-button:hover {
    background-color: var(--dark-green);
}

.login-button:disabled {
    opacity: 0.75;
}

body.is-waiting,
body.is-waiting * {
    cursor: wait !important;
}

.auth-links {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.auth-links span {
    margin: 0 6px;
}

.inline-link {
    color: var(--text-gray);
    text-decoration: none;
    cursor: pointer;
}

.inline-link:hover {
    color: #5a6268;
    text-decoration: none;
}

footer {
    margin-top: 30px;
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 12px;
    text-align: center;
}

.footer-links a,
.footer-links span {
    font-size: 12px;
    color: var(--text-gray);
    text-decoration: none;
}

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

.footer-links span {
    margin: 0 3px;
    user-select: none;
}

.back-home-link {
    margin-bottom: 12px;
    text-align: center;
}

.back-home-link a {
    font-size: 12px;
    color: var(--text-gray);
    text-decoration: none;
}

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

footer p {
    color: var(--text-gray);
    font-size: 12px;
    margin: 0;
    text-align: center;
}

@media (max-width: 480px) {
    .login-page {
        padding: 14px;
    }

    .login-container {
        padding: 25px;
    }

    .logo-outside {
        width: 190px;
        margin-bottom: 28px;
    }

    .login-title {
        font-size: 22px;
    }

    .floating-alert-wrap {
        width: 92vw;
    }

    .floating-alert {
        font-size: 14px;
        padding: 14px;
    }
}

.autofill-decoy { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #333;
    -webkit-box-shadow: 0 0 0px 1000px #fff inset;
    transition: background-color 9999s ease-out 0s;
}

.brand-lockup {
    width: auto;
    min-width: 220px;
    color: #8d2644;
    font-family: "Century Gothic", "Avenir Next", Avenir, Arial, sans-serif;
    line-height: 1;
    letter-spacing: 0;
}

.brand-lockup span,
.brand-lockup strong {
    display: block;
}

.brand-lockup span {
    color: #5f6b72;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 4px;
}

.brand-lockup strong {
    color: #8d2644;
    font-size: 42px;
    font-weight: 700;
}