/*
 * REKAZ CRM - sign in, password reset and new password pages.
 * Every rule is scoped to .rk-auth, the rest of the application is not affected.
 */

.rk-auth {
    --rk-navy: #0b1736;
    --rk-navy-2: #13254a;
    --rk-indigo: #1e3a8a;
    --rk-blue: #2563eb;
    --rk-sky: #38bdf8;
    --rk-orange: #f7931e;
    --rk-amber: #fdba2d;
    --rk-teal: #14b8a6;
    --rk-violet: #7c3aed;
    --rk-ink: #0f172a;
    --rk-muted: #64748b;
    --rk-line: #e2e8f0;
    --rk-field: #f8fafc;
    --rk-radius: 14px;

    margin: 0;
    min-height: 100vh;
    background: #f4f6fb !important;
    color: var(--rk-ink);
    overflow-x: hidden;
}

.rk-auth .rk-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- brand panel ---------- */

.rk-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--rk-navy) 0%, var(--rk-navy-2) 38%, var(--rk-indigo) 72%, #23307a 100%);
    background-size: 220% 220%;
    animation: rk-gradient 18s ease-in-out infinite;
    isolation: isolate;
}

/* an uploaded background image from the settings replaces the gradient */
.rk-brand.has-image {
    background-size: cover;
    background-position: center;
    animation: none;
}

.rk-brand.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 23, 54, 0.9), rgba(30, 58, 138, 0.78));
    z-index: -1;
}

/* fine grid that slowly drifts */
.rk-brand .rk-grid {
    position: absolute;
    inset: -40px;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%);
    animation: rk-grid 30s linear infinite;
}

/* soft coloured lights */
.rk-brand .rk-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    z-index: -1;
    animation: rk-float 16s ease-in-out infinite;
}

.rk-brand .rk-blob.b1 {
    width: 380px;
    height: 380px;
    background: var(--rk-orange);
    top: -120px;
    inset-inline-end: -80px;
}

.rk-brand .rk-blob.b2 {
    width: 320px;
    height: 320px;
    background: var(--rk-sky);
    bottom: -110px;
    inset-inline-start: -60px;
    animation-delay: -6s;
    opacity: 0.4;
}

.rk-brand .rk-blob.b3 {
    width: 240px;
    height: 240px;
    background: var(--rk-violet);
    top: 45%;
    inset-inline-start: 40%;
    animation-delay: -11s;
    opacity: 0.35;
}

.rk-brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: rk-rise 0.8s ease both;
}

.rk-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.rk-brand-mark img {
    width: 40px;
    height: 40px;
}

.rk-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rk-brand-name span {
    color: var(--rk-amber);
}

.rk-brand-body {
    max-width: 520px;
    margin: 40px 0;
}

.rk-brand-body h1 {
    color: #fff;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.35;
    font-weight: 800;
    margin: 0 0 16px;
    animation: rk-rise 0.8s 0.1s ease both;
}

.rk-brand-body h1 .rk-accent {
    background: linear-gradient(90deg, var(--rk-amber), var(--rk-orange), #ff6b6b, var(--rk-amber));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rk-shine 6s linear infinite;
}

.rk-brand-body p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 26px;
    animation: rk-rise 0.8s 0.2s ease both;
}

.rk-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.rk-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    animation: rk-rise 0.7s ease both;
}

.rk-features li:nth-child(1) { animation-delay: 0.3s; }
.rk-features li:nth-child(2) { animation-delay: 0.4s; }
.rk-features li:nth-child(3) { animation-delay: 0.5s; }

.rk-features .rk-dot {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.rk-features li:nth-child(1) .rk-dot { color: var(--rk-amber); }
.rk-features li:nth-child(2) .rk-dot { color: var(--rk-sky); }
.rk-features li:nth-child(3) .rk-dot { color: #5eead4; }

/* floating preview cards, purely decorative */
.rk-chips {
    position: relative;
    height: 150px;
}

.rk-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
    font-size: 13px;
    color: #fff;
    animation: rk-bob 6s ease-in-out infinite;
}

.rk-chip small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    margin-top: 2px;
}

.rk-chip.c1 { inset-inline-start: 0; top: 0; }
.rk-chip.c2 { inset-inline-start: 46%; top: 16px; animation-delay: -2s; }
.rk-chip.c3 { inset-inline-start: 18%; top: 88px; animation-delay: -4s; }

.rk-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 30px;
}

.rk-bars i {
    display: block;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--rk-amber), var(--rk-orange));
    animation: rk-bar 2.4s ease-in-out infinite;
    transform-origin: bottom;
}

.rk-bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
.rk-bars i:nth-child(2) { height: 65%; animation-delay: 0.2s; }
.rk-bars i:nth-child(3) { height: 50%; animation-delay: 0.4s; }
.rk-bars i:nth-child(4) { height: 85%; animation-delay: 0.6s; }
.rk-bars i:nth-child(5) { height: 100%; animation-delay: 0.8s; }

.rk-ring {
    width: 34px;
    height: 34px;
    transform: rotate(-90deg);
}

.rk-ring circle {
    fill: none;
    stroke-width: 4;
}

.rk-ring .track { stroke: rgba(255, 255, 255, 0.18); }

.rk-ring .value {
    stroke: var(--rk-sky);
    stroke-linecap: round;
    stroke-dasharray: 88;
    stroke-dashoffset: 88;
    animation: rk-ring 3.5s ease-in-out infinite;
}

.rk-check {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(20, 184, 166, 0.25);
    color: #5eead4;
}

.rk-brand-foot {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- form side ---------- */

.rk-form-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background:
        radial-gradient(circle at 85% 10%, rgba(247, 147, 30, 0.1), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.1), transparent 45%),
        #f4f6fb;
}

.rk-form-area {
    width: 100%;
    max-width: 430px;
    animation: rk-rise 0.7s 0.15s ease both;
}

.rk-logo {
    display: block;
    height: 46px;
    width: auto;
    max-width: 100%;
    margin: 0 auto 26px;
}

/* the card of all three forms */
.rk-auth .rk-form-area .card {
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 60px -20px rgba(15, 23, 42, 0.18) !important;
    overflow: hidden;
    margin-bottom: 0 !important;
}

/* coloured line on top of the card */
.rk-auth .rk-form-area .card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--rk-blue), var(--rk-violet), var(--rk-orange), var(--rk-blue));
    background-size: 300% 100%;
    animation: rk-shine 8s linear infinite;
}

.rk-auth .rk-form-area .card-header {
    background: transparent !important;
    border: 0 !important;
    padding: 28px 32px 0 !important;
    text-align: start !important;
}

.rk-auth .rk-form-area .card-header img {
    display: none;
}

.rk-auth .rk-form-area .card-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--rk-ink);
    margin: 0;
}

.rk-auth .rk-form-area .card-body {
    padding: 22px 32px 30px !important;
}

.rk-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--rk-ink);
    margin: 0 0 6px;
}

.rk-subtitle {
    color: var(--rk-muted);
    margin: 0;
    font-size: 14px;
}

.rk-auth label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.rk-field {
    position: relative;
}

.rk-field .rk-field-icon {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    height: 50px;
    width: 46px;
    display: grid;
    place-items: center;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
}

.rk-auth .rk-form-area .form-control {
    height: 50px;
    border-radius: 12px !important;
    border: 1.5px solid var(--rk-line) !important;
    background: var(--rk-field) !important;
    color: var(--rk-ink) !important;
    font-size: 15px;
    padding: 10px 14px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rk-auth .rk-field .form-control {
    padding-inline-start: 44px !important;
}

.rk-auth .rk-field.has-toggle .form-control {
    padding-inline-end: 48px !important;
}

.rk-auth .rk-form-area .form-control:hover {
    border-color: #cbd5e1 !important;
}

.rk-auth .rk-form-area .form-control:focus {
    border-color: var(--rk-blue) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
}

.rk-field:focus-within .rk-field-icon {
    color: var(--rk-blue);
}

.rk-auth .rk-form-area .form-control.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.rk-auth .rk-form-area label.error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    margin: 6px 2px 0;
}

.rk-toggle-password {
    position: absolute;
    top: 5px;
    inset-inline-end: 5px;
    height: 40px;
    width: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rk-toggle-password:hover,
.rk-toggle-password:focus-visible {
    background: #eef2ff;
    color: var(--rk-blue);
    outline: none;
}

.rk-toggle-password .eye-off { display: none; }
.rk-toggle-password.is-visible .eye { display: none; }
.rk-toggle-password.is-visible .eye-off { display: block; }

.rk-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}

.rk-link {
    color: var(--rk-blue) !important;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
}

.rk-link:hover {
    color: var(--rk-indigo) !important;
    text-decoration: underline !important;
}

/* the main button of all three forms */
.rk-auth .rk-form-area .btn-primary {
    position: relative;
    overflow: hidden;
    height: 52px;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--rk-blue) 0%, var(--rk-indigo) 55%, var(--rk-violet) 100%) !important;
    background-size: 160% 160% !important;
    box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.65);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-position 0.4s ease;
}

.rk-auth .rk-form-area .btn-primary:hover {
    background-position: 100% 0 !important;
    box-shadow: 0 16px 32px -10px rgba(37, 99, 235, 0.75);
    transform: translateY(-1px);
}

.rk-auth .rk-form-area .btn-primary:active {
    transform: translateY(0);
}

.rk-auth .rk-form-area .btn-primary:focus-visible {
    outline: 3px solid rgba(247, 147, 30, 0.6);
    outline-offset: 2px;
}

/* light sweep across the button */
.rk-auth .rk-form-area .btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    left: -60%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: rk-sweep 4.5s ease-in-out infinite;
}

.rk-auth .rk-form-area .btn-primary.is-loading {
    pointer-events: none;
    color: transparent !important;
}

.rk-auth .rk-form-area .btn-primary.is-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: rk-spin 0.8s linear infinite;
}

.rk-auth .rk-form-area .alert {
    border-radius: 12px;
    border: 0;
    font-size: 14px;
}

.rk-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 12px;
    margin: 22px 0 14px;
}

.rk-divider::before,
.rk-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rk-line);
}

.rk-signup {
    text-align: center;
    font-size: 14px;
    color: var(--rk-muted);
}

.rk-auth .rk-form-area .card-body > div > a,
.rk-auth .rk-form-area .card-body .mt5 a,
.rk-auth .rk-form-area .card-body .mt20 a {
    color: var(--rk-blue);
    font-weight: 600;
}

.rk-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    color: #94a3b8;
    font-size: 12px;
}

.rk-secure svg {
    color: var(--rk-teal);
}

/* ---------- animations ---------- */

@keyframes rk-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rk-grid {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(40px, 40px, 0); }
}

@keyframes rk-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(30px, -40px, 0) scale(1.08); }
    66% { transform: translate3d(-25px, 25px, 0) scale(0.95); }
}

@keyframes rk-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rk-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rk-shine {
    from { background-position: 0% 50%; }
    to { background-position: 300% 50%; }
}

@keyframes rk-bar {
    0%, 100% { transform: scaleY(0.55); }
    50% { transform: scaleY(1); }
}

@keyframes rk-ring {
    0% { stroke-dashoffset: 88; }
    60%, 100% { stroke-dashoffset: 22; }
}

@keyframes rk-sweep {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

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

/* ---------- smaller screens ---------- */

@media (max-width: 991px) {
    .rk-auth .rk-shell {
        grid-template-columns: 1fr;
    }

    .rk-brand {
        padding: 28px 24px 32px;
        min-height: 0;
    }

    .rk-brand-body {
        margin: 22px 0 0;
    }

    .rk-brand-body p,
    .rk-features,
    .rk-chips,
    .rk-brand-foot {
        display: none;
    }

    .rk-brand-body h1 {
        font-size: 24px;
        margin: 0;
    }

    .rk-form-side {
        padding: 28px 16px 40px;
        align-items: flex-start;
    }

    .rk-auth .rk-form-area .card-header {
        padding: 24px 22px 0 !important;
    }

    .rk-auth .rk-form-area .card-body {
        padding: 18px 22px 24px !important;
    }
}

@media (max-width: 420px) {
    .rk-brand-body h1 {
        font-size: 21px;
    }

    .rk-title {
        font-size: 22px;
    }
}

/* people who asked their system for less motion get a still page */
@media (prefers-reduced-motion: reduce) {
    .rk-auth *,
    .rk-auth *::before,
    .rk-auth *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* the email field is always written left to right. on a right to left page its icon stays
   on the right, so both sides keep room for it */
.rk-auth .rk-field .form-control[dir="ltr"] {
    padding-left: 44px !important;
    padding-right: 44px !important;
}

/* ---------- sign up ---------- */

.rk-auth .rk-signup-area {
    max-width: 500px;
}

.rk-hint {
    margin: 7px 2px 0;
    font-size: 12px;
    color: var(--rk-muted);
}

/* first and last name side by side */
.rk-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

/* the type of account: two cards, the chosen one in blue */
.rk-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rk-auth .rk-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.rk-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rk-option-body {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1.5px solid var(--rk-line);
    border-radius: var(--rk-radius);
    background: var(--rk-field);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rk-option-body .rk-field-icon {
    position: static;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    color: #94a3b8;
    transform: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.rk-option-body strong {
    font-size: 14px;
    color: var(--rk-ink);
}

.rk-option-body small {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--rk-muted);
}

.rk-option:hover .rk-option-body {
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.rk-option input:checked + .rk-option-body {
    border-color: var(--rk-blue);
    background: #eff6ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.rk-option input:checked + .rk-option-body .rk-field-icon {
    background: linear-gradient(135deg, var(--rk-blue), var(--rk-indigo));
    color: #fff;
}

.rk-option input:focus-visible + .rk-option-body {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

/* the company name slides in and out with the type of account */
.rk-auth .company-name-section {
    transition: opacity 0.2s ease;
}

/* how strong the password is */
.rk-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 2px 0;
    font-size: 12px;
    color: var(--rk-muted);
}

.rk-strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    flex: 1;
    max-width: 180px;
}

.rk-strength-bars i {
    height: 5px;
    border-radius: 99px;
    background: var(--rk-line);
    transition: background 0.25s ease;
}

.rk-strength[data-level="1"] .rk-strength-bars i:nth-child(-n+1) { background: #ef4444; }
.rk-strength[data-level="2"] .rk-strength-bars i:nth-child(-n+2) { background: var(--rk-orange); }
.rk-strength[data-level="3"] .rk-strength-bars i:nth-child(-n+3) { background: #22c55e; }
.rk-strength[data-level="4"] .rk-strength-bars i { background: #16a34a; }
.rk-strength[data-level="1"] .rk-strength-text { color: #dc2626; }
.rk-strength[data-level="2"] .rk-strength-text { color: #c2410c; }
.rk-strength[data-level="3"] .rk-strength-text,
.rk-strength[data-level="4"] .rk-strength-text { color: #15803d; font-weight: 600; }

/* the second password turns green when it matches */
.rk-retype.is-match .rk-field-icon {
    color: #16a34a !important;
}

.rk-auth .rk-retype.is-match .form-control {
    border-color: #86efac !important;
}

/* terms and conditions */
.rk-auth .rk-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    color: var(--rk-muted);
    line-height: 1.6;
    cursor: pointer;
}

.rk-auth .rk-terms .form-check-input {
    flex: 0 0 auto;
    margin: 3px 0 0;
}

.rk-auth .rk-signup-area .btn-primary {
    margin-top: 6px;
}

@media (max-width: 420px) {
    .rk-two {
        grid-template-columns: 1fr;
    }

    .rk-option-body {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 12px 8px;
    }

    .rk-option-body .rk-field-icon {
        grid-row: auto;
        margin-bottom: 6px;
    }
}

/* ---------- sign in ---------- */

/* the greeting above the title, in the orange of the brand */
.rk-greeting {
    margin: 0 0 4px;
    min-height: 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rk-orange);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rk-greeting.is-ready {
    opacity: 1;
    transform: none;
}

/* the error of the server: a soft red box with an icon */
.rk-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
    animation: rk-shake 0.4s ease;
}

.rk-alert-icon {
    flex: 0 0 auto;
    margin-top: 1px;
}

@keyframes rk-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* the tick of a valid email, on the end side of the field */
.rk-valid {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    height: 50px;
    width: 44px;
    display: grid;
    place-items: center;
    color: #16a34a;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.rk-field.is-valid .rk-valid {
    opacity: 1;
    transform: none;
}

/* the email is left to right: its tick goes to the right in both directions */
.rk-field .form-control[dir="ltr"] ~ .rk-valid {
    inset-inline-end: auto;
    right: 0;
}

[dir="ltr"] .rk-field .form-control[dir="ltr"] ~ .rk-valid {
    right: 0;
}

[dir="rtl"] .rk-field .rk-field-icon + .form-control[dir="ltr"] ~ .rk-valid {
    right: auto;
    left: 0;
}

/* Caps Lock */
.rk-caps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -8px 2px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #c2410c;
}

.rk-caps[hidden] {
    display: none;
}

/* create an account: a second, lighter button */
.rk-auth .rk-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    margin-top: 12px;
    border: 1.5px solid var(--rk-line);
    border-radius: 12px;
    background: #fff;
    color: var(--rk-ink) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rk-auth .rk-btn-outline:hover,
.rk-auth .rk-btn-outline:focus-visible {
    border-color: var(--rk-blue);
    background: #eff6ff;
    color: var(--rk-blue) !important;
    transform: translateY(-1px);
    outline: none;
}

/* ---------- forgot password and new password ---------- */

/* a round icon above the title */
.rk-badge-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--rk-blue), var(--rk-indigo) 60%, var(--rk-violet));
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.7);
}

.rk-auth .rk-subtitle {
    line-height: 1.7;
}

/* back to sign in, at the bottom of the card */
.rk-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rk-muted) !important;
    text-decoration: none !important;
    transition: color 0.2s ease, gap 0.2s ease;
}

.rk-back:hover {
    color: var(--rk-blue) !important;
    gap: 12px;
}

[dir="rtl"] .rk-back svg {
    transform: scaleX(-1);
}

.rk-back[hidden] {
    display: none;
}

/* the state after sending: check your email, or the password is changed */
.rk-done {
    text-align: center;
    animation: rk-rise 0.5s ease both;
}

.rk-done[hidden],
.rk-auth form[hidden] {
    display: none !important;
}

.rk-done-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 4px auto 14px;
    border-radius: 50%;
    color: var(--rk-blue);
    background: #eff6ff;
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.06);
}

.rk-done.is-success .rk-done-icon {
    color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.07);
}

.rk-done h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: var(--rk-ink);
}

.rk-done-text {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--rk-muted);
    line-height: 1.7;
}

.rk-done-email {
    display: inline-block;
    margin: 6px 0 14px;
    padding: 4px 12px;
    border-radius: 99px;
    background: var(--rk-field);
    border: 1px solid var(--rk-line);
    font-size: 13px;
    font-weight: 700;
    color: var(--rk-ink);
}

.rk-tips {
    list-style: none;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    text-align: start;
    font-size: 13px;
    color: #92400e;
}

.rk-tips li {
    position: relative;
    padding-inline-start: 16px;
}

.rk-tips li + li {
    margin-top: 4px;
}

.rk-tips li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rk-orange);
}

.rk-auth button.rk-btn-outline {
    width: 100%;
    cursor: pointer;
}

.rk-auth .rk-btn-outline:disabled {
    cursor: default;
    color: var(--rk-muted) !important;
    background: var(--rk-field);
    border-color: var(--rk-line);
    transform: none;
}

.rk-link-button {
    display: block;
    margin: 12px auto 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--rk-blue);
    cursor: pointer;
}

.rk-link-button:hover {
    text-decoration: underline;
}
