/* Broker Pipeline Pro Admin UI - v1.0.5 Modern Mortgage CRM Interface */
:root{
    --bpp-navy:#071426;
    --bpp-navy-2:#0f2137;
    --bpp-blue:#1f6feb;
    --bpp-blue-2:#3b82f6;
    --bpp-cyan:#22d3ee;
    --bpp-green:#10b981;
    --bpp-amber:#f59e0b;
    --bpp-red:#ef4444;
    --bpp-purple:#7c3aed;
    --bpp-bg:#f4f7fb;
    --bpp-card:#ffffff;
    --bpp-line:#dbe4f0;
    --bpp-text:#111827;
    --bpp-muted:#65758b;
    --bpp-shadow:0 18px 45px rgba(15, 23, 42, .08);
    --bpp-shadow-soft:0 10px 24px rgba(15, 23, 42, .06);
    --bpp-radius:18px;
}

body.wp-admin.toplevel_page_bpp-dashboard,
body.wp-admin.broker-pipeline_page_bpp-leads,
body.wp-admin.broker-pipeline_page_bpp-borrowers,
body.wp-admin.broker-pipeline_page_bpp-loans,
body.wp-admin.broker-pipeline_page_bpp-tasks,
body.wp-admin.broker-pipeline_page_bpp-settings{
    background:
        radial-gradient(circle at 10% 0%, rgba(31,111,235,.12), transparent 26%),
        radial-gradient(circle at 92% 8%, rgba(34,211,238,.10), transparent 24%),
        linear-gradient(180deg,#f8fbff 0%,#eef3f9 100%);
}

.bpp-wrap{
    max-width:none;
    margin:24px 28px 44px 24px;
    color:var(--bpp-text);
}

.bpp-wrap *,
.bpp-public-form-wrap *{
    box-sizing:border-box;
}

.bpp-wrap h1{
    position:relative;
    display:flex;
    align-items:center;
    min-height:74px;
    margin:0 0 22px;
    padding:22px 28px 22px 90px;
    border-radius:24px;
    color:#fff;
    font-size:28px;
    font-weight:900;
    letter-spacing:-.03em;
    background:
        linear-gradient(135deg, rgba(7,20,38,.98), rgba(15,33,55,.96) 48%, rgba(31,111,235,.92)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 36px);
    box-shadow:0 20px 42px rgba(7,20,38,.18);
    overflow:hidden;
}

.bpp-wrap h1::before{
    content:"";
    position:absolute;
    left:28px;
    top:50%;
    width:40px;
    height:40px;
    transform:translateY(-50%);
    border-radius:14px;
    background:linear-gradient(135deg,var(--bpp-blue),var(--bpp-cyan));
    box-shadow:0 0 0 8px rgba(255,255,255,.08), inset 0 -8px 18px rgba(7,20,38,.25);
}

.bpp-wrap h1::after{
    content:"";
    position:absolute;
    right:-58px;
    top:-70px;
    width:220px;
    height:220px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.22),rgba(255,255,255,0) 65%);
}

.bpp-wrap h2{
    margin:0 0 18px;
    color:var(--bpp-navy);
    font-size:20px;
    line-height:1.25;
    font-weight:900;
    letter-spacing:-.02em;
}

.bpp-wrap h2::after{
    content:"";
    display:block;
    width:42px;
    height:4px;
    margin-top:9px;
    border-radius:999px;
    background:linear-gradient(90deg,var(--bpp-blue),var(--bpp-cyan));
}

.bpp-cards{
    display:grid;
    grid-template-columns:repeat(4,minmax(180px,1fr));
    gap:18px;
    margin:0 0 22px;
}

.bpp-card,
.bpp-summary-pill{
    position:relative;
    min-height:116px;
    padding:22px 22px 20px;
    border:1px solid rgba(219,228,240,.95);
    border-radius:var(--bpp-radius);
    background:
        linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.88)),
        radial-gradient(circle at 100% 0%,rgba(31,111,235,.12),transparent 36%);
    box-shadow:var(--bpp-shadow-soft);
    overflow:hidden;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bpp-card:hover,
.bpp-summary-pill:hover{
    transform:translateY(-2px);
    border-color:rgba(31,111,235,.32);
    box-shadow:var(--bpp-shadow);
}

.bpp-card::before,
.bpp-summary-pill::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:4px;
    background:linear-gradient(90deg,var(--bpp-blue),var(--bpp-cyan));
}

.bpp-card span,
.bpp-summary-pill span{
    display:block;
    margin-bottom:10px;
    color:var(--bpp-muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.bpp-card strong,
.bpp-summary-pill strong{
    display:block;
    color:var(--bpp-navy);
    font-size:36px;
    line-height:1;
    font-weight:950;
    letter-spacing:-.05em;
}

.bpp-danger::before{background:linear-gradient(90deg,var(--bpp-red),#fb7185);}
.bpp-danger strong{color:#b91c1c;}

.bpp-grid-two{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:22px;
}

.bpp-panel{
    position:relative;
    margin:0 0 22px;
    padding:26px;
    border:1px solid rgba(219,228,240,.96);
    border-radius:24px;
    background:rgba(255,255,255,.88);
    box-shadow:var(--bpp-shadow-soft);
    backdrop-filter:blur(8px);
}

.bpp-panel::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:24px;
    pointer-events:none;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

.bpp-form-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(180px,1fr));
    gap:18px 20px;
}

.bpp-form label,
.bpp-public-form label{
    display:block;
    color:var(--bpp-navy);
    font-size:13px;
    font-weight:850;
    letter-spacing:.01em;
}

.bpp-form label span{
    display:block;
    margin-bottom:7px;
}

.bpp-form input,
.bpp-form select,
.bpp-form textarea,
.bpp-public-form input,
.bpp-public-form select,
.bpp-public-form textarea,
.bpp-filter-bar input,
.bpp-filter-bar select{
    width:100%;
    max-width:100%;
    min-height:46px;
    padding:11px 13px;
    border:1px solid #cfd9e8;
    border-radius:13px;
    background:#fff;
    color:var(--bpp-text);
    font-size:14px;
    font-weight:600;
    box-shadow:0 1px 0 rgba(15,23,42,.03);
    transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.bpp-form input:focus,
.bpp-form select:focus,
.bpp-form textarea:focus,
.bpp-public-form input:focus,
.bpp-public-form select:focus,
.bpp-public-form textarea:focus,
.bpp-filter-bar input:focus,
.bpp-filter-bar select:focus{
    border-color:var(--bpp-blue);
    box-shadow:0 0 0 4px rgba(31,111,235,.12);
    outline:none;
}

.bpp-form textarea,
.bpp-public-form textarea{min-height:112px;}
.bpp-full{display:block;margin-top:18px;}

.bpp-wrap .button,
.bpp-public-form button{
    min-height:40px;
    padding:7px 16px;
    border-radius:11px;
    border:1px solid #b8c5d8;
    background:#fff;
    color:#0f2744;
    font-weight:800;
    box-shadow:0 5px 14px rgba(15,23,42,.05);
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.bpp-wrap .button:hover,
.bpp-public-form button:hover{
    transform:translateY(-1px);
    border-color:#8aa4c9;
    box-shadow:0 8px 18px rgba(15,23,42,.09);
}

.bpp-wrap .button-primary,
.bpp-public-form button{
    border-color:transparent!important;
    background:linear-gradient(135deg,var(--bpp-blue),#1557c0)!important;
    color:#fff!important;
    box-shadow:0 12px 22px rgba(31,111,235,.22)!important;
}

.bpp-wrap .button-primary:hover,
.bpp-public-form button:hover{
    background:linear-gradient(135deg,#1557c0,var(--bpp-blue-2))!important;
}

.bpp-delete{
    color:#b91c1c!important;
    border-color:#fecaca!important;
    background:#fff5f5!important;
}

.bpp-delete:hover{
    color:#fff!important;
    border-color:#dc2626!important;
    background:#dc2626!important;
}

.bpp-badge{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:6px 12px;
    border:1px solid #c7d2fe;
    border-radius:999px;
    background:#eef2ff;
    color:#1e3a8a;
    font-size:12px;
    font-weight:900;
    line-height:1;
    white-space:nowrap;
}

.bpp-summary-row{
    display:grid;
    grid-template-columns:repeat(6,minmax(130px,1fr));
    gap:16px;
    margin:0 0 22px;
}

.bpp-summary-pill{
    min-height:104px;
    padding:20px;
}

.bpp-summary-pill strong{font-size:28px;}
.bpp-summary-total::before{background:linear-gradient(90deg,var(--bpp-purple),var(--bpp-blue));}

.bpp-filter-bar{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    align-items:flex-end;
    margin:0 0 20px;
    padding:18px;
    border:1px solid rgba(203,213,225,.9);
    border-radius:18px;
    background:
        linear-gradient(135deg,rgba(248,250,252,.96),rgba(255,255,255,.9)),
        radial-gradient(circle at 0 0,rgba(31,111,235,.08),transparent 34%);
}

.bpp-filter-bar label{
    display:block;
    min-width:240px;
    color:var(--bpp-navy);
    font-size:13px;
    font-weight:900;
}

.bpp-filter-bar label span{display:block;margin-bottom:7px;}

.bpp-table,
.bpp-wrap .widefat{
    border:1px solid #d8e2ef;
    border-radius:18px;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
    background:#fff;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.bpp-table thead th,
.bpp-wrap .widefat thead th{
    padding:15px 16px;
    border-bottom:1px solid #d8e2ef;
    background:linear-gradient(180deg,#f8fafc,#eef4fb);
    color:#102033;
    font-size:13px;
    font-weight:950;
    text-transform:none;
    letter-spacing:-.01em;
}

.bpp-table tbody td,
.bpp-wrap .widefat tbody td{
    padding:15px 16px;
    border-bottom:1px solid #edf2f7;
    color:#26364a;
    vertical-align:middle;
    font-size:14px;
}

.bpp-table tbody tr:last-child td,
.bpp-wrap .widefat tbody tr:last-child td{border-bottom:0;}
.bpp-table tbody tr:hover td,
.bpp-wrap .widefat tbody tr:hover td{background:#f8fbff!important;}

.bpp-leads-table td:first-child a,
.bpp-wrap .widefat td:first-child a{
    color:#0f55b5;
    font-weight:900;
    text-decoration:none;
}

.bpp-leads-table td:first-child a:hover{text-decoration:underline;}
.bpp-small-action{margin-right:6px!important;}

.bpp-badge.bpp-status-new-lead{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.bpp-badge.bpp-status-contacted,
.bpp-badge.bpp-status-application-sent,
.bpp-badge.bpp-status-application-started{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.bpp-badge.bpp-status-pre-qualified,
.bpp-badge.bpp-status-pre-approved,
.bpp-badge.bpp-status-converted-to-borrower{background:#ecfdf5;border-color:#a7f3d0;color:#047857;}
.bpp-badge.bpp-status-docs-needed,
.bpp-badge.bpp-status-conditions{background:#fff7ed;border-color:#fed7aa;color:#c2410c;}
.bpp-badge.bpp-status-lost{background:#fef2f2;border-color:#fecaca;color:#b91c1c;}

.bpp-overdue-row td{background:#fff7f7!important;}
.bpp-muted{color:var(--bpp-muted);}

.bpp-workflow-box,
.bpp-activity,
.bpp-notes{
    margin-top:22px;
    padding:22px;
    border:1px solid #d8e2ef;
    border-radius:20px;
    background:linear-gradient(180deg,#fff,#f8fbff);
    box-shadow:var(--bpp-shadow-soft);
}

.bpp-workflow-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}
.bpp-workflow-actions form{margin:0;}
.bpp-activity ul{margin:0;}
.bpp-activity li{padding:12px 0;border-bottom:1px solid #edf2f7;}
.bpp-activity li:last-child{border-bottom:0;}
.bpp-activity em{color:var(--bpp-muted);margin-left:8px;}
.bpp-notes textarea{width:100%;max-width:780px;}
.bpp-notes ul{margin:16px 0 0;}
.bpp-notes li{max-width:860px;margin-bottom:12px;padding:14px 16px;border:1px solid #d8e2ef;border-radius:16px;background:#fff;}
.bpp-notes p{margin:8px 0 0;}

.bpp-public-form-wrap{
    max-width:920px;
    margin:28px auto;
    padding:30px;
    border:1px solid rgba(219,228,240,.98);
    border-radius:26px;
    background:rgba(255,255,255,.92);
    box-shadow:0 24px 60px rgba(15,23,42,.12);
}
.bpp-public-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:18px 20px;}
.bpp-public-form label{margin-bottom:16px;}
.bpp-success{margin-bottom:18px;padding:14px 16px;border:1px solid #a7f3d0;border-radius:14px;background:#ecfdf5;color:#065f46;font-weight:900;}

@media(max-width:1280px){
    .bpp-summary-row{grid-template-columns:repeat(3,minmax(130px,1fr));}
    .bpp-cards{grid-template-columns:repeat(2,minmax(180px,1fr));}
}

@media(max-width:960px){
    .bpp-wrap{margin:18px 14px 34px 12px;}
    .bpp-wrap h1{padding:20px 22px 20px 78px;font-size:24px;}
    .bpp-wrap h1::before{left:22px;}
    .bpp-grid-two,.bpp-form-grid,.bpp-public-grid{grid-template-columns:1fr;}
    .bpp-panel{padding:20px;}
    .bpp-wrap .widefat{display:block;overflow-x:auto;white-space:nowrap;}
}

@media(max-width:700px){
    .bpp-cards,.bpp-summary-row{grid-template-columns:1fr;}
    .bpp-filter-bar{display:block;}
    .bpp-filter-bar label{min-width:0;margin-bottom:12px;}
    .bpp-filter-bar .button{margin-top:6px;}
    .bpp-card strong{font-size:30px;}
}

/* Broker Pipeline Pro v1.0.6 - Document Checklist */
.bpp-panel-inner{
    margin-top:22px;
    padding:22px;
    border:1px solid #d8e2ef;
    border-radius:20px;
    background:linear-gradient(180deg,#ffffff,#f8fbff);
    box-shadow:var(--bpp-shadow-soft);
}

.bpp-section-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
}

.bpp-section-head h3{margin:0 0 6px;font-size:20px;font-weight:950;color:#102033;}
.bpp-section-head p{margin:0;}

.bpp-doc-summary{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:14px 0 18px;
}

.bpp-doc-chip{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:7px 10px;
    border:1px solid #d8e2ef;
    border-radius:999px;
    background:#fff;
    color:#475569;
    font-size:12px;
    font-weight:900;
}

.bpp-doc-chip.bpp-status-needed{background:#fff7ed;border-color:#fed7aa;color:#c2410c;}
.bpp-doc-chip.bpp-status-requested{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.bpp-doc-chip.bpp-status-received{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.bpp-doc-chip.bpp-status-approved{background:#ecfdf5;border-color:#a7f3d0;color:#047857;}
.bpp-doc-chip.bpp-status-rejected{background:#fef2f2;border-color:#fecaca;color:#b91c1c;}
.bpp-doc-chip.bpp-status-waived{background:#f8fafc;border-color:#cbd5e1;color:#475569;}

.bpp-document-form{
    margin:0 0 20px;
    padding:16px;
    border:1px solid #d8e2ef;
    border-radius:18px;
    background:#fff;
}

.bpp-document-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:14px;
}

.bpp-document-form textarea{width:100%;margin-top:12px;}
.bpp-document-form p{margin:12px 0 0;}

.bpp-doc-table input,
.bpp-doc-table select,
.bpp-doc-table textarea{
    width:100%;
    min-width:130px;
    border:1px solid #d8e2ef;
    border-radius:10px;
    padding:7px 8px;
    background:#fff;
}

.bpp-doc-table textarea{min-width:180px;resize:vertical;}
.bpp-doc-table td:last-child{white-space:nowrap;}

@media(max-width:960px){
    .bpp-section-head{display:block;}
    .bpp-section-head form{margin-top:14px;}
    .bpp-document-grid{grid-template-columns:1fr;}
}
