:root {
    --ma-ink: #1a1410;
    --ma-panel: #fffdfb;
    --ma-elevated: #fff;
    --ma-canvas: #f4efe8;
    --ma-line: rgba(248, 160, 80, 0.28);
    --ma-line-strong: rgba(240, 120, 56, 0.45);
    --ma-orange: #f08840;
    --ma-orange-deep: #f07838;
    --ma-peach: #f8b058;
    --ma-peach-soft: #f8a050;
    --ma-gradient: linear-gradient(135deg, #f07838 0%, #f8b058 100%);
    --ma-text: #1a1410;
    --ma-muted: #6f675f;
    --ma-faint: #8a8178;
    --ma-danger: #c4472f;
    --ma-radius: 36px;
    --ma-field-radius: 14px;
    --ma-shadow: 0 24px 60px rgba(26, 20, 16, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.ma-auth-body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--ma-canvas);
    color: var(--ma-text);
    min-height: 100vh;
    min-height: 100dvh;
    color-scheme: light;
    -webkit-font-smoothing: antialiased;
}

.ma-auth {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.ma-auth__glow,
.ma-auth__glow--two {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.ma-auth__glow {
    width: 520px;
    height: 520px;
    background: rgba(240, 136, 64, 0.18);
    top: -180px;
    left: -120px;
}

.ma-auth__glow--two {
    width: 420px;
    height: 420px;
    background: rgba(248, 176, 88, 0.16);
    right: -80px;
    bottom: -140px;
}

.ma-auth__capsule {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: auto;
    align-items: stretch;
    background: #fffdfb;
    border: 1px solid var(--ma-line);
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    overflow: hidden;
    flex-shrink: 0;
}

.ma-auth__brand {
    position: relative;
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 18% 20%, rgba(248, 160, 80, 0.22), transparent 42%),
        linear-gradient(160deg, #fff8f0 0%, #fffdfb 58%);
    border-right: 1px solid var(--ma-line);
}

.ma-auth__logo {
    display: block;
    width: min(260px, 78%);
    max-width: 260px;
    height: auto;
    margin-left: -12px;
}

.ma-auth__eyebrow {
    margin: 20px 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ma-peach-soft);
}

.ma-auth__headline {
    margin: 0 0 16px;
    font-family: "Outfit", "Manrope", sans-serif;
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 16ch;
}

.ma-auth__lede {
    margin: 0;
    max-width: 34ch;
    color: var(--ma-muted);
    font-size: 15px;
    line-height: 1.65;
}

.ma-auth__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}

.ma-auth__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--ma-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ma-text);
    font-size: 12px;
    font-weight: 600;
}

.ma-auth__pill span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ma-gradient);
}

.ma-auth__panel {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    min-height: 0;
}

.ma-auth__panel-head {
    margin-bottom: 28px;
}

.ma-auth__panel-head h1 {
    margin: 0 0 8px;
    font-family: "Outfit", sans-serif;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.ma-auth__panel-head p {
    margin: 0;
    color: var(--ma-muted);
    font-size: 14px;
}

.ma-alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1ed;
    border: 1px solid rgba(196, 71, 47, 0.28);
    color: #8a2d1c;
    font-size: 13px;
    line-height: 1.45;
}

.ma-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    flex-shrink: 0;
}

.ma-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-ink);
}

.ma-field {
    flex-shrink: 0;
}

.ma-field input[type="email"],
.ma-field input[type="password"],
.ma-field input[type="text"] {
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid rgba(26, 20, 16, 0.2);
    border-radius: var(--ma-field-radius);
    background: #fff8f0;
    color: #1a1410;
    -webkit-text-fill-color: #1a1410;
    font: inherit;
    font-size: 16px;
    outline: none;
    opacity: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ma-field__control input {
    padding-right: 48px;
}

.ma-field input::placeholder {
    color: #9a9188;
}

.ma-field input:focus {
    border-color: var(--ma-peach-soft);
    box-shadow: 0 0 0 4px rgba(248, 160, 80, 0.16);
}

.ma-field input.is-invalid {
    border-color: var(--ma-danger);
}

.ma-field__error {
    display: block;
    margin-top: 6px;
    color: var(--ma-danger);
    font-size: 12px;
}

.ma-field__control {
    position: relative;
}

.ma-field__control input {
    padding-right: 48px;
}

.ma-toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--ma-faint);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.ma-toggle-pass:hover,
.ma-toggle-pass:focus-visible {
    color: var(--ma-peach);
}

.ma-icon-eye-off {
    display: none;
}

.ma-toggle-pass.is-visible .ma-icon-eye {
    display: none;
}

.ma-toggle-pass.is-visible .ma-icon-eye-off {
    display: block;
}

.ma-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
}

.ma-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ma-muted);
    cursor: pointer;
    user-select: none;
}

.ma-check input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--ma-line-strong);
    border-radius: 5px;
    background: var(--ma-elevated);
    display: grid;
    place-items: center;
    margin: 0;
    cursor: pointer;
}

.ma-check input:checked {
    background: var(--ma-gradient);
    border-color: transparent;
}

.ma-check input:checked::after {
    content: "";
    width: 4px;
    height: 8px;
    border: 2px solid #1a0e08;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.ma-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    min-height: 52px;
    flex-shrink: 0;
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--ma-gradient);
    color: #1a0e08;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 10px 28px rgba(240, 136, 64, 0.28);
}

.ma-btn:hover,
.ma-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.ma-btn:active {
    transform: translateY(0);
}

.ma-btn:disabled,
.ma-form.is-loading .ma-btn {
    cursor: wait;
    transform: none;
    filter: none;
    opacity: 0.86;
    pointer-events: none;
}

.ma-btn__busy,
.ma-btn__spinner {
    display: none;
}

.ma-btn__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 14, 8, 0.2);
    border-top-color: #1a0e08;
    border-radius: 50%;
    animation: ma-spin 0.7s linear infinite;
}

.ma-form.is-loading .ma-btn__label {
    display: none;
}

.ma-form.is-loading .ma-btn__busy,
.ma-form.is-loading .ma-btn__spinner {
    display: inline-flex;
}

.ma-form.is-loading input {
    cursor: wait;
}

.ma-form.is-loading .ma-toggle-pass,
.ma-form.is-loading .ma-check {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes ma-spin {
    to {
        transform: rotate(360deg);
    }
}

.ma-auth__footnote {
    margin: 28px 0 0;
    color: var(--ma-faint);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .ma-auth {
        padding: 16px;
        align-items: stretch;
        justify-content: flex-start;
    }

    .ma-auth__capsule {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: 0;
        height: auto;
        width: 100%;
        border-radius: 24px;
        overflow: hidden;
        align-content: start;
    }

    .ma-auth__brand {
        padding: 28px 24px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--ma-line);
        justify-content: flex-start;
    }

    .ma-auth__headline,
    .ma-auth__lede {
        display: none;
    }

    .ma-auth__eyebrow {
        margin: 18px 0 0;
    }

    .ma-auth__pills {
        margin-top: 16px;
    }

    .ma-auth__logo {
        width: 160px;
        max-width: 160px;
        margin-left: 0;
    }

    .ma-auth__panel {
        padding: 28px 24px 32px;
        justify-content: flex-start;
        overflow: visible;
    }
}

@media (max-width: 520px) {
    .ma-auth__pills {
        display: none;
    }

    .ma-auth__eyebrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ma-btn,
    .ma-field input {
        transition: none;
    }

    .ma-btn__spinner {
        animation: none;
        border-top-color: #1a0e08;
        opacity: 0.7;
    }
}
