/*
 * Construct Clean Client Portal — Login Page Stylesheet  (Phase 5A rev 2)
 *
 * Brand tokens
 *   Primary blue   : #1F3CA8
 *   Accent yellow  : #FED701
 *   Dark navy      : #172050
 *   Text dark      : #0F1F4B
 *   Text muted     : #6B7A99
 *   Input border   : #D8DFF0
 *   Input bg       : #FFFFFF
 *   Page bg right  : #FFFFFF
 *
 * Layout model (desktop ≥ 1024px)
 *   .cccp-login-wrap is a full-viewport flex row.
 *   .cccp-login-panel-left   — 48 % — dark navy hero panel
 *   .cccp-login-panel-right  — 52 % — white form panel
 *
 * Tablet  768–1023px : narrower split (40 / 60)
 * Mobile  ≤ 767px    : single-column, left panel hidden
 */

/* ═══════════════════════════════════════════════════════════════════════════
   BASE RESET (scoped to plugin wrapper)
══════════════════════════════════════════════════════════════════════════ */

.cccp-login-wrap *,
.cccp-login-wrap *::before,
.cccp-login-wrap *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OUTER WRAPPER — full-viewport split row
══════════════════════════════════════════════════════════════════════════ */

.cccp-login-wrap {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    background: #1F3CA8;  /* fallback while panels load */
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEFT PANEL — dark navy hero
══════════════════════════════════════════════════════════════════════════ */

.cccp-login-panel-left {
    flex: 0 0 48%;
    background: #172050;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px 56px;
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

/* subtle radial glow top-right */
.cccp-login-panel-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(254,215,1,.07) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Left panel: top brand row ────────────────────────────────────────── */

.cccp-left-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cccp-left-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255,255,255,.10);
    padding: 6px;
    flex-shrink: 0;
}

.cccp-left-brand-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.cccp-left-brand-text span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    letter-spacing: .04em;
}

/* ── Left panel: hero body ────────────────────────────────────────────── */

.cccp-left-hero {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.cccp-left-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 6px 16px 6px 8px;
    width: fit-content;
}

.cccp-left-badge-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.40);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cccp-left-badge-dot::after {
    content: '';
    width: 7px;
    height: 7px;
    background: #FED701;
    border-radius: 50%;
}

.cccp-left-badge-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .10em;
    color: #FED701;
    text-transform: uppercase;
}

.cccp-left-headline {
    font-size: clamp(32px, 3.2vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0;
    color: #ffffff;
}

.cccp-left-headline em {
    font-style: normal;
    color: #FED701;
}

.cccp-left-body {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255,255,255,.72);
    margin: 0;
    max-width: 380px;
}

.cccp-left-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cccp-left-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,.82);
    font-weight: 500;
}

.cccp-feature-icon {
    flex-shrink: 0;
    color: #FED701;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHT PANEL — white form area
══════════════════════════════════════════════════════════════════════════ */

.cccp-login-panel-right {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    min-height: 100vh;
}

/* ── Right panel: inner content column ────────────────────────────────── */

.cccp-login-content {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Right panel: brand row above form ────────────────────────────────── */

.cccp-right-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.cccp-right-logo {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: contain;
    background: #f0f4ff;
    padding: 5px;
    flex-shrink: 0;
}

.cccp-right-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #1F3CA8;
    line-height: 1.2;
    display: block;
}

.cccp-right-brand-sub {
    font-size: 10.5px;
    color: #9aa8c0;
    font-weight: 500;
    letter-spacing: .05em;
    display: block;
    margin-top: 2px;
}

/* ── Subtitle ─────────────────────────────────────────────────────────── */

.cccp-login-subtitle {
    font-size: 15px;
    color: #6B7A99;
    margin: 0 0 28px;
    font-weight: 400;
}

/* ── Form card ────────────────────────────────────────────────────────── */

.cccp-login-card {
    background: #ffffff;
    border: 1px solid #e4e9f2;
    border-radius: 16px;
    box-shadow: 0 2px 24px rgba(31, 60, 168, .07);
    padding: 36px 36px 32px;
    width: 100%;
}

/* ── Error alert ──────────────────────────────────────────────────────── */

.cccp-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fffbf0;
    border: 1px solid rgba(254,215,1,.4);
    border-left: 4px solid #e6b800;
    border-radius: 8px;
    color: #7a5c00;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    margin-bottom: 20px;
}

/* ── Form layout ──────────────────────────────────────────────────────── */

.cccp-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cccp-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cccp-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #0F1F4B;
}

/* ── Input wrapper ────────────────────────────────────────────────────── */

.cccp-field-wrap {
    position: relative;
}

.cccp-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #D8DFF0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0F1F4B;
    background: #ffffff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
    appearance: none;
}

.cccp-input::placeholder {
    color: #b0bcd4;
}

.cccp-input:focus {
    border-color: #1F3CA8;
    box-shadow: 0 0 0 3px rgba(31, 60, 168, .10);
}

/* Password input — extra right padding for the toggle button */
.cccp-pwd-input {
    padding-right: 48px;
}

/* ── Password show/hide toggle ────────────────────────────────────────── */

.cccp-pwd-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9aa8c0;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color .15s ease;
    /* prevent toggle from submitting the form */
    type: button;
}

.cccp-pwd-toggle:hover {
    color: #1F3CA8;
}

.cccp-pwd-toggle:focus-visible {
    outline: 2px solid #FED701;
    outline-offset: 2px;
    border-radius: 4px;
}

/* eye-hide SVG hidden by default; JS swaps visibility */
.cccp-eye-hide {
    display: none;
}

/* ── Remember me ──────────────────────────────────────────────────────── */

.cccp-remember-row {
    margin-top: -4px;
}

.cccp-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #6B7A99;
    font-weight: 500;
    user-select: none;
}

.cccp-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #1F3CA8;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Submit button — yellow bg, blue text ─────────────────────────────── */

.cccp-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #1F3CA8;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 4px;
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
    box-shadow: 0 2px 14px rgba(31, 60, 168, .28);
    letter-spacing: .01em;
}

.cccp-login-btn:hover {
    background: #162d87;
    box-shadow: 0 4px 20px rgba(31, 60, 168, .38);
    transform: translateY(-1px);
}

.cccp-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(31, 60, 168, .22);
}

.cccp-login-btn:focus-visible {
    outline: 3px solid #FED701;
    outline-offset: 2px;
}

/* ── Forgot password link ─────────────────────────────────────────────── */

.cccp-login-footer {
    margin-top: 18px;
    font-size: 13px;
    text-align: left;
}

.cccp-forgot-link {
    color: #6B7A99;
    text-decoration: none;
    font-weight: 400;
    transition: color .15s ease;
}

.cccp-forgot-link:hover {
    color: #1F3CA8;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET  768px – 1023px  (narrower split 40 / 60)
══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) and (max-width: 1023px) {

    .cccp-login-panel-left {
        flex: 0 0 40%;
        padding: 40px 36px 48px;
    }

    .cccp-left-headline {
        font-size: 28px;
    }

    .cccp-left-body {
        font-size: 14px;
    }

    .cccp-login-panel-right {
        padding: 48px 36px;
    }

    .cccp-login-card {
        padding: 28px 28px 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE  ≤ 767px  (single column, hero panel hidden)
══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

    .cccp-login-wrap {
        flex-direction: column;
        background: #ffffff;
        min-height: 100dvh;
    }

    /* Hide the hero panel entirely on mobile */
    .cccp-login-panel-left {
        display: none;
    }

    .cccp-login-panel-right {
        flex: 1;
        justify-content: flex-start;
        padding: 32px 20px 40px;
        min-height: 100dvh;
        align-items: stretch;
    }

    .cccp-login-content {
        max-width: 100%;
    }

    .cccp-right-brand {
        justify-content: center;
        margin-bottom: 24px;
    }

    .cccp-right-brand-name,
    .cccp-right-brand-sub {
        text-align: center;
    }

    .cccp-login-subtitle {
        text-align: center;
        font-size: 14px;
    }

    .cccp-login-card {
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: transparent;
    }

    .cccp-input {
        font-size: 16px;   /* prevents iOS auto-zoom */
        padding: 13px 16px;
    }

    .cccp-pwd-input {
        padding-right: 48px;
    }

    .cccp-login-btn {
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 12px;
    }

    .cccp-login-footer {
        text-align: center;
    }
}
