﻿/* Ranger Pro — Ultra Premium Login */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --ol-brand: #422afb;
    --ol-brand-2: #7551ff;
    --ol-brand-dark: #2d01b9;
    --ol-bg: #f4f7fe;
    --ol-surface: #ffffff;
    --ol-text: #1b2559;
    --ol-muted: #707eae;
    --ol-faint: #a3aed0;
    --ol-line: #e9edf7;
    --ol-shadow: 0 20px 50px -12px rgba(112, 144, 176, 0.22);
    --ol-font: "DM Sans", system-ui, sans-serif;
    --ol-display: "Poppins", "DM Sans", sans-serif;
    --ol-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { height: 100%; }

body.ocean-login {
    min-height: 100vh;
    font-family: var(--ol-font);
    font-size: 14px;
    color: var(--ol-text);
    background: var(--ol-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient */
.ocean-login__ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.ocean-login__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.ocean-login__glow--1 {
    width: 500px;
    height: 500px;
    background: rgba(117, 81, 255, 0.18);
    top: -200px;
    left: -100px;
}

.ocean-login__glow--2 {
    width: 400px;
    height: 400px;
    background: rgba(66, 42, 251, 0.1);
    bottom: -150px;
    right: 20%;
}

/* Layout — full viewport split */
.ocean-login__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
    animation: ol-enter 0.8s var(--ol-ease) both;
}

@keyframes ol-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── LEFT PANEL (form) ─── */
.ocean-login__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
}

.ocean-login__panel-inner {
    width: 100%;
    max-width: 400px;
    animation: ol-slide-up 0.7s var(--ol-ease) 0.1s both;
}

@keyframes ol-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ocean-login__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 48px;
    font-family: var(--ol-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ol-text);
}

.ocean-login__logo strong {
    font-weight: 700;
    color: var(--ol-brand);
}

.ocean-login__logo img {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(66, 42, 251, 0.2);
}

.ocean-login__intro {
    margin-bottom: 32px;
}

.ocean-login__intro h1 {
    font-family: var(--ol-display);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--ol-text) 0%, var(--ol-brand) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ocean-login__intro p {
    font-size: 15px;
    color: var(--ol-muted);
    line-height: 1.6;
}

.ocean-login__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid #ffccc7;
    color: #cf1322;
    font-size: 13px;
    font-weight: 500;
}

.ocean-login__alert svg { flex-shrink: 0; margin-top: 1px; }

/* Form */
.ocean-login__form { margin-bottom: 28px; }

.ol-field { margin-bottom: 20px; }

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

.ol-input {
    position: relative;
    display: flex;
    align-items: center;
}

.ol-input__icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--ol-faint);
    pointer-events: none;
    transition: color 0.2s;
}

.ol-input input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 48px;
    border: 1.5px solid var(--ol-line);
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--ol-text);
    background: var(--ol-surface);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ol-input input::placeholder {
    color: var(--ol-faint);
    font-weight: 400;
}

.ol-input input:hover {
    border-color: #d0d7e8;
}

.ol-input input:focus {
    border-color: var(--ol-brand);
    box-shadow: 0 0 0 4px rgba(66, 42, 251, 0.1);
}

.ol-input:focus-within .ol-input__icon {
    color: var(--ol-brand);
}

.ol-input__toggle {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ol-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.ol-input__toggle:hover {
    color: var(--ol-brand);
    background: rgba(66, 42, 251, 0.06);
}

.ocean-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.ol-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--ol-muted);
    user-select: none;
}

.ol-check input { position: absolute; opacity: 0; width: 0; height: 0; }

.ol-check__box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ol-line);
    border-radius: 6px;
    background: var(--ol-surface);
    transition: all 0.2s;
    flex-shrink: 0;
}

.ol-check input:checked + .ol-check__box {
    background: var(--ol-brand);
    border-color: var(--ol-brand);
}

.ol-check input:checked + .ol-check__box::after {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    margin: 2px auto 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Primary button */
.ol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s;
}

.ol-btn--primary {
    width: 100%;
    height: 52px;
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--ol-brand-2), var(--ol-brand) 50%, var(--ol-brand-dark));
    box-shadow: 0 8px 24px rgba(66, 42, 251, 0.35);
}

.ol-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(66, 42, 251, 0.42);
}

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

.ol-btn__spin {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ol-spin 0.65s linear infinite;
}

.ol-btn--primary.is-loading .ol-btn__label,
.ol-btn--primary.is-loading .ol-btn__icon { visibility: hidden; }
.ol-btn--primary.is-loading .ol-btn__spin { display: block; position: absolute; }

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

.ol-btn--demo {
    width: 100%;
    margin-top: 12px;
    height: 44px;
    background: transparent;
    color: var(--ol-brand);
    border: 1.5px dashed rgba(66, 42, 251, 0.35);
    font-size: 14px;
}

.ol-btn--demo:hover {
    background: rgba(66, 42, 251, 0.05);
    border-style: solid;
}

.ol-btn--ghost {
    background: var(--ol-bg);
    color: var(--ol-text);
    border: 1px solid var(--ol-line);
    padding: 12px 20px;
}

.ol-btn--full { width: 100%; margin-top: 10px; }

/* Divider */
.ocean-login__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ol-faint);
}

.ocean-login__divider::before,
.ocean-login__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ol-line);
}

/* Download row */
.ocean-login__download {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ol-surface);
    border: 1.5px solid var(--ol-line);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.ocean-login__download:hover {
    border-color: var(--ol-brand);
    box-shadow: 0 4px 20px rgba(66, 42, 251, 0.1);
    transform: translateY(-1px);
}

.ocean-login__download-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ol-bg);
    color: var(--ol-brand);
    flex-shrink: 0;
}

.ocean-login__download-text {
    flex: 1;
    min-width: 0;
}

.ocean-login__download-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ol-text);
}

.ocean-login__download-text small {
    font-size: 12px;
    color: var(--ol-muted);
}

.ocean-login__download-arrow {
    color: var(--ol-faint);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.ocean-login__download:hover .ocean-login__download-arrow {
    color: var(--ol-brand);
    transform: translateX(3px);
}

.ocean-login__legal {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--ol-line);
    font-size: 11px;
    font-weight: 500;
    color: var(--ol-faint);
}

/* ─── RIGHT VISUAL ─── */
.ocean-login__visual {
    position: relative;
    display: flex;
    align-items: center;
    padding: 56px 48px;
    background: linear-gradient(160deg, #868cff 0%, #7551ff 30%, #422afb 60%, #1a0a6e 100%);
    overflow: hidden;
}

.ocean-login__visual-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 80px;
    background: var(--ol-bg);
    border-top-right-radius: 100%;
}

.ocean-login__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 20%, rgba(255,255,255,0.12), transparent),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,255,255,0.06), transparent);
    pointer-events: none;
}

.ocean-login__visual-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    color: #fff;
    animation: ol-slide-up 0.8s var(--ol-ease) 0.2s both;
}

.ocean-login__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 28px;
    border-radius: 999px;
    background: rgba(1, 181, 116, 0.15);
    border: 1px solid rgba(1, 181, 116, 0.35);
    font-size: 12px;
    font-weight: 600;
}

.ocean-login__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #01b574;
    box-shadow: 0 0 10px #01b574;
    animation: ol-pulse 2s ease infinite;
}

@keyframes ol-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ocean-login__visual-title {
    font-family: var(--ol-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.ocean-login__visual-desc {
    font-size: 15px;
    line-height: 1.65;
    opacity: 0.85;
    margin-bottom: 32px;
    max-width: 400px;
}

/* Dashboard preview mock */
.ocean-login__preview {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
}

.ol-preview__bar {
    display: flex;
    gap: 6px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ol-preview__bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.ol-preview__bar span:first-child { background: #ff5f57; }
.ol-preview__bar span:nth-child(2) { background: #febc2e; }
.ol-preview__bar span:nth-child(3) { background: #28c840; }

.ol-preview__body { padding: 20px; }

.ol-preview__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.ol-preview__stat {
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
}

.ol-preview__stat small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
    margin-bottom: 4px;
}

.ol-preview__stat strong {
    font-family: var(--ol-display);
    font-size: 18px;
    font-weight: 700;
}

.ol-preview__stat--accent {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ol-preview__chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.ol-preview__bar-col {
    flex: 1;
    height: var(--h, 50%);
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.15) 100%);
    animation: ol-bar-grow 1.2s var(--ol-ease) both;
}

.ol-preview__bar-col:nth-child(1) { animation-delay: 0.3s; }
.ol-preview__bar-col:nth-child(2) { animation-delay: 0.4s; }
.ol-preview__bar-col:nth-child(3) { animation-delay: 0.5s; }
.ol-preview__bar-col:nth-child(4) { animation-delay: 0.6s; }
.ol-preview__bar-col:nth-child(5) { animation-delay: 0.7s; }
.ol-preview__bar-col:nth-child(6) { animation-delay: 0.8s; }

@keyframes ol-bar-grow {
    from { height: 0; opacity: 0; }
    to { height: var(--h); opacity: 1; }
}

.ol-preview__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ol-preview__row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.ol-preview__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ol-preview__dot--green { background: #01b574; }
.ol-preview__dot--purple { background: #c4b5fd; }
.ol-preview__dot--blue { background: #38bdf8; }

.ocean-login__pills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ocean-login__pills li {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal */
.ol-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ol-modal.open { display: flex; }

.ol-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 37, 89, 0.55);
    backdrop-filter: blur(8px);
}

.ol-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 36px 28px;
    background: var(--ol-surface);
    border-radius: 20px;
    box-shadow: var(--ol-shadow);
    text-align: center;
    animation: ol-modal-in 0.35s var(--ol-ease);
}

@keyframes ol-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: none; }
}

.ol-modal__badge {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(66, 42, 251, 0.1);
    color: var(--ol-brand);
}

.ol-modal__card h2 {
    font-family: var(--ol-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ol-modal__card p {
    font-size: 14px;
    color: var(--ol-muted);
    margin-bottom: 20px;
}

.ol-modal__key {
    display: block;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: #e6faf3;
    border: 1px solid #b7eb8f;
    color: #01b574;
    font-family: ui-monospace, monospace;
    font-size: 16px;
    font-weight: 700;
}

.ol-modal__card .ol-btn--primary {
    width: 100%;
    height: 48px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 960px) {
    .ocean-login__layout {
        grid-template-columns: 1fr;
    }

    .ocean-login__visual {
        order: -1;
        padding: 40px 28px 48px;
        min-height: auto;
    }

    .ocean-login__visual-curve { display: none; }

    .ocean-login__visual-title { font-size: 24px; }
    .ocean-login__visual-desc { font-size: 14px; margin-bottom: 20px; }

    .ocean-login__preview { margin-bottom: 16px; }
    .ocean-login__pills { display: none; }

    .ocean-login__panel {
        padding: 32px 24px 48px;
    }

    .ocean-login__logo { margin-bottom: 32px; }
    .ocean-login__intro h1 { font-size: 32px; }
}

@media (max-width: 480px) {
    .ocean-login__panel { padding: 24px 20px 40px; }
    .ocean-login__legal { flex-direction: column; gap: 6px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
