/* Kasaloma CRM — SaaS Login */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.kcrm-login-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    color: #0f172a;
    background:
        radial-gradient(circle at top left, rgba(30,45,90,.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(233,88,75,.12), transparent 22%),
        linear-gradient(135deg, #f8fbff 0%, #eef4ff 55%, #f9fbfd 100%);
}

a { text-decoration: none; }

.kcrm-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr minmax(420px, 520px);
}

.kcrm-login-visual {
    padding: 48px;
    position: relative;
    overflow: hidden;
}
.kcrm-login-visual::before,
.kcrm-login-visual::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.kcrm-login-visual::before {
    width: 380px; height: 380px;
    top: -140px; right: -120px;
    background: radial-gradient(circle, rgba(30,45,90,.22), rgba(30,45,90,0));
}
.kcrm-login-visual::after {
    width: 280px; height: 280px;
    left: -100px; bottom: -80px;
    background: radial-gradient(circle, rgba(233,88,75,.24), rgba(233,88,75,0));
}
.kcrm-login-visual-inner {
    height: 100%;
    border-radius: 32px;
    padding: 48px;
    background: linear-gradient(155deg, #152551 0%, #1e2d5a 55%, #243772 100%);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.kcrm-login-visual-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.09), transparent 22%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.07), transparent 18%);
    pointer-events: none;
}

.kcrm-brand-lockup,
.kcrm-proof-grid,
.kcrm-visual-footer { position: relative; z-index: 1; }

.kcrm-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.92);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.kcrm-login-logo {
    display: block;
    height: 54px;
    width: auto;
    margin-bottom: 28px;
    filter: brightness(0) invert(1);
}
.kcrm-brand-lockup h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: -.03em;
    max-width: 620px;
}
.kcrm-brand-lockup p {
    margin: 0;
    max-width: 560px;
    color: rgba(255,255,255,.72);
    font-size: 16px;
    line-height: 1.8;
}

.kcrm-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.kcrm-proof-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(12px);
}
.kcrm-proof-card span {
    display: inline-flex;
    width: 46px; height: 46px;
    align-items: center; justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    font-size: 22px;
    margin-bottom: 16px;
}
.kcrm-proof-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}
.kcrm-proof-card p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 1.6;
}
.kcrm-visual-footer {
    color: rgba(255,255,255,.52);
    font-size: 13px;
}

.kcrm-login-panel {
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kcrm-login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    background: rgba(255,255,255,.84);
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: 0 24px 70px rgba(15,23,42,.12);
    backdrop-filter: blur(18px);
    padding: 34px;
}
.kcrm-login-card-top { margin-bottom: 24px; }
.kcrm-login-box-logo {
    height: 44px;
    display: block;
    margin-bottom: 18px;
}
.kcrm-login-overline {
    display: inline-block;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e9eefc;
    color: #1e2d5a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.kcrm-login-card-top h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.kcrm-login-card-top p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.kcrm-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid transparent;
}
.kcrm-alert strong { font-weight: 700; }
.kcrm-alert-dot {
    width: 10px; height: 10px; border-radius: 999px; flex: 0 0 10px; margin-top: 6px;
}
.kcrm-alert-error { background: #fff2f2; border-color: #ffd3d3; color: #9f1239; }
.kcrm-alert-error .kcrm-alert-dot { background: #ef4444; }
.kcrm-alert-warning { background: #fff8eb; border-color: #fde2ae; color: #9a5b00; }
.kcrm-alert-warning .kcrm-alert-dot { background: #f59e0b; }
.kcrm-alert-success { background: #eefcf4; border-color: #c3efd0; color: #166534; }
.kcrm-alert-success .kcrm-alert-dot { background: #22c55e; }

.kcrm-login-form { display: grid; gap: 18px; }
.kcrm-field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.kcrm-field-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.kcrm-mini-link,
.kcrm-secondary-link {
    color: #1e2d5a;
    font-size: 12px;
    font-weight: 700;
}
.kcrm-secondary-link { display: inline-block; margin-top: 6px; }
.kcrm-mini-link:hover,
.kcrm-secondary-link:hover { color: #e9584b; }

.kcrm-input-shell {
    position: relative;
    display: flex;
    align-items: center;
}
.kcrm-input-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    pointer-events: none;
    font-size: 16px;
}
.kcrm-input-shell input {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: 1px solid #dbe4f1;
    background: #fbfdff;
    color: #0f172a;
    padding: 0 52px 0 44px;
    font-size: 14px;
    font-family: inherit;
    transition: .18s ease;
}
.kcrm-input-shell input::placeholder { color: #94a3b8; }
.kcrm-input-shell input:focus {
    outline: none;
    border-color: #7c93d6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30,45,90,.08);
}
.kcrm-toggle-pw {
    position: absolute;
    right: 12px;
    border: 0;
    background: transparent;
    color: #1e2d5a;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    padding: 8px 10px;
}

.kcrm-login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.kcrm-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.kcrm-checkbox-label input[type=checkbox] {
    width: 16px; height: 16px; accent-color: #1e2d5a;
}
.kcrm-login-status-pill {
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
}

.kcrm-login-submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e2d5a 0%, #273e7b 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    box-shadow: 0 16px 34px rgba(30,45,90,.18);
}
.kcrm-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(30,45,90,.22);
}
.kcrm-login-submit:disabled { opacity: .88; cursor: wait; }
.kcrm-btn-loader {
    width: 16px; height: 16px; border-radius: 999px;
    border: 2px solid rgba(255,255,255,.28);
    border-top-color: #fff;
    display: none;
    animation: kcrm-spin .8s linear infinite;
}
.kcrm-login-submit.is-loading .kcrm-btn-loader { display: inline-block; }
.kcrm-login-submit.is-loading .kcrm-btn-text { opacity: .9; }

.kcrm-login-bottom-note {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e5edf6;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
}
.kcrm-login-bottom-note strong { color: #0f172a; }

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

@media (max-width: 1180px) {
    .kcrm-login-shell { grid-template-columns: 1fr; }
    .kcrm-login-visual { min-height: 300px; }
    .kcrm-login-panel { padding-top: 0; }
}

/* ─── MOBILE APP EXPERIENCE ─── */
@media (max-width: 767px) {
    /* Full-screen native-app feel */
    html, body { height: 100%; overflow: hidden; }
    body.kcrm-login-body {
        background: #0f2440;
        display: flex; flex-direction: column;
        min-height: 100dvh; min-height: 100vh;
        overflow: hidden;
    }

    /* Hide the decorative left panel entirely on mobile */
    .kcrm-login-visual { display: none !important; }

    /* Shell becomes a single full-height column */
    .kcrm-login-shell {
        grid-template-columns: 1fr;
        min-height: 100dvh; min-height: 100vh;
        display: flex; flex-direction: column;
    }

    /* Login panel fills entire screen */
    .kcrm-login-panel {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-end;
        background: #0f2440;
        position: relative;
    }

    /* Subtle brand bg behind the card */
    .kcrm-login-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(79,102,180,0.35) 0%, transparent 60%),
            radial-gradient(ellipse 60% 40% at 80% 20%, rgba(14,165,233,0.12) 0%, transparent 55%);
        pointer-events: none;
    }

    /* Logo / brand mark at top center */
    .kcrm-login-panel::after {
        content: '';
        display: block;
        position: absolute;
        top: 48px; left: 50%; transform: translateX(-50%);
        width: 64px; height: 64px;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.14);
        border-radius: 20px;
        backdrop-filter: blur(12px);
    }

    /* Card slides up from bottom — bottom sheet style */
    .kcrm-login-card {
        position: relative; z-index: 2;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 28px 28px 0 0;
        background: #ffffff;
        border: none;
        box-shadow: 0 -8px 48px rgba(0,0,0,0.28);
        backdrop-filter: none;
        padding: 28px 24px 40px;
        padding-bottom: max(40px, env(safe-area-inset-bottom, 20px));
        animation: kcrm-slide-up 0.38s cubic-bezier(0.34,1.26,0.64,1) both;
    }

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

    /* Drag handle indicator */
    .kcrm-login-card::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
        margin: 0 auto 24px;
    }

    /* App logo above the card (inside card-top) */
    .kcrm-login-box-logo {
        height: 36px;
        margin-bottom: 12px;
    }

    .kcrm-login-card-top h2 {
        font-size: 24px;
        margin-bottom: 6px;
    }
    .kcrm-login-card-top p {
        font-size: 13.5px;
    }

    /* Full-width inputs, bigger tap targets */
    .kcrm-input-shell input {
        height: 52px;
        font-size: 16px; /* prevents iOS zoom */
        border-radius: 14px;
    }

    /* Submit button — large native feel */
    .kcrm-login-submit {
        min-height: 56px;
        border-radius: 14px;
        font-size: 16px;
        font-weight: 800;
        letter-spacing: 0.01em;
        background: linear-gradient(135deg, #1a3a5c 0%, #2a5280 100%);
        box-shadow: 0 8px 24px rgba(15,36,64,0.28);
    }

    /* Bottom note + register link */
    .kcrm-login-bottom-note { font-size: 13px; }

    /* Register button full-width native */
    .kcrm-secondary-link[style*="Register"] {
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    /* Alerts more compact */
    .kcrm-alert { border-radius: 14px; font-size: 13px; }

    /* OTP input — big and clear */
    input[inputmode="numeric"] {
        font-size: 22px !important;
        letter-spacing: 4px;
        text-align: center;
        height: 60px !important;
    }

    .kcrm-login-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.kcrm-login-logo-link,.kcrm-login-box-logo-link{display:inline-flex;align-items:center;text-decoration:none;}
.kcrm-login-logo-link:focus-visible,.kcrm-login-box-logo-link:focus-visible{outline:2px solid #93c5fd;outline-offset:4px;border-radius:12px;}

.kcrm-alert-info{background:#eef4ff;border:1px solid #c9d9ff;color:#173a74;}
