:root {
    --primary: #1fc9b3;
    --primary-dark: #0d8f82;
    --primary-light: #a6f5ea;
    --dark: #061d1e;
    --dark-2: #092728;
    --text: #183231;
    --muted: #748887;
    --white: #ffffff;
    --bg: #f5faf9;
    --border: rgba(10, 71, 68, .12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, .95fr);
    background: white;
}

.visual-side {
    position: relative;
    min-height: 100vh;
    padding: clamp(28px, 4vw, 48px) clamp(28px, 4.5vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(20px, 3vh, 36px);
    overflow: hidden;
    color: white;
    background:
        radial-gradient(
            circle at 18% 18%,
            rgba(31,201,179,.17),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(169,221,121,.10),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #041719,
            #082627 50%,
            #0a3634
        );
}

.visual-side::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .10;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.glow {
    position: absolute;
    width: 450px;
    height: 450px;
    right: -160px;
    top: 150px;
    border-radius: 50%;
    background: rgba(31,201,179,.14);
    filter: blur(110px);
}

.logo {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    font-family: "Manrope", sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #05332e;
    background: linear-gradient(135deg, #9ef3e7, var(--primary));
    box-shadow: 0 12px 28px rgba(31,201,179,.17);
}

.logo span {
    color: #78e8d8;
}

.visual-content {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: clamp(14px, 2vh, 22px);
    width: fit-content;
    border-radius: 100px;
    color: #8ce8db;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
    font-size: clamp(11px, 1.1vw, 12px);
    font-weight: 700;
}

.visual-content h1 {
    max-width: 100%;
    font-family: "Manrope", sans-serif;
    font-size: clamp(32px, 3.6vw, 54px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -2.2px;
}

.gradient-text {
    background: linear-gradient(90deg, #82ebdd, #4bd5ba, #a7dd78);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.visual-description {
    max-width: 92%;
    margin-top: clamp(12px, 1.8vh, 20px);
    color: rgba(232,246,244,.59);
    font-size: clamp(14px, 1.15vw, 16px);
    line-height: 1.75;
}

.preview-card {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: min(42vh, 360px);
    margin-top: clamp(18px, 2.8vh, 28px);
    border-radius: clamp(16px, 2vw, 24px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 30px 70px rgba(0,0,0,.28);
    flex-shrink: 1;
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4,28,29,.60), transparent 60%);
}

.preview-top {
    position: absolute;
    z-index: 3;
    top: 14px;
    left: 14px;
    right: 14px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 0 13px;
    border-radius: 11px;
    color: white;
    background: rgba(5,29,30,.73);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.09);
}

.preview-project {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 600;
}

.preview-project i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #05322e;
    background: var(--primary);
}

.preview-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #85eadb;
    font-size: 10px;
    font-weight: 700;
}

.preview-bottom {
    position: absolute;
    z-index: 3;
    left: 17px;
    right: 17px;
    bottom: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.preview-bottom small {
    display: block;
    color: rgba(255,255,255,.55);
    font-size: 9px;
}

.preview-bottom strong {
    display: block;
    margin-top: 3px;
    font-size: 13px;
}

.preview-tag {
    padding: 8px 10px;
    border-radius: 9px;
    color: #78e6d6;
    background: rgba(6,37,38,.68);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    font-size: 9px;
    font-weight: 800;
}

.feature-row {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(14px, 2vh, 22px);
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #b8ebe3;
    font-size: clamp(11px, 1.05vw, 12px);
    font-weight: 700;
}

.feature-chip i {
    color: var(--primary);
    font-size: 11px;
}

.visual-footer {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255,255,255,.32);
    font-size: 10px;
}

.visual-footer-links {
    display: flex;
    gap: 17px;
}

.visual-footer a:hover {
    color: #73e5d4;
}

.form-side {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px;
    background: linear-gradient(180deg, #ffffff, #f8fbfa);
}

.form-side::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 330px;
    height: 330px;
    background: radial-gradient(circle, rgba(31,201,179,.065), transparent 68%);
}

.form-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
}

.mobile-logo {
    display: none;
    margin-bottom: 40px;
    color: var(--dark);
}

.mobile-logo span {
    color: var(--primary-dark);
}

.form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.form-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(31,201,179,.09);
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-family: "Manrope", sans-serif;
    font-size: 37px;
    line-height: 1.15;
    letter-spacing: -1.8px;
    color: var(--dark);
}

.form-header p {
    margin-top: 11px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.login-form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    color: #294746;
    font-size: 13px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    display: grid;
    place-items: center;
    color: #95a5a4;
    font-size: 13px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 56px;
    padding: 0 49px 0 47px;
    border-radius: 13px;
    outline: 0;
    border: 1px solid var(--border);
    background: white;
    color: var(--dark);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.form-input::placeholder {
    color: #a8b5b4;
}

.form-input:focus {
    border-color: rgba(31,201,179,.68);
    box-shadow: 0 0 0 4px rgba(31,201,179,.08);
}

.input-wrap:focus-within .input-icon {
    color: var(--primary-dark);
}

.password-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #849795;
    background: transparent;
    transition: .2s;
}

.password-toggle:hover {
    color: var(--primary-dark);
    background: #eff9f7;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #647977;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.remember input {
    display: none;
}

.checkbox {
    width: 19px;
    height: 19px;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 5px;
    border: 1px solid rgba(10,80,75,.18);
    background: white;
}

.checkbox::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 8px;
    opacity: 0;
}

.remember input:checked + .checkbox {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.remember input:checked + .checkbox::after {
    opacity: 1;
}

.forgot {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.forgot:hover {
    text-decoration: underline;
}

.submit-btn {
    position: relative;
    width: 100%;
    height: 56px;
    margin-top: 3px;
    border: 0;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #06332e;
    background: linear-gradient(135deg, #8ef0e3, var(--primary));
    box-shadow: 0 16px 35px rgba(31,201,179,.18);
    font-size: 14px;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(31,201,179,.25);
}

.submit-btn.loading {
    pointer-events: none;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-arrow {
    opacity: 0;
}

.spinner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(5,50,46,.22);
    border-top-color: #06332e;
    opacity: 0;
    animation: spin .7s linear infinite;
}

.submit-btn.loading .spinner {
    opacity: 1;
}

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

.support-box {
    margin-top: 28px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 13px;
    background: #f0f9f7;
    border: 1px solid rgba(31,201,179,.10);
}

.support-icon {
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: white;
    color: var(--primary-dark);
    font-size: 13px;
}

.support-content {
    flex: 1;
}

.support-content strong {
    display: block;
    font-size: 11px;
}

.support-content span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.support-box > i {
    color: var(--primary-dark);
    font-size: 10px;
}

.form-footer {
    margin-top: 30px;
    text-align: center;
    color: #9ba8a7;
    font-size: 10px;
    line-height: 1.7;
}

.back-login {
    margin-top: 22px;
    text-align: center;
}

.back-login a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.kx-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 99999;
    max-width: min(92vw, 520px);
    padding: 14px 18px;
    border-radius: 14px;
    background: #061d1e;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0,0,0,.28);
    transform: translate(-50%, 24px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}

.kx-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.kx-toast.is-success {
    background: #0b3938;
    border: 1px solid rgba(31, 201, 179, .55);
    color: #e7f5f4;
}

.kx-toast.is-error {
    background: #7a2222;
    border: 1px solid rgba(255, 140, 140, .55);
    color: #fff5f5;
}

.kx-toast[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .page {
        display: block;
    }

    .visual-side {
        display: none;
    }

    .form-side {
        min-height: 100vh;
        padding: 30px 24px;
        align-items: flex-start;
    }

    .form-container {
        max-width: 500px;
        margin: auto;
        padding-top: 24px;
    }
}

@media (max-width: 480px) {
    .form-side {
        padding: 22px 17px;
    }

    .form-header h2 {
        font-size: 32px;
    }

    .form-input {
        font-size: 16px;
    }

    .form-options {
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .form-options {
        flex-direction: column;
    }
}
