:root {
    --mangoo-font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --mangoo-navy: #08152e;
    --mangoo-blue: #0d2247;
    --mangoo-cyan: #38bdf8;
    --mangoo-green: #DF6800;
    --mangoo-green-deep: #c65c00;
    --mangoo-white: #ffffff;
    --mangoo-muted: #6f7e96;
    --mangoo-shadow: 0 32px 80px rgba(7, 18, 41, 0.22);
}

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

body {
    font-family: var(--mangoo-font-family);
    background: #03112a;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mangoo-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(440px, 0.82fr);
    background:
        linear-gradient(90deg, rgba(3, 11, 30, 0.18) 0%, rgba(3, 11, 30, 0.3) 38%, rgba(3, 11, 30, 0.08) 58%, rgba(3, 11, 30, 0.28) 100%),
        url('/assets/mangoo/img/wall.webp') center center / cover no-repeat;
}

.mangoo-login-hero,
.mangoo-login-panel {
    position: relative;
    min-width: 0;
}

.mangoo-login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px 42px 36px;
    overflow: hidden;
}

.mangoo-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 26%, rgba(67, 186, 255, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(3, 10, 27, 0.08) 0%, rgba(3, 10, 27, 0.26) 100%);
    pointer-events: none;
}

.mangoo-hero-bottom {
    position: relative;
    z-index: 1;
}

.mangoo-hero-bottom {
    max-width: 520px;
    display: grid;
    gap: 18px;
    padding-bottom: 10px;
    margin: 0 auto;
    transform: translateY(42px);
}

.mangoo-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.mangoo-hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    line-height: 0.96;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-shadow: 0 10px 24px rgba(3, 11, 30, 0.28);
}

.mangoo-hero-tagline {
    margin: 14px 0 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.mangoo-hero-copy p:last-child {
    margin: 18px 0 0;
    color: rgba(239, 247, 255, 0.88);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 470px;
}

.mangoo-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 28px;
}

.mangoo-login-panel-inner {
    width: 100%;
    max-width: 630px;
    transform: translateX(-112px);
}

.mangoo-login-card {
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--mangoo-shadow);
    backdrop-filter: blur(12px);
}

.mangoo-login-copy-centered {
    text-align: center;
}

.mangoo-login-copy h3 {
    margin: 0 0 10px;
    color: #1d2431;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.35;
}

.mangoo-login-copy h3 span {
    font-weight: 700;
}

.mangoo-login-copy p {
    margin: 0;
    color: var(--mangoo-muted);
    line-height: 1.7;
}

.kt-form-label {
    color: #222a36;
    font-size: 0.97rem;
}

.mangoo-input {
    min-height: 58px;
    border-radius: 16px;
    font-size: 1rem;
    border-color: #dbe3ef;
    background: #fff;
}

.mangoo-input::placeholder {
    color: #a3afc1;
}

.mangoo-input-error {
    border-color: #f0a1a8;
    box-shadow: 0 0 0 4px rgba(255, 86, 86, 0.08);
}

.mangoo-field-error {
    margin: 0;
    color: #d84a5f;
    font-size: 0.88rem;
    font-weight: 600;
}

.mangoo-form-alert {
    border-radius: 16px;
    border: 1px solid rgba(216, 74, 95, 0.18);
    background: rgba(255, 243, 245, 0.96);
    color: #c53d56;
    padding: 14px 16px;
    font-size: 0.93rem;
    line-height: 1.5;
}

.mangoo-form-alert.is-success {
    border-color: rgba(58, 168, 98, 0.18);
    background: rgba(238, 252, 243, 0.96);
    color: #2e8551;
}

.mangoo-login-button {
    min-height: 58px;
    border-radius: 16px;
    background: var(--mangoo-green) !important;
    border-color: var(--mangoo-green) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 16px 32px rgba(223, 104, 0, 0.28);
}

.mangoo-login-button:hover {
    background: var(--mangoo-green-deep) !important;
    border-color: var(--mangoo-green-deep) !important;
}

.mangoo-login-button.is-loading,
.mangoo-login-button.is-loading:hover {
    opacity: 0.82;
    cursor: wait;
}

.mangoo-location-notice {
    margin: -2px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.mangoo-location-notice[hidden] {
    display: none;
}

.mangoo-location-notice.is-warning {
    border: 1px solid rgba(223, 104, 0, 0.2);
    background: rgba(255, 247, 239, 0.96);
    color: #c65c00;
}

.mangoo-location-notice.is-success {
    border: 1px solid rgba(36, 149, 95, 0.22);
    background: rgba(237, 252, 244, 0.96);
    color: #24955f;
}

.mangoo-login-actions {
    display: flex;
    justify-content: flex-end;
}

.mangoo-login-link {
    color: #5378aa;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.mangoo-login-link:hover {
    color: #2f66aa;
    text-decoration: underline;
}

.mangoo-verify-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.mangoo-verify-back {
    display: inline-flex;
    align-items: center;
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.92rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.mangoo-verify-card {
    max-width: 540px;
}

.mangoo-verify-title {
    font-size: 1.5rem !important;
    font-weight: 500 !important;
}

.mangoo-verify-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.mangoo-mail-card {
    position: relative;
    width: 138px;
    height: 118px;
}

.mangoo-mail-paper {
    position: absolute;
    top: 0;
    left: 24px;
    width: 74px;
    height: 54px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 26px rgba(18, 38, 63, 0.08);
}

.mangoo-mail-paper::before,
.mangoo-mail-paper::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    height: 5px;
    border-radius: 999px;
    background: #d9e4ef;
}

.mangoo-mail-paper::before {
    top: 16px;
}

.mangoo-mail-paper::after {
    top: 28px;
}

.mangoo-mail-envelope {
    position: absolute;
    left: 18px;
    top: 28px;
    width: 104px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(180deg, #97daf8 0%, #75bee7 100%);
    overflow: hidden;
}

.mangoo-mail-envelope::before,
.mangoo-mail-envelope::after {
    content: "";
    position: absolute;
    inset: 0;
}

.mangoo-mail-envelope::before {
    clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
    background: rgba(255, 255, 255, 0.28);
}

.mangoo-mail-envelope::after {
    clip-path: polygon(0 100%, 50% 52%, 100% 100%);
    background: #63afd9;
}

.mangoo-mail-flap {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 34px;
    clip-path: polygon(0 0, 50% 60%, 100% 0);
    background: #7cc8ee;
}

.mangoo-mail-badge {
    position: absolute;
    right: 8px;
    top: 14px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ff5656;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(255, 86, 86, 0.3);
}

.mangoo-verify-copy {
    text-align: center;
    color: var(--mangoo-muted);
    line-height: 1.5;
}

.mangoo-verify-copy p {
    margin: 0;
    font-size: 1rem;
}

.mangoo-verify-copy strong {
    display: block;
    margin-top: 2px;
    color: #586579;
    font-size: 1rem;
    font-weight: 700;
}

.mangoo-code-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.mangoo-code-row.is-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mangoo-code-input {
    height: 58px;
    border-radius: 14px;
    border: 1px solid #e5ecf3;
    background: #fff;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    box-shadow: 0 10px 24px rgba(18, 38, 63, 0.05);
}

.mangoo-code-input.is-active {
    border-color: #dbe4f0;
    box-shadow: inset 0 -4px 0 #2f7df6, 0 10px 24px rgba(18, 38, 63, 0.06);
}

.mangoo-verify-resend {
    margin: 0;
    text-align: center;
    color: #c0c8d4;
    font-size: 0.97rem;
}

.mangoo-login-button-disabled,
.mangoo-login-button-disabled:hover {
    background: #cfd4dc !important;
    border-color: #cfd4dc !important;
    box-shadow: none;
    cursor: not-allowed;
}

.mangoo-invite-card {
    max-width: 520px;
}

.mangoo-invite-user-chip,
.mangoo-invite-account-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #e3eaf3;
    background: #fff;
    box-shadow: 0 10px 24px rgba(18, 38, 63, 0.05);
}

.mangoo-invite-user-chip-icon,
.mangoo-invite-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #c8d7ea 0%, #b5c8e0 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    flex: 0 0 34px;
}

.mangoo-invite-user-chip span:last-child {
    color: #1f2b38;
    font-size: 0.98rem;
    font-weight: 600;
}

.mangoo-invite-form-title {
    text-align: center;
    color: #1f2b38;
    font-size: 1rem;
    font-weight: 700;
}

.mangoo-invite-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #93a1b3;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mangoo-invite-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.mangoo-invite-terms {
    margin: 0;
    color: #8a98aa;
    font-size: 0.88rem;
    line-height: 1.55;
}

.mangoo-invite-terms a {
    color: #5378aa;
    text-decoration: none;
}

.mangoo-invite-account-copy {
    display: grid;
    gap: 2px;
}

.mangoo-invite-account-copy strong {
    color: #1f2b38;
    font-size: 0.98rem;
    font-weight: 700;
}

.mangoo-invite-account-copy span {
    color: #42536a;
    font-size: 0.96rem;
}

.mangoo-password-rules {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    color: #7f8da0;
    font-size: 0.92rem;
}

.mangoo-password-rules li {
    position: relative;
    padding-left: 26px;
    line-height: 1.45;
}

.mangoo-password-rules li::before {
    content: "â—‹";
    position: absolute;
    left: 0;
    top: 0;
    color: #bcc8d8;
    font-weight: 700;
}

.mangoo-password-rules li.is-passed {
    color: #DF6800;
}

.mangoo-password-rules li.is-passed::before {
    content: "â—";
    color: #DF6800;
}

.mangoo-password-rules {
    margin: 4px 0 0;
    gap: 12px;
    color: #24955f;
}

.mangoo-password-rules li {
    padding-left: 24px;
    color: #24955f;
}

.mangoo-password-rules li::before {
    content: "";
    display: block;
    top: 0.48em;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-weight: 700;
}

.mangoo-password-rules li.is-passed {
    color: #1f9d63;
}

.mangoo-password-rules li.is-passed::before {
    content: "";
    background: currentColor;
    color: inherit;
}

@media (max-width: 1240px) {
    .mangoo-login-shell {
        grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.8fr);
    }
}

@media (max-width: 1040px) {
    .mangoo-login-shell {
        grid-template-columns: 1fr;
        background-position: 28% center;
    }

    .mangoo-login-panel {
        order: 1;
        align-items: flex-start;
        padding: 22px 18px 28px;
    }

    .mangoo-login-hero {
        order: 2;
        min-height: 360px;
        justify-content: space-between;
        padding: 28px 20px 26px;
    }

    .mangoo-hero-bottom {
        max-width: 100%;
        margin: 0;
        transform: none;
    }

    .mangoo-login-panel-inner {
        transform: none;
    }

    .mangoo-verify-topbar {
        margin-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .mangoo-login-shell {
        background-position: 24% center;
    }

    .mangoo-login-card {
        border-radius: 28px;
    }

    .mangoo-login-copy h3 {
        font-size: 1.18rem;
    }

    .mangoo-form-alert {
        font-size: 0.9rem;
    }

    .mangoo-hero-copy h1 {
        font-size: 2.5rem;
    }

    .mangoo-hero-tagline {
        font-size: 1.08rem;
    }

    .mangoo-code-row {
        gap: 8px;
    }

    .mangoo-code-row.is-five {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .mangoo-code-input {
        height: 52px;
        font-size: 1.2rem;
    }
}
