:root {
    --login-ink: #1f2933;
    --login-muted: #5d6a75;
    --login-panel: rgba(255, 255, 255, 0.92);
    --login-panel-border: rgba(63, 111, 30, 0.12);
    --login-accent: #6ea83c;
    --login-accent-dark: #3f6f1e;
    --login-shadow: 0 30px 80px rgba(27, 39, 51, 0.16);
    --login-surface: rgba(247, 251, 242, 0.82);
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--login-ink);
    background:
        radial-gradient(circle at top left, rgba(110, 168, 60, 0.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(77, 132, 38, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(63, 111, 30, 0.16), transparent 26%),
        linear-gradient(135deg, #f6fbf1 0%, #edf5e7 42%, #e5efe0 100%);
}

body:before,
body:after {
    content: "";
    position: fixed;
    width: 460px;
    height: 460px;
    border-radius: 44% 56% 62% 38% / 41% 38% 62% 59%;
    pointer-events: none;
    filter: blur(10px);
    z-index: 0;
}

body:before {
    top: -170px;
    right: -110px;
    background: linear-gradient(135deg, rgba(132, 186, 84, 0.2), rgba(63, 111, 30, 0.08));
}

body:after {
    bottom: -210px;
    left: -140px;
    background: linear-gradient(135deg, rgba(97, 151, 52, 0.16), rgba(44, 82, 22, 0.08));
}

#body {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    box-sizing: border-box;
}

.main-content {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loginForm-header {
    display: none;
}

#loginForm {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 0;
    width: min(100%, 560px);
    max-width: 560px;
    padding: 0;
    border: 1px solid var(--login-panel-border);
    border-radius: 32px;
    background: var(--login-panel);
    box-shadow: 0 28px 70px rgba(31, 41, 51, 0.16);
    backdrop-filter: blur(18px);
    margin: 0 auto;
}

#loginForm:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(132, 186, 84, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 34%),
        linear-gradient(320deg, rgba(63, 111, 30, 0.07), transparent 58%);
    pointer-events: none;
}

#loginForm:after {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

#loginForm .csam-login-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 5px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, var(--login-accent) 0%, var(--login-accent-dark) 100%);
    opacity: 0.92;
}

#loginForm .csam-login-section {
    position: relative;
    z-index: 1;
}

#loginForm .csam-login-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px 34px 28px;
    text-align: left;
}

.csam-form-shell {
    width: 100%;
}

.csam-form-heading {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: 0;
}

.csam-form-heading h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1.05;
    color: #24401c;
    letter-spacing: -0.04em;
}

.csam-form-heading p {
    margin: 0;
    color: var(--login-muted);
    font-size: 15px;
    line-height: 1.55;
    max-width: 420px;
}

#loginForm fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

#loginForm ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

#loginForm ol li {
    margin: 0 0 14px;
}

#loginForm input,
#loginForm textarea,
#loginForm select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(63, 111, 30, 0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 240, 0.94) 100%);
    color: var(--login-ink);
    font-size: 15px;
    padding: 16px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 20px rgba(31, 41, 51, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

#loginForm input:focus,
#loginForm textarea:focus,
#loginForm select:focus {
    outline: none;
    border-color: rgba(110, 168, 60, 0.65);
    box-shadow: 0 0 0 4px rgba(110, 168, 60, 0.12), 0 16px 28px rgba(110, 168, 60, 0.08);
    transform: translateY(-1px);
    background: #fff;
}

#loginForm input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--login-accent);
}

.csam-inline-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 4px;
}

#loginForm label {
    margin: 0;
    float: none;
    color: var(--login-muted);
    font-size: 15px;
    font-weight: 600;
}

#loginForm .validation-error,
#loginForm .field-validation-error {
    display: block;
    margin-top: 8px;
    color: #8f3324;
    font-size: 13px;
    font-weight: 600;
}

#loginForm .validation-summary-errors {
    margin: 10px 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(63, 111, 30, 0.18) !important;
    border-radius: 14px;
    background: rgba(241, 248, 232, 0.92) !important;
}

#loginForm .validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

#loginForm .validation-summary-errors li {
    display: list-item;
    color: #3f6f1e;
    font-size: 13px;
    line-height: 1.6;
}

.csam-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 0;
}

#loginForm input[type="submit"],
#loginForm input[type="button"],
#loginForm button {
    width: auto;
    min-width: 186px;
    margin: 0;
    padding: 14px 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--login-accent) 0%, var(--login-accent-dark) 100%) !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(63, 111, 30, 0.24);
}

#loginForm input[type="submit"]:hover,
#loginForm input[type="button"]:hover,
#loginForm button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #5e9430 0%, #2f5415 100%) !important;
    box-shadow: 0 22px 34px rgba(63, 111, 30, 0.22);
}

#loginForm a {
    color: #2f5f21;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

#loginForm a:hover {
    color: #24401c;
    text-decoration: underline;
}

.csam-form-note {
    margin-top: 16px;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.55;
    padding-top: 14px;
    border-top: 1px solid rgba(63, 111, 30, 0.08);
}

@media (max-width: 900px) {
    #body {
        min-height: auto;
        display: block;
    }

    #loginForm {
        margin: 32px auto;
    }

    #loginForm .csam-login-section:before {
        left: 22px;
        right: 22px;
    }

    #loginForm .csam-login-section {
        padding: 28px 22px 22px;
    }
}

@media (max-width: 520px) {
    .main-content {
        padding: 14px;
    }

    #loginForm {
        border-radius: 20px;
    }

    #loginForm .csam-login-panel,
    #loginForm .csam-login-section {
        padding: 24px 20px;
    }

    .csam-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #loginForm input[type="submit"],
    #loginForm input[type="button"],
    #loginForm button {
        width: 100%;
    }
}
