:root {
    --csimb-brand: #D5311A;
    --csimb-brand-dark: #b3260f;
    --csimb-brand-light: #fdecea;
    --csimb-text: #1f2328;
    --csimb-muted: #6b7280;
    --csimb-border: #e5e7eb;
    --csimb-bg-soft: #fafafa;
    --csimb-bg: #ffffff;
    --csimb-shadow-sm: 0 2px 8px rgba(20, 20, 20, 0.04);
    --csimb-shadow: 0 12px 40px rgba(20, 20, 20, 0.08);
    --csimb-shadow-lg: 0 24px 70px rgba(20, 20, 20, 0.18);
    --csimb-radius: 16px;
    --csimb-radius-sm: 12px;
}

.csimb-cf-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    padding: 60px 16px;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.csimb-cf-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: var(--csimb-radius);
    padding: 44px 40px 38px;
    box-shadow: var(--csimb-shadow);
    text-align: center;
    animation: csimbFadeUp .4s cubic-bezier(.2,.9,.3,1) both;
    box-sizing: border-box;
}

.csimb-cf-logo {
    margin: 0 auto 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 110px;
}

.csimb-cf-logo img {
    max-width: 220px;
    max-height: 110px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

.csimb-cf-title {
    color: var(--csimb-brand);
    margin: 0 0 18px;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.csimb-cf-intro {
    margin: 0 0 26px;
    color: var(--csimb-text);
    font-size: 0.95rem;
    line-height: 1.55;
}

.csimb-cf-intro p {
    margin: 0 0 12px;
}

.csimb-cf-intro p:last-child {
    margin-bottom: 0;
}

.csimb-cf-note {
    margin-top: 14px !important;
    padding: 0 6px;
    text-align: center;
    color: var(--csimb-muted);
    font-size: 0.82rem !important;
    line-height: 1.55;
    font-style: italic;
}

.csimb-cf-sub {
    color: var(--csimb-muted);
    margin: 0 0 22px;
    font-size: 0.95rem;
}

.csimb-cf-form,
.csimb-cf-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csimb-cf-input-wrap {
    position: relative;
}

.csimb-cf-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 18px !important;
    border: 1.5px solid var(--csimb-border) !important;
    border-radius: var(--csimb-radius-sm) !important;
    font-size: 1.05rem !important;
    background: var(--csimb-bg-soft) !important;
    color: var(--csimb-text) !important;
    letter-spacing: 0.02em;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
    margin: 0 !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

.csimb-cf-input:focus {
    outline: none !important;
    border-color: var(--csimb-brand) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(213, 49, 26, 0.12) !important;
}

.csimb-cf-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* High-specificity button rules so theme CSS can't strip our background */
.csimb-cf-wrap .csimb-cf-btn,
.csimb-cf-modal .csimb-cf-btn,
button.csimb-cf-btn,
.csimb-cf-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: var(--csimb-brand) !important;
    background-color: var(--csimb-brand) !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: var(--csimb-radius-sm) !important;
    padding: 15px 22px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    transition: background-color .18s ease, transform .12s ease, box-shadow .2s ease !important;
    box-shadow: 0 6px 18px rgba(213, 49, 26, 0.28) !important;
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    letter-spacing: 0.01em;
}

.csimb-cf-wrap .csimb-cf-btn:hover:not(:disabled),
.csimb-cf-modal .csimb-cf-btn:hover:not(:disabled),
button.csimb-cf-btn:hover:not(:disabled),
.csimb-cf-btn:hover:not(:disabled) {
    background: var(--csimb-brand-dark) !important;
    background-color: var(--csimb-brand-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(213, 49, 26, 0.34) !important;
}

.csimb-cf-wrap .csimb-cf-btn:active:not(:disabled),
.csimb-cf-modal .csimb-cf-btn:active:not(:disabled),
button.csimb-cf-btn:active:not(:disabled),
.csimb-cf-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(213, 49, 26, 0.28) !important;
}

.csimb-cf-btn:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.csimb-cf-msg {
    min-height: 1.2em;
    color: var(--csimb-brand);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 2px;
}

.csimb-cf-error {
    background: var(--csimb-brand-light);
    color: var(--csimb-brand-dark);
    border-radius: var(--csimb-radius-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: csimbShake .3s ease both;
}

.csimb-cf-countdown {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #fff;
    color: var(--csimb-text);
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--csimb-shadow);
    z-index: 9998;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    border: 1px solid rgba(0,0,0,0.04);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.csimb-cf-countdown.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.csimb-cf-countdown-text {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.csimb-cf-logout-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: var(--csimb-brand) !important;
    background-color: var(--csimb-brand) !important;
    background-image: none !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 7px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
    text-decoration: none !important;
    transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease !important;
    box-shadow: 0 3px 10px rgba(213, 49, 26, 0.28) !important;
    white-space: nowrap;
}

.csimb-cf-logout-btn:hover:not(:disabled) {
    background: var(--csimb-brand-dark) !important;
    background-color: var(--csimb-brand-dark) !important;
    transform: translateY(-1px);
}

.csimb-cf-logout-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.csimb-cf-countdown .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--csimb-brand);
    margin-right: 9px;
    vertical-align: middle;
    animation: csimbPulse 1.4s ease-in-out infinite;
}

.csimb-cf-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.csimb-cf-modal.is-open {
    display: flex;
    animation: csimbFadeIn .25s ease both;
}

.csimb-cf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.csimb-cf-modal-card {
    position: relative;
    background: #fff;
    border-radius: var(--csimb-radius);
    padding: 36px 32px 30px;
    width: calc(100% - 32px);
    max-width: 420px;
    box-shadow: var(--csimb-shadow-lg);
    text-align: center;
    animation: csimbPop .3s cubic-bezier(.2,.9,.3,1.2) both;
    box-sizing: border-box;
}

.csimb-cf-modal-card .csimb-cf-title {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.csimb-cf-modal-card .csimb-cf-sub {
    margin-bottom: 22px;
}

@keyframes csimbFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes csimbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes csimbPop {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes csimbPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.6); opacity: 0.55; }
}

@keyframes csimbShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (max-width: 480px) {
    .csimb-cf-card {
        padding: 32px 22px 28px;
    }
    .csimb-cf-title {
        font-size: 1.4rem;
    }
    .csimb-cf-countdown {
        bottom: 14px;
        right: 14px;
        font-size: 0.8rem;
    }
}
