:root{
    --bb-brand:#2563eb;
    --bb-button:#2563eb;
    --bb-button-hover:#1d4ed8;
    --bb-button-text:#ffffff;
    --bb-button-hover-text:#ffffff;
    --bb-title-color:#ffffff;
    --bb-form-bg:#ffffff;
    --bb-field-border:#d1d5db;
    --bb-status-text-color:#1d4ed8;
}

.bb-wrap,
.bb-wrap *{
    box-sizing:border-box;
}

.bb-wrap{
    max-width:760px;
    margin:40px auto;
    background:var(--bb-form-bg);
    border-radius:24px;
    border:1px solid #e5e7eb;
    box-shadow:0 24px 70px rgba(15,23,42,.10);
    overflow:hidden;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.bb-header{
    background:var(--bb-brand);
    padding:30px 34px;
    text-align:center;
    color:var(--bb-title-color);
}

.bb-header h2{
    margin:0;
    font-size:30px;
    font-weight:800;
    color:var(--bb-title-color);
}

.bb-header p{
    margin:8px 0 0;
    color:var(--bb-title-color);
    opacity:.9;
}

.bb-status{
    margin:22px 30px 0;
    padding:13px 16px;
    border-radius:14px;
    font-size:14px;
    font-weight:700;
    background:#eff6ff;
    color:var(--bb-status-text-color);
    border:1px solid #bfdbfe;
}

.bb-status.success{
    background:#ecfdf5;
    color:#047857;
    border-color:#a7f3d0;
}

.bb-status.error{
    background:#fef2f2;
    color:#b91c1c;
    border-color:#fecaca;
}

.bb-status.info{
    background:#eff6ff;
    color:var(--bb-status-text-color);
    border-color:#bfdbfe;
}

.bb-section{
    padding:26px 30px 30px;
    border-bottom:1px solid #f1f5f9;
}

.bb-section-title{
    font-size:14px;
    font-weight:800;
    color:var(--bb-brand);
    margin-bottom:16px;
    text-transform:uppercase;
    letter-spacing:.05em;
}

.bb-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.bb-field{
    display:flex;
    flex-direction:column;
}

.bb-field.full{
    grid-column:1/-1;
}

.bb-field label{
    font-size:14px;
    font-weight:700;
    margin-bottom:7px;
    color:#374151;
}

.bb-field input,
.bb-field select,
.bb-field textarea{
    width:100%;
    min-height:48px;
    padding:13px 14px;
    border:1px solid var(--bb-field-border);
    border-radius:14px;
    background:#ffffff;
    color:#111827;
    font-size:15px;
    line-height:1.3;
    box-shadow:none;
}

.bb-field textarea{
    min-height:96px;
    resize:vertical;
}

.bb-field input:focus,
.bb-field select:focus,
.bb-field textarea:focus{
    outline:none;
    border-color:var(--bb-brand);
    box-shadow:0 0 0 4px rgba(37,99,235,.13);
}

.bb-step{
    display:none;
}

.bb-step.bb-step-active{
    display:block;
}

.bb-submit,
.bb-secondary-btn,
.bb-modal button{
    background:var(--bb-button);
    color:var(--bb-button-text);
    border:0;
    border-radius:16px;
    font-size:16px;
    font-weight:800;
    cursor:pointer;
    transition:all .2s ease;
}

.bb-submit{
    width:100%;
    margin-top:22px;
    padding:15px 22px;
}

.bb-secondary-btn{
    min-height:52px;
    padding:14px 20px;
    box-shadow:0 6px 18px rgba(15,23,42,.06);
}

.bb-submit:hover,
.bb-secondary-btn:hover,
.bb-modal button:hover{
    background:var(--bb-button-hover);
    color:var(--bb-button-hover-text);
    transform:translateY(-1px);
}

.bb-submit:disabled{
    background:#9ca3af;
    color:#fff;
    cursor:not-allowed;
    transform:none;
}

.bb-step-actions{
    display:grid;
    grid-template-columns:150px 1fr;
    gap:14px;
    margin-top:22px;
    align-items:center;
}

.bb-step-actions .bb-submit{
    margin-top:0;
}

.bb-modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.55);
    z-index:99999999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.bb-modal-overlay.show{
    display:flex;
}

.bb-modal{
    width:100%;
    max-width:430px;
    background:#ffffff;
    border-radius:24px;
    padding:30px;
    text-align:center;
    box-shadow:0 30px 90px rgba(0,0,0,.28);
    animation:bbPop .18s ease;
}

@keyframes bbPop{
    from{
        transform:scale(.94);
        opacity:.4;
    }
    to{
        transform:scale(1);
        opacity:1;
    }
}

.bb-modal-icon{
    width:64px;
    height:64px;
    border-radius:999px;
    margin:0 auto 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:32px;
    font-weight:900;
}

.bb-modal.success .bb-modal-icon{
    background:#ecfdf5;
    color:#047857;
}

.bb-modal.error .bb-modal-icon{
    background:#fef2f2;
    color:#b91c1c;
}

.bb-modal.info .bb-modal-icon{
    background:#eff6ff;
    color:#1d4ed8;
}

.bb-modal h3{
    margin:0 0 10px;
    font-size:24px;
    color:#111827;
}

.bb-modal p{
    margin:0 0 22px;
    color:#4b5563;
    line-height:1.55;
}

.bb-modal button{
    padding:12px 24px;
}

/* Nepali datepicker safe fix */
body > #ndp-nepali-box{
    width:330px !important;
    min-width:330px !important;
    max-width:330px !important;
    height:auto !important;
    overflow:visible !important;
    z-index:999999999 !important;
}

body > #ndp-nepali-box table{
    width:100% !important;
    table-layout:fixed !important;
}

body > #ndp-nepali-box td,
body > #ndp-nepali-box th{
    width:42px !important;
    height:34px !important;
    padding:0 !important;
    text-align:center !important;
    vertical-align:middle !important;
}

body > #ndp-nepali-box select{
    width:auto !important;
    min-width:auto !important;
    max-width:none !important;
    padding:2px 6px !important;
    height:auto !important;
}

body > #ndp-nepali-box .bb-full-blocked-date{
    opacity:.35 !important;
    pointer-events:none !important;
    cursor:not-allowed !important;
    background:#f3f4f6 !important;
    color:#9ca3af !important;
}

/* Mobile responsive */
@media(max-width:720px){
    .bb-wrap{
        margin:16px 10px;
        border-radius:18px;
    }

    .bb-header{
        padding:24px 18px;
    }

    .bb-header h2{
        font-size:24px;
    }

    .bb-header p{
        font-size:14px;
    }

    .bb-section{
        padding:20px 18px 24px;
    }

    .bb-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .bb-status{
        margin:16px 18px 0;
        font-size:13px;
    }

    .bb-step-actions{
        grid-template-columns:1fr;
    }

    .bb-secondary-btn,
    .bb-submit{
        width:100%;
    }

    body > #ndp-nepali-box{
        left:10px !important;
        width:310px !important;
        min-width:310px !important;
        max-width:310px !important;
    }

    body > #ndp-nepali-box td,
    body > #ndp-nepali-box th{
        width:39px !important;
    }
}

@media(max-width:380px){
    .bb-wrap{
        margin:12px 6px;
    }

    .bb-header{
        padding:22px 14px;
    }

    .bb-section{
        padding:18px 14px 22px;
    }

    body > #ndp-nepali-box{
        left:6px !important;
        width:300px !important;
        min-width:300px !important;
        max-width:300px !important;
    }

    body > #ndp-nepali-box td,
    body > #ndp-nepali-box th{
        width:37px !important;
    }
}