:root {
    --forny-form-paddings: 2.5rem;

    --forny-color-accent-500: hsla(244, 79%, 52%, 1);
    --forny-color-accent-700: hsla(244, 72%, 40%, 1);

    --forny-color-gray-100: hsla(216, 33%, 97%, 1);
    --forny-color-gray-300: hsla(0, 0%, 0%, 0.1);
    --forny-color-gray-500: hsla(0, 0%, 61%, 1);
    --forny-color-gray-700: hsla(210, 27%, 70%, 1);
    --forny-color-gray-900: hsla(210, 13%, 20%, 1);

    --forny-font-family: 'Open Sans', sans-serif;
    --forny-color-text: var(--forny-color-gray-500);
    --forny-color-header: var(--forny-color-gray-900);
    --forny-link-color: var(--forny-color-accent-700);

    --forny-form-control-border: none;
    --forny-form-control-padding: var(--forny-p2) var(--forny-p4);
    --forny-form-control-radius: 20px;
    --forny-form-control-background: var(--forny-color-gray-100);
    --forny-shadow-color: var(--forny-color-gray-300);
}

.forny-container {
    background-size: contain;
    display: flex;
    align-items: center;
}

.forny-inner {
    display: block;
    height: auto;
}

.forny-form {
    padding: 2.5rem;
    padding: var(--forny-form-paddings);
    background: #26334d;
    border-radius: 12px;
}

.forny-logo {
    color: hsla(210, 13%, 20%, 1);
    color: var(--forny-color-gray-900);
}

@media (min-width: 768px) {
    .forny-container {
        /*background: url('../img/bg-03-02.svg') center center no-repeat,*/
        /*    url('../img/bg-03-01.svg') center center no-repeat;*/
        /*background-color: hsla(216, 33%, 97%, 1);*/
        background-color: #192132;
    }
    .forny-form {
        box-shadow: 0 3px 6px hsla(0, 0%, 0%, 0.1);
        box-shadow: var(--forny-shadow);
    }
}

.forny-form a {
    font-size: 0.875rem;
    font-size: var(--forny-text-sm);
}

.forny-form .text-center p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* FORMS */

.forny-form .form-group {
    margin-bottom: 1rem;
    margin-bottom: var(--forny-p4);
    background: hsla(216, 33%, 97%, 1);
    background: var(--forny-form-control-background);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(25, 33, 61, 0.12);
}

.forny-form .form-group.focused:not(.has-error) {
    border-color: rgba(240, 185, 11, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(240, 185, 11, 0.28);
}

/* BUTTONS */

.forny-form .btn {
    border-radius: 20px;
    border-radius: var(--forny-form-control-radius);
    font-weight: bold;
    padding: 0.5rem 1rem;
    padding: var(--forny-p2) var(--forny-p4);
}

/* INPUT ADDONS */

.forny-form .form-group .input-group-append .input-group-text {
    padding-left: 0.5rem;
    padding-left: var(--forny-p2);
}

.forny-form .form-group .input-group-append .input-group-text:hover {
    color: var(--forny-color-blue-500);
}

.forny-form .input-group-prepend .input-group-text {
    padding-right: 0.5rem;
    padding-right: var(--forny-p2);
}

/* Landing global style.css uses .input-group > .form-control { min-width: 80%; } which breaks lock + password + eye rows */
.forny-form .form-group .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.forny-form .form-group .input-group > .form-control {
    min-width: 0 !important;
    flex: 1 1 auto;
    width: 1%;
}

.forny-form .form-group .input-group-prepend,
.forny-form .form-group .input-group-append {
    flex-shrink: 0;
    display: flex;
}

.forny-form .form-group .input-group-append .input-group-text,
.forny-form .form-group .input-group-prepend .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    background-color: transparent;
    color: var(--forny-color-gray-700);
    border: none;
}

.forny-form .form-group .input-group-append .input-group-text svg,
.forny-form .form-group .input-group-prepend .input-group-text svg {
    display: block;
}

.forny-container .line {
    background: hsla(0, 0%, 61%, 1);
    background: var(--forny-color-gray-500);
    height: 1px;
    margin-top: 12px;
    text-align: center;
}
.forny-container .line span {
    background: #fff;
    padding: 8px;
    position: relative;
    top: -12px;
}

/* Primary CTA - login, register, forgot / reset password (matches site gold) */
.auth-btn-primary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    padding: 0.8rem 1.25rem;
    min-height: 50px;
    font-family: 'Montserrat', 'Poppins', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #1a2233 !important;
    background: linear-gradient(180deg, #f7c933 0%, #f0b90b 42%, #d4a209 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.14) !important;
    border-radius: 10px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 2px 0 rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(240, 185, 11, 0.35);
    cursor: pointer;
    transition:
        filter 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.auth-btn-primary:hover {
    filter: brightness(1.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 2px 0 rgba(0, 0, 0, 0.1),
        0 10px 28px rgba(240, 185, 11, 0.45);
}

.auth-btn-primary:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 1px 0 rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(240, 185, 11, 0.3);
}

.auth-btn-primary:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(240, 185, 11, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 8px 20px rgba(240, 185, 11, 0.35);
}

.auth-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.forny-form .auth-btn-primary {
    margin-top: 0.75rem;
}

.auth-btn-wrap {
    width: 100%;
}

/* Referral (read-only): muted grey - clearly not an active input or CTA */
.auth-referral-block {
    width: 100%;
    margin-bottom: var(--forny-p4, 1rem);
}

.auth-referral-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    font-family: 'Montserrat', 'Poppins', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.4;
    color: #64748b;
    border-radius: 10px;
    border: 1px solid rgba(25, 33, 61, 0.1);
    background: #dfe4ec;
    box-shadow: none;
    cursor: default;
    user-select: none;
}

.auth-referral-pill__text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: #64748b;
}

.auth-referral-hint {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.58);
    text-align: center;
    font-weight: 500;
    line-height: 1.35;
}

/* Remember me - matches dark card + gold CTA (not a .form-group input pill) */
.forny-form .auth-remember {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0.15rem 0 0.85rem;
    padding: 0.35rem 0.1rem 0.15rem;
    cursor: pointer;
    user-select: none;
    background: transparent;
    border: none;
    border-radius: 0;
}

.forny-form .auth-remember__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forny-form .auth-remember__ui {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.12rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.forny-form .auth-remember__native:focus-visible + .auth-remember__ui {
    outline: none;
    border-color: rgba(240, 185, 11, 0.85);
    box-shadow:
        0 0 0 3px rgba(240, 185, 11, 0.38),
        inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.forny-form .auth-remember__native:checked + .auth-remember__ui {
    border-color: rgba(0, 0, 0, 0.18);
    background: linear-gradient(180deg, #f7c933 0%, #f0b90b 52%, #d4a209 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.forny-form .auth-remember__native:checked + .auth-remember__ui::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    margin-bottom: 2px;
    border: solid #1a2233;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forny-form .auth-remember__copy {
    font-family: 'Montserrat', 'Poppins', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    padding-top: 0.02rem;
}

.forny-form .auth-remember:hover .auth-remember__ui {
    border-color: rgba(240, 185, 11, 0.45);
    background: rgba(255, 255, 255, 0.1);
}

.forny-form .auth-remember:hover .auth-remember__native:checked + .auth-remember__ui {
    filter: brightness(1.05);
    background: linear-gradient(180deg, #f9d043 0%, #f2bd14 52%, #d9a60a 100%);
}

/*
 * Global landing style.css uses .form-control { color: #fff } and
 * .form-control:focus { color: #fff !important } for dark dashboard fields.
 * Auth Forny rows use a light pill - force readable text + fill.
 */
.forny-form .form-group .input-group > .form-control {
    color: #1e293e !important;
    -webkit-text-fill-color: #1e293e;
    background-color: #ffffff !important;
    font-weight: 500 !important;
    border: none !important;
    box-shadow: none !important;
}

.forny-form .form-group .input-group > .form-control:focus {
    color: #1e293e !important;
    -webkit-text-fill-color: #1e293e;
    background-color: #ffffff !important;
    /* Focus ring on inner input alone looks misaligned vs icon columns - wrapper .focused handles highlight */
    box-shadow: none !important;
    outline: none !important;
}

.forny-form .form-group .input-group > .form-control::-webkit-input-placeholder {
    color: #a8b0bd !important;
    -webkit-text-fill-color: #a8b0bd;
}
.forny-form .form-group .input-group > .form-control::-moz-placeholder {
    color: #a8b0bd !important;
    opacity: 1;
}
.forny-form .form-group .input-group > .form-control:-ms-input-placeholder {
    color: #a8b0bd !important;
}
.forny-form .form-group .input-group > .form-control::-ms-input-placeholder {
    color: #a8b0bd !important;
}
.forny-form .form-group .input-group > .form-control::placeholder {
    color: #a8b0bd !important;
    opacity: 1;
}

/* Select empty state (e.g. Country) - no ::placeholder; match input placeholder grey */
.forny-form .form-group .input-group > select.form-control:invalid {
    color: #a8b0bd !important;
    -webkit-text-fill-color: #a8b0bd;
}
.forny-form .form-group .input-group > select.form-control:valid {
    color: #1e293e !important;
    -webkit-text-fill-color: #1e293e;
}
.forny-form .form-group .input-group > select.form-control option {
    color: #1e293e;
}

.forny-form .form-group .input-group > .form-control:-webkit-autofill,
.forny-form .form-group .input-group > .form-control:-webkit-autofill:hover,
.forny-form .form-group .input-group > .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #1e293e !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    transition: background-color 99999s ease-out;
}

/* Token reset page (gcard / module__registration, not .forny-form) */
.auth-layout-slot .gcard .form-control,
.auth-layout-slot .gcard .form__input {
    color: #1e293e !important;
    -webkit-text-fill-color: #1e293e;
    background-color: #ffffff !important;
    font-weight: 500 !important;
}

.auth-layout-slot .gcard .form-control:focus,
.auth-layout-slot .gcard .form__input:focus {
    color: #1e293e !important;
    -webkit-text-fill-color: #1e293e;
    background-color: #ffffff !important;
    border-color: rgba(240, 185, 11, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(240, 185, 11, 0.22) !important;
    outline: none !important;
}

.auth-layout-slot .gcard .form-control::-webkit-input-placeholder,
.auth-layout-slot .gcard .form__input::-webkit-input-placeholder {
    color: #a8b0bd !important;
    -webkit-text-fill-color: #a8b0bd;
}
.auth-layout-slot .gcard .form-control::-moz-placeholder,
.auth-layout-slot .gcard .form__input::-moz-placeholder {
    color: #a8b0bd !important;
    opacity: 1;
}
.auth-layout-slot .gcard .form-control:-ms-input-placeholder,
.auth-layout-slot .gcard .form__input:-ms-input-placeholder {
    color: #a8b0bd !important;
}
.auth-layout-slot .gcard .form-control::-ms-input-placeholder,
.auth-layout-slot .gcard .form__input::-ms-input-placeholder {
    color: #a8b0bd !important;
}
.auth-layout-slot .gcard .form-control::placeholder,
.auth-layout-slot .gcard .form__input::placeholder {
    color: #a8b0bd !important;
    opacity: 1;
}

/* Alerts - crisp contrast on dark auth card / gcard (overrides Bootstrap + common.css pale panels) */
.forny-form .alert,
.auth-layout-slot .alert {
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
    border-width: 1px;
    border-style: solid;
}

.forny-form .alert.alert-danger,
.auth-layout-slot .alert.alert-danger {
    color: #fecdd3;
    background: linear-gradient(180deg, rgba(153, 27, 27, 0.55) 0%, rgba(127, 29, 29, 0.72) 100%);
    border-color: #f87171;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.2);
}

.forny-form .alert.alert-danger strong,
.auth-layout-slot .alert.alert-danger strong {
    color: #ffffff;
    font-weight: 700;
}

.forny-form .alert.alert-danger ul,
.auth-layout-slot .alert.alert-danger ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
    color: #fecdd3;
}

.forny-form .alert.alert-success,
.auth-layout-slot .alert.alert-success {
    color: #bbf7d0;
    background: linear-gradient(180deg, rgba(20, 83, 45, 0.55) 0%, rgba(6, 78, 59, 0.78) 100%);
    border-color: #34d399;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.2);
}

.forny-form .alert.alert-success strong,
.auth-layout-slot .alert.alert-success strong {
    color: #ffffff;
    font-weight: 700;
}

.forny-form .alert .fas,
.auth-layout-slot .alert .fas {
    margin-right: 0.35rem;
    color: inherit;
    opacity: 1;
}
