/* ==========================================================================
   CruisePay Bank — sign-in / activation screens.
   Visual only: shared by auth/admin-login, auth/merchant-login,
   auth/activate-password and auth/activation-expired.
   ========================================================================== */

:root {
    --cp-blue: #2563eb;
    --cp-blue-hover: #1d4ed8;
    --cp-blue-1: #1d4ed8;
    --cp-blue-2: #3b82f6;
    --cp-blue-3: #7fb2ff;
    --cp-navy: #0b1e4b;
    --cp-navy-2: #0a1a43;
    --cp-navy-3: #071433;
    --cp-canvas: #eef3fb;
    --cp-text: #0b1838;
    --cp-muted: #5f6e8f;          /* #6b7a99 darkened slightly so small text passes AA on the canvas */
    --cp-border: #e3eaf6;
    --cp-input-border: #dbe4f3;
    --cp-success: #16a34a;
    --cp-danger: #e11d48;
    --cp-ring: rgba(37, 99, 235, .16);
    --cp-shadow: 0 12px 32px -18px rgba(23, 56, 138, .22);
    --cp-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--cp-font);
    background: var(--cp-canvas);
    color: var(--cp-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Split layout ---------- */
.page-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.left-pane {
    flex: 1 1 52%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 16px 20px;
    background:
        radial-gradient(60% 40% at 0% 0%, rgba(59, 130, 246, .10) 0%, rgba(59, 130, 246, 0) 70%),
        var(--cp-canvas);
}

.right-pane {
    display: none;
}

@media (min-width: 576px) {
    .left-pane { padding: 32px 40px 24px; }
}

@media (min-width: 992px) {
    .left-pane { padding: 36px 56px 28px; }
    .right-pane {
        display: flex;
        flex: 1 1 48%;
        min-width: 0;
        margin: 16px 16px 16px 0;
        border-radius: 28px;
        position: relative;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        padding: 48px 40px;
        color: #fff;
        background:
            radial-gradient(42% 38% at 82% 12%, rgba(127, 178, 255, .38) 0%, rgba(127, 178, 255, 0) 70%),
            radial-gradient(48% 42% at 10% 92%, rgba(59, 130, 246, .40) 0%, rgba(59, 130, 246, 0) 70%),
            radial-gradient(30% 26% at 55% 52%, rgba(37, 99, 235, .22) 0%, rgba(37, 99, 235, 0) 70%),
            linear-gradient(160deg, var(--cp-navy) 0%, var(--cp-navy-2) 45%, var(--cp-navy-3) 100%);
    }
    .right-pane::before {
        /* faint grid texture */
        content: '';
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
        background-size: 44px 44px;
        -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
                mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
        pointer-events: none;
    }
}

@media (min-width: 1400px) {
    .left-pane { padding-left: 88px; padding-right: 88px; }
}

/* ---------- Brand ---------- */
.cp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cp-navy);
    text-decoration: none;
}
.cp-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: none;
}
.cp-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.02;
    letter-spacing: -.01em;
}
.cp-brand-text b { font-weight: 800; font-size: 18px; color: var(--cp-navy); }
.cp-brand-text span { font-weight: 700; font-size: 14px; color: var(--cp-blue); }

.cp-auth-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cp-secure-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cp-muted);
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: 999px;
    padding: 6px 12px;
    white-space: nowrap;
}
.cp-secure-tag i { color: var(--cp-success); }
@media (max-width: 400px) { .cp-secure-tag { display: none; } }

.cp-auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 0;
}

.cp-auth-foot {
    text-align: center;
    font-size: 12.5px;
    color: var(--cp-muted);
}

/* ---------- Form column ---------- */
.form-card {
    width: 100%;
    max-width: 440px;
    transition: max-width .35s cubic-bezier(.16, 1, .3, 1);
}

/* Section switching used by the admin login script */
.form-section {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1);
}
.form-section.active { display: block; }
.form-section.fade-in { opacity: 1; transform: translateY(0); }

.cp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cp-blue-hover);
    background: rgba(37, 99, 235, .09);
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 14px;
}

.form-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: var(--cp-text);
    margin: 0 0 8px;
}
.form-subtitle {
    font-size: 15px;
    color: var(--cp-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}
@media (max-width: 575.98px) {
    .form-title { font-size: 26px; }
}

.cp-panel {
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: 20px;
    box-shadow: var(--cp-shadow);
    padding: 28px;
}
@media (max-width: 575.98px) {
    .cp-panel { padding: 22px 18px; }
}

/* ---------- Fields ---------- */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cp-text);
    margin-bottom: 7px;
}

.form-control {
    height: 50px;
    background: #fff;
    border: 1px solid var(--cp-input-border);
    border-radius: 12px;
    color: var(--cp-text);
    font-size: 15px;
    padding: 0 16px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.form-control::placeholder { color: #8a97b3; opacity: 1; }
.form-control:hover { border-color: #c5d3ea; }
.form-control:focus {
    background: #fff;
    color: var(--cp-text);
    border-color: var(--cp-blue);
    box-shadow: 0 0 0 4px var(--cp-ring);
    outline: 0;
}
.form-control.is-invalid,
.form-control.is-invalid:hover { border-color: var(--cp-danger); background-image: none; padding-right: 16px; }
.form-control.is-invalid:focus { border-color: var(--cp-danger); box-shadow: 0 0 0 4px rgba(225, 29, 72, .14); }

.password-container { position: relative; }
.form-control.password-input,
.form-control.password-input.is-invalid { padding-right: 52px; }

.password-toggle-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 0 12px 12px 0;
    color: #7a88a6;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    transition: color .2s ease;
}
.password-toggle-btn:hover { color: var(--cp-blue); }
.password-toggle-btn:focus-visible {
    outline: 2px solid var(--cp-blue);
    outline-offset: -4px;
    color: var(--cp-blue);
}

.invalid-feedback,
.error-text {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cp-danger);
}

.cp-hint {
    font-size: 12.5px;
    color: var(--cp-muted);
    margin: -6px 0 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Buttons & links ---------- */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 20px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cp-blue-2) 0%, var(--cp-blue) 50%, var(--cp-blue-1) 100%);
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .005em;
    text-decoration: none;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .65), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    cursor: pointer;
}
.btn-submit:hover,
.btn.btn-submit:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--cp-blue) 0%, var(--cp-blue-hover) 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -12px rgba(29, 78, 216, .7);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:focus-visible,
.btn.btn-submit:focus-visible {
    color: #fff;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .3), 0 10px 22px -10px rgba(37, 99, 235, .65);
}

.form-link, a.form-link {
    color: var(--cp-blue);
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}
.form-link:hover { color: var(--cp-blue-hover); text-decoration: underline; }
.form-link:focus-visible { outline: 2px solid var(--cp-blue); outline-offset: 2px; }

.form-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--cp-muted);
}
.form-footer:empty,
.form-footer:not(:has(a)) { display: none; }

/* ---------- Alerts ---------- */
.alert {
    border-radius: 12px;
    font-size: 14px;
    padding: 12px 14px;
    margin-bottom: 18px;
    line-height: 1.45;
}
.alert-dismissible { padding-right: 44px; }
.alert-dismissible .btn-close { padding: 15px 14px; font-size: 11px; }
.alert-danger  { background: #fff1f3; border: 1px solid #fecdd6; color: #9f1239; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.btn-close-white { filter: none; }

/* ==========================================================================
   Right showcase panel
   ========================================================================== */
.cp-showcase {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
}

.cp-fx-stage {
    position: relative;
    height: 330px;
    margin: 0 auto 44px;
    max-width: 460px;
}

/* balances panel (glass) */
.cp-fx-balances {
    position: absolute;
    left: 0;
    top: 0;
    width: 245px;
    padding: 16px 16px 6px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .6);
    color: #fff;
}
.cp-fx-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cp-fx-head span { font-weight: 700; font-size: 14px; }
.cp-fx-head em { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .1); padding: 3px 9px; border-radius: 99px; }
.cp-fx-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.cp-fx-row img { width: 28px; height: 28px; border-radius: 50%; flex: none; background: #fff; }
.cp-fx-row .cur { display: flex; flex-direction: column; line-height: 1.15; }
.cp-fx-row .cur b { font-size: 13.5px; }
.cp-fx-row .cur small { font-size: 11px; color: rgba(255, 255, 255, .6); }
.cp-fx-row .amt { margin-left: auto; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* exchange widget (white) */
.cp-fx-exchange {
    position: absolute;
    right: 0;
    top: 46px;
    width: 205px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    color: var(--cp-text);
    box-shadow: 0 26px 50px -22px rgba(3, 10, 40, .75);
    animation: cp-float 6s ease-in-out infinite;
}
.cp-fx-ex-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin-bottom: 12px; }
.cp-fx-ex-title i { width: 26px; height: 26px; border-radius: 8px; background: #eaf1ff; color: var(--cp-blue); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.cp-fx-leg { background: #f6f8fc; border: 1px solid #e6ecf5; border-radius: 12px; padding: 8px 10px; }
.cp-fx-leg small { display: block; font-size: 10.5px; color: var(--cp-muted); font-weight: 600; }
.cp-fx-leg div { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.cp-fx-leg b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cp-fx-leg span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.cp-fx-leg img { width: 18px; height: 18px; border-radius: 50%; }
.cp-fx-swap { display: flex; justify-content: center; margin: -6px 0; position: relative; z-index: 1; }
.cp-fx-swap i { width: 26px; height: 26px; border-radius: 50%; background: var(--cp-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; border: 3px solid #fff; }
.cp-fx-rate { margin-top: 10px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--cp-muted); }

/* deposit notice (white chip) */
.cp-fx-deposit {
    position: absolute;
    left: 24px;
    bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 16px;
    background: #fff;
    color: var(--cp-text);
    box-shadow: 0 22px 40px -20px rgba(3, 10, 40, .7);
    animation: cp-float 7s ease-in-out infinite reverse;
}
.cp-fx-dep-ic { width: 36px; height: 36px; border-radius: 11px; background: #e7f7ee; color: var(--cp-success); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.cp-fx-deposit small { display: block; font-size: 11px; color: var(--cp-muted); font-weight: 600; }
.cp-fx-deposit strong { font-size: 15px; font-weight: 800; color: var(--cp-success); font-variant-numeric: tabular-nums; }

.cp-tagline-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cp-blue-3);
    margin-bottom: 10px;
}
.cp-tagline {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    margin: 0 0 12px;
    color: #fff;
}
.cp-tagline-sub {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .74);
    margin: 0 0 26px;
}
.cp-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.cp-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}
.cp-features .cp-feature-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--cp-blue-2) 0%, var(--cp-blue-1) 100%);
    box-shadow: 0 8px 18px -8px rgba(59, 130, 246, .8);
}
.cp-features b { display: block; font-size: 14.5px; font-weight: 700; color: #fff; }
.cp-features span { display: block; font-size: 13px; color: rgba(255, 255, 255, .68); margin-top: 1px; }

@media (min-width: 992px) and (max-width: 1199.98px) {
    .cp-tagline { font-size: 28px; }
    .cp-fx-stage { transform: scale(.9); transform-origin: top center; margin-bottom: 20px; }
}

@keyframes cp-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}
@media (prefers-reduced-motion: reduce) {
    .cp-fx-exchange, .cp-fx-deposit { animation: none; }
    .form-section, .btn-submit { transition: none; }
}

/* ==========================================================================
   Centered status layout (activation expired)
   ========================================================================== */
.cp-center-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 32px 16px;
    background:
        radial-gradient(50% 40% at 50% 0%, rgba(59, 130, 246, .14) 0%, rgba(59, 130, 246, 0) 70%),
        var(--cp-canvas);
}
.cp-status-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: 20px;
    box-shadow: var(--cp-shadow);
    padding: 40px 32px 32px;
    text-align: center;
}
@media (max-width: 575.98px) { .cp-status-card { padding: 32px 20px 24px; } }
.cp-status-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 34px;
    color: var(--cp-blue);
    background: linear-gradient(135deg, rgba(127, 178, 255, .28) 0%, rgba(37, 99, 235, .12) 100%);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .14);
}
.cp-status-card .form-title { font-size: 24px; }
.cp-status-card h3 {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--cp-muted);
    margin: 0 0 6px;
}
.cp-status-card h3:first-of-type { color: var(--cp-text); font-weight: 600; }
.cp-status-card .btn-submit { margin-top: 26px; }

/* Full CruisePay wordmark (dark lettering for the light canvas). */
.cp-brand img.cp-brand-logo { width: auto; height: 40px; max-width: 200px; border-radius: 0; box-shadow: none; filter: none; object-fit: contain; }
@media (max-width: 575.98px) { .cp-brand img.cp-brand-logo { height: 34px; } }

/* ==========================================================================
   Desktop sign-in pages fit the window: no page scroll. The showcase panel
   scales down on shorter screens; the form column scrolls on its own only if
   it really has to (e.g. a very short window with several error messages).
   ========================================================================== */
@media (min-width: 992px) {
    .page-container { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
    .left-pane { overflow-y: auto; scrollbar-width: thin; }
    .right-pane { padding-top: 24px; padding-bottom: 24px; }
    .cp-showcase { transform-origin: center center; }
}
@media (min-width: 992px) and (max-height: 960px) { .cp-showcase { transform: scale(.92); } }
@media (min-width: 992px) and (max-height: 880px) { .cp-showcase { transform: scale(.84); } }
@media (min-width: 992px) and (max-height: 800px) { .cp-showcase { transform: scale(.76); } }
@media (min-width: 992px) and (max-height: 730px) { .cp-showcase { transform: scale(.68); } }
@media (min-width: 992px) and (max-height: 660px) { .cp-showcase { transform: scale(.6); } }
@media (min-width: 992px) and (max-height: 600px) { .cp-showcase { transform: scale(.52); } }
