﻿
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --accent: #1a1a2e;
    --brand: #e94560;
    --text: #1a1a2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --input-bg: #f9fafb;
    --shadow: 0 20px 60px rgba(0,0,0,.12);
    --font: 'Segoe UI', system-ui, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .18;
    z-index: 0;
    animation: floatBlob 8s ease-in-out infinite;
}

    .bg-blob:nth-child(1) {
        width: 500px;
        height: 500px;
        background: #e94560;
        top: -120px;
        left: -120px;
        animation-delay: 0s;
    }

    .bg-blob:nth-child(2) {
        width: 400px;
        height: 400px;
        background: #1a1a2e;
        bottom: -100px;
        right: -100px;
        animation-delay: 3s;
    }

    .bg-blob:nth-child(3) {
        width: 300px;
        height: 300px;
        background: #e94560;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        animation-delay: 6s;
    }

@keyframes floatBlob {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

.bg-blob:nth-child(3) {
    animation: floatBlob3 8s ease-in-out infinite 6s;
}

@keyframes floatBlob3 {
    0%, 100% {
        transform: translate(-50%,-50%) scale(1);
    }

    50% {
        transform: translate(-50%,-55%) scale(1.05);
    }
}

/* ── Page card ── */
.page {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 580px;
}

/* ── Left panel ── */
.left {
    background: linear-gradient(145deg,#1a1a2e 0%,#16213e 60%,#0f3460 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .left::before {
        content: '';
        position: absolute;
        inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    }

.left-inner {
    position: relative;
    z-index: 1;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(233,69,96,.15);
    border: 1px solid rgba(233,69,96,.3);
    border-radius: 100px;
    padding: 6px 14px;
    color: #e94560;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    margin-bottom: 32px;
    width: fit-content;
}

.left h1 {
    font-size: clamp(26px,3.5vw,38px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}

    .left h1 span {
        color: #e94560;
    }

.left p {
    color: rgba(255,255,255,.55);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feat {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.7);
    font-size: 14px;
}

.feat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(233,69,96,.15);
    border: 1px solid rgba(233,69,96,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e94560;
    font-size: 14px;
    flex-shrink: 0;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.06);
}

    .deco-circle:nth-child(1) {
        width: 280px;
        height: 280px;
        bottom: -80px;
        right: -80px;
    }

    .deco-circle:nth-child(2) {
        width: 180px;
        height: 180px;
        bottom: -20px;
        right: -20px;
    }

/* ── Right panel ── */
.right {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-wrap {
    text-align: center;
    margin-bottom: 28px;
}

    .logo-wrap img {
        max-width: 160px;
        height: auto;
        object-fit: contain;
    }

.right h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
    margin-bottom: 6px;
}

.right .sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Float-label inputs */
.field {
    position: relative;
    margin-bottom: 18px;
}

    .field input {
        width: 100%;
        height: 52px;
        background: var(--input-bg);
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 20px 16px 8px;
        font-size: 14px;
        color: var(--text);
        outline: none;
        transition: border-color .2s, box-shadow .2s, background .2s;
        font-family: var(--font);
    }

        .field input:focus {
            border-color: #1a1a2e;
            box-shadow: 0 0 0 3px rgba(26,26,46,.08);
            background: #fff;
        }

        .field input::placeholder {
            color: transparent;
        }

        .field input[type="password"],
        .field input[name="password"] {
            padding-right: 44px;
        }

    .field label {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: var(--muted);
        pointer-events: none;
        transition: all .18s ease;
        font-family: var(--font);
    }

    .field input:focus ~ label,
    .field input:not(:placeholder-shown) ~ label {
        top: 12px;
        transform: none;
        font-size: 11px;
        font-weight: 600;
        color: #e94560;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .field .eye {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        cursor: pointer;
        font-size: 15px;
        transition: color .15s;
    }

        .field .eye:hover {
            color: var(--text);
        }

    /* Fix for browser autofill - label stays on top when autofilled */
    .field input:-webkit-autofill ~ label,
    .field input:-webkit-autofill:hover ~ label,
    .field input:-webkit-autofill:focus ~ label,
    .field input:-webkit-autofill:active ~ label {
        top: 12px;
        transform: none;
        font-size: 11px;
        font-weight: 600;
        color: #e94560;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    /* Remove browser autofill background tint */
    .field input:-webkit-autofill,
    .field input:-webkit-autofill:hover,
    .field input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0px 1000px #f9fafb inset;
        -webkit-text-fill-color: #1a1a2e;
        transition: background-color 5000s ease-in-out 0s;
    }

.row-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

    .check-label input[type=checkbox] {
        width: 16px;
        height: 16px;
        accent-color: #e94560;
        cursor: pointer;
    }

.forgot {
    font-size: 13px;
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
}

    .forgot:hover {
        text-decoration: underline;
    }

.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg,#1a1a2e,#e94560);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(233,69,96,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font);
}

    .btn-login:hover {
        opacity: .92;
        transform: translateY(-1px);
        box-shadow: 0 8px 28px rgba(233,69,96,.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

.secure {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .secure i {
        color: #10b981;
    }

/* ── Toast ── */
#toast-root {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 360px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.14);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-left: 4px solid #10b981;
    animation: toastIn .3s ease;
    pointer-events: all;
    position: relative;
}

    .toast.error {
        border-left-color: #e94560;
    }

    .toast.warning {
        border-left-color: #f59e0b;
    }

    .toast.info {
        border-left-color: #3b82f6;
    }

@keyframes toastIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.toast.hide {
    animation: toastOut .3s ease forwards;
}

.toast-icon {
    font-size: 18px;
    margin-top: 1px;
    flex-shrink: 0;
}

.toast:not(.error):not(.warning):not(.info) .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #e94560;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 15px;
    padding: 0;
    line-height: 1;
    margin-top: 1px;
}

    .toast-close:hover {
        color: #111;
    }

.toast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 0 12px;
    animation: shrinkBar 2.5s linear forwards;
}

.toast:not(.error):not(.warning):not(.info) .toast-bar {
    color: #10b981;
}

.toast.error .toast-bar {
    color: #e94560;
}

.toast.warning .toast-bar {
    color: #f59e0b;
}

.toast.info .toast-bar {
    color: #3b82f6;
}

@keyframes shrinkBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .page {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .left {
        display: none;
    }

    .right {
        padding: 36px 24px;
    }
}

@media (max-width: 400px) {
    .right {
        padding: 28px 18px;
    }

        .right h2 {
            font-size: 22px;
        }

    #toast-root {
        left: 12px;
        right: 12px;
    }

    .toast {
        min-width: unset;
        width: 100%;
    }
}

