/* PowerTech Business Builder — advanced UI. Orange/navy palette, glassy cards,
 * soft shadows, rounded, responsive. Scoped under .bb-page / .bb-wrap / .card.
 */

.bb-page {
    --bb-navy: #0f1d34;
    --bb-navy2: #16284a;
    --bb-orange: #ea580c;
    --bb-orange2: #f59e0b;
    --bb-ink: #1f2a44;
    --bb-mut: #6b7588;
    --bb-line: rgba(15, 29, 52, .08);
    --bb-bg: #f4f6fb;
    --bb-card: #ffffff;
    --bb-radius: 18px;
    --bb-shadow: 0 8px 30px rgba(15, 29, 52, .08);
    --bb-shadow-sm: 0 2px 10px rgba(15, 29, 52, .06);
    background: var(--bb-bg);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--bb-ink);
    margin: 0;
}

/* ---- header ---- */
.bb-header {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px;
    background: linear-gradient(100deg, var(--bb-navy) 0%, var(--bb-navy2) 100%);
    box-shadow: 0 4px 20px rgba(15, 29, 52, .25);
}
.bb-brand { color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: -.02em; }
.bb-bolt { color: var(--bb-orange2); }
.bb-back { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .86rem; font-weight: 600; }
.bb-back:hover { color: #fff; }

.bb-wrap { max-width: 920px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---- hero ---- */
.bb-hero {
    text-align: center; padding: 30px 22px 26px;
    background: linear-gradient(135deg, rgba(234, 88, 12, .06), rgba(22, 40, 74, .05));
    border-radius: var(--bb-radius); margin-bottom: 18px;
    border: 1px solid var(--bb-line);
}
.bb-hero-emoji { display: inline-flex; width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--bb-orange), var(--bb-orange2)); color: #fff; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 6px 18px rgba(234, 88, 12, .35); }
.bb-hero h1 { margin: 14px 0 8px; font-size: 1.5rem; font-weight: 800; color: var(--bb-navy); letter-spacing: -.02em; }
.bb-hero p { margin: 0 auto; max-width: 640px; color: var(--bb-mut); font-size: .92rem; line-height: 1.6; }

.bb-disabled { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .88rem; }
.bb-disabled a { font-weight: 800; }

/* ---- cards ---- */
.bb-card, .card {
    background: var(--bb-card); border: 1px solid var(--bb-line);
    border-radius: var(--bb-radius); padding: 18px 20px; margin-bottom: 16px;
    box-shadow: var(--bb-shadow-sm);
}
.bb-card h2 { margin: 0 0 14px; font-size: 1.08rem; color: var(--bb-navy); display: flex; align-items: center; gap: 9px; }
.bb-card h2 i { color: var(--bb-orange); }
.card-h { margin: 0 0 14px; font-size: 1.05rem; color: var(--bb-navy); display: flex; align-items: center; gap: 9px; font-weight: 700; }
.card-h i { color: var(--bb-orange); }

.bb-field { margin-bottom: 12px; }
.bb-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--bb-navy); margin-bottom: 6px; }
.bb-field textarea, .bb-field input {
    width: 100%; box-sizing: border-box; border: 1px solid var(--bb-line); border-radius: 12px;
    padding: 12px 14px; font: inherit; font-size: .92rem; color: var(--bb-ink); background: #fbfcfe;
    transition: border-color .15s, box-shadow .15s;
}
.bb-field textarea:focus, .bb-field input:focus { outline: none; border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .14); }

/* ---- buttons ---- */
.bb-btn, .btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    border: none; border-radius: 12px; padding: 11px 18px; font: inherit; font-weight: 700; font-size: .88rem;
    transition: transform .08s, box-shadow .15s, background .15s; text-decoration: none; color: #fff;
}
.bb-btn:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { background-size: 200% 100%; }
.bb-btn-primary, .btn.primary { background: linear-gradient(135deg, var(--bb-orange), var(--bb-orange2)); box-shadow: 0 6px 16px rgba(234, 88, 12, .3); color: #fff; }
.bb-btn-primary:hover, .btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(234, 88, 12, .4); }
.bb-btn-ghost, .btn.ghost { background: #eef1f7; color: var(--bb-navy); box-shadow: none; }
.bb-btn-ghost:hover, .btn.ghost:hover { background: #e2e6f0; }
.bb-btn-danger, .btn.danger { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: 0 6px 16px rgba(220, 38, 38, .28); }
.btn.send { padding: 12px 16px; align-self: stretch; }

/* ---- pills ---- */
.ph { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: capitalize; white-space: nowrap; }
.ph-phase { background: var(--bb-navy); color: #fff; }
.ph-phase.sm { padding: 3px 9px; font-size: .68rem; }
.ph-running { background: #16a34a; color: #fff; }
.ph-paused { background: #6b7588; color: #fff; }
.ph-awaiting_human { background: var(--bb-orange); color: #fff; }
.ph-completed { background: #1a8a3c; color: #fff; }
.ph-failed { background: #dc2626; color: #fff; }
.ph-killed { background: #4b5563; color: #fff; }
.ph-queued { background: #94a3b8; color: #fff; }
.ph-good { background: #1a8a3c; color: #fff; }
.ph-warn { background: #d8a200; color: #fff; }
.ph-info { background: #2563eb; color: #fff; }
.ph-bad { background: #dc2626; color: #fff; }
.ph-warn.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---- runs list ---- */
.run-card { background: var(--bb-card); border: 1px solid var(--bb-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: transform .08s, box-shadow .15s, border-color .15s; }
.run-card:hover { transform: translateY(-1px); box-shadow: var(--bb-shadow); border-color: rgba(234, 88, 12, .3); }
.run-card.active { border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .12); }
.run-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-goal { font-weight: 700; color: var(--bb-navy); font-size: .98rem; }
.run-card-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--bb-mut); font-size: .78rem; margin-top: 10px; }
.run-card-meta i { color: var(--bb-orange); margin-right: 4px; }

/* ---- hero / control ---- */
.hero-card { background: linear-gradient(135deg, #fff, #fbfcfe); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hero-goal { font-size: 1.18rem; font-weight: 800; color: var(--bb-navy); display: flex; align-items: center; gap: 10px; }
.hero-goal i { color: var(--bb-orange); }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--bb-mut); font-size: .82rem; margin-top: 12px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.live-dot.on { background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: blink 1.4s infinite; }
.live-dot.off { background: #94a3b8; }
@keyframes blink { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.live-text { font-weight: 600; color: var(--bb-navy); text-transform: capitalize; }
.ctl-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ctl-row .btn { padding: 9px 15px; font-size: .84rem; }

/* ---- owner note ---- */
.note-card { background: linear-gradient(135deg, #fffaf3, #fff); border-color: rgba(234, 88, 12, .18); }
.note-card.dim { opacity: .6; }
.note-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--bb-navy); }
.note-head i { color: var(--bb-orange); }
.note-sub { margin-left: 8px; font-weight: 400; color: var(--bb-mut); font-size: .78rem; }
.note-input { display: flex; gap: 10px; margin-top: 12px; }
.note-input textarea { flex: 1; border: 1px solid var(--bb-line); border-radius: 12px; padding: 11px 13px; font: inherit; font-size: .9rem; resize: vertical; min-height: 44px; }
.note-input textarea:focus { outline: none; border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .14); }
.note-toast { margin-top: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 9px 13px; border-radius: 10px; font-size: .84rem; font-weight: 600; }

/* ---- budget stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.stat { background: #f7f9fd; border: 1px solid var(--bb-line); border-radius: 14px; padding: 12px 14px; }
.stat.hi { background: linear-gradient(135deg, var(--bb-navy), var(--bb-navy2)); color: #fff; border: none; }
.stat.hi .stat-label { color: rgba(255, 255, 255, .7); }
.stat.hi .stat-val { color: var(--bb-orange2); }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bb-mut); font-weight: 700; }
.stat-val { font-size: 1.12rem; font-weight: 800; color: var(--bb-navy); margin-top: 4px; }

/* ---- decisions ---- */
.decision-card { border-color: rgba(217, 119, 6, .25); background: linear-gradient(135deg, #fffbeb, #fff); }
.decision { padding: 12px 0; border-bottom: 1px solid var(--bb-line); }
.decision:last-child { border-bottom: none; }
.decision-q { font-size: .96rem; color: var(--bb-navy); font-weight: 600; margin-bottom: 10px; line-height: 1.5; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt { background: #fff; border: 1.5px solid var(--bb-orange); color: var(--bb-orange); border-radius: 11px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; transition: all .12s; }
.opt:hover { background: var(--bb-orange); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(234, 88, 12, .3); }
.opt.active { background: linear-gradient(135deg, var(--bb-orange), var(--bb-orange2)); color: #fff; border-color: var(--bb-orange); box-shadow: 0 5px 14px rgba(234, 88, 12, .3); }
.opt.active:hover { transform: translateY(-1px); }

/* structured multi-question decision form */
.dec-multi { padding: 4px 0 6px; }
.dec-q-block { padding: 12px 0; border-bottom: 1px dashed var(--bb-line); }
.dec-q-block:last-of-type { border-bottom: none; }
.dec-q-text { font-size: .92rem; color: var(--bb-navy); font-weight: 600; margin-bottom: 9px; line-height: 1.45; }
.dec-mode { display: inline-block; margin-left: 4px; font-size: .68rem; font-weight: 700; color: var(--bb-mut); background: #eef1f7; border-radius: 999px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.dec-other { width: 100%; box-sizing: border-box; margin-top: 9px; border: 1px solid var(--bb-line); border-radius: 11px; padding: 10px 13px; font: inherit; font-size: .88rem; background: #fbfcfe; }
.dec-other:focus { outline: none; border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .14); }
.dec-submit { margin-top: 14px; }

/* ---- sourcing ---- */
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sup { background: #f7f9fd; border: 1px solid var(--bb-line); border-radius: 14px; padding: 13px; }
.sup-name { font-weight: 700; color: var(--bb-navy); font-size: .92rem; }
.vtick { color: #1a8a3c; }
.sup-type { color: var(--bb-mut); font-size: .76rem; text-transform: capitalize; margin: 3px 0 8px; }
.sup-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; }
.sup-phone { color: var(--bb-mut); }
.lnk { color: var(--bb-orange); text-decoration: none; font-weight: 600; border-bottom: 1px dotted var(--bb-orange); }
.lnk:hover { color: #c2410c; }
.lnk i { margin-right: 4px; }

.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cand { display: flex; background: #fff; border: 1px solid var(--bb-line); border-radius: 16px; overflow: hidden; transition: transform .1s, box-shadow .15s, border-color .15s; }
.cand:hover { transform: translateY(-2px); box-shadow: var(--bb-shadow); border-color: rgba(234, 88, 12, .25); }
.cand-thumb { width: 110px; flex: 0 0 110px; background: #eef1f7; display: flex; align-items: center; justify-content: center; color: #aab; font-size: 1.8rem; overflow: hidden; }
.cand-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand-thumb.noimg { background: linear-gradient(135deg, #eef1f7, #e4e8f1); }
.cand-body { padding: 11px 13px; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cand-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cand-name { font-weight: 700; color: var(--bb-navy); font-size: .92rem; line-height: 1.3; }
.score { background: linear-gradient(135deg, var(--bb-navy), var(--bb-navy2)); color: var(--bb-orange2); border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 800; flex: 0 0 auto; }
.cand-cat { font-size: .74rem; color: var(--bb-mut); text-transform: capitalize; margin: 4px 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cand-price { font-weight: 800; font-size: 1.05rem; color: var(--bb-orange); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cand-conv { font-size: .78rem; font-weight: 600; color: var(--bb-mut); }
.cand-moq { font-size: .76rem; color: var(--bb-mut); margin: 5px 0; }
.cand-moq i { color: var(--bb-orange); margin-right: 4px; }
.cand-spec { font-size: .72rem; color: #5a6270; margin: 4px 0 6px; word-break: break-word; background: #f7f9fd; padding: 5px 8px; border-radius: 7px; }
.cand-foot { margin-top: auto; padding-top: 4px; }

/* ---- research / plan ---- */
.paper, .plan { padding: 12px 0; border-bottom: 1px solid var(--bb-line); }
.paper:last-child, .plan:last-child { border-bottom: none; }
.paper-title, .paper-sum { font-weight: 700; color: var(--bb-navy); margin-bottom: 4px; font-size: .96rem; }
.paper-sum { font-weight: 400; font-size: .88rem; line-height: 1.55; color: #334; white-space: pre-wrap; }
.src-links { font-size: .78rem; margin-top: 8px; line-height: 1.9; }
.plan-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.miles { margin: 8px 0 0 18px; font-size: .86rem; line-height: 1.7; color: #334; }
.miles li { padding: 3px 0; }
.ms-cost { color: var(--bb-orange); font-weight: 700; font-size: .8rem; }

/* ---- outreach & deals (Phase 2) ---- */
.sub-h { margin: 16px 0 8px; font-size: .78rem; font-weight: 800; color: var(--bb-navy); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 7px; }
.sub-h:first-child { margin-top: 0; }

.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rel-card { background: #f7f9fd; border: 1px solid var(--bb-line); border-radius: 14px; padding: 12px 14px; }
.rel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rel-top b { color: var(--bb-navy); font-size: .9rem; }
.rel-terms { font-size: .8rem; color: var(--bb-mut); margin-top: 7px; }
.rel-notes { font-size: .8rem; color: #475; margin-top: 6px; line-height: 1.5; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc-card { background: #fff; border: 1px solid var(--bb-line); border-radius: 14px; padding: 12px 14px; transition: transform .1s, box-shadow .15s, border-color .15s; }
.doc-card:hover { transform: translateY(-1px); box-shadow: var(--bb-shadow-sm); border-color: rgba(234, 88, 12, .25); }
.doc-top { display: flex; align-items: center; gap: 8px; }
.doc-num { font-weight: 800; color: var(--bb-navy); font-size: .92rem; }
.doc-meta { font-size: .8rem; color: var(--bb-mut); margin: 6px 0 9px; text-transform: capitalize; }
.doc-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.doc-links .lnk-btn { padding: 4px 2px; }

.om-list { display: flex; flex-direction: column; gap: 10px; }
.om { border: 1px solid var(--bb-line); border-radius: 12px; padding: 10px 12px; background: #f7f9fd; }
.om-in { border-left: 3px solid #2563eb; }
.om-out { border-left: 3px solid var(--bb-orange); }
.om-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .76rem; margin-bottom: 5px; }
.om-ch { background: var(--bb-navy); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: .7rem; font-weight: 700; text-transform: capitalize; }
.om-supp { color: var(--bb-navy); font-weight: 700; }
.om-head .ph { margin-left: auto; }
.om-subj { font-weight: 700; color: var(--bb-navy); font-size: .86rem; margin-bottom: 4px; }
.om-body { font-size: .84rem; line-height: 1.5; color: #334; white-space: pre-wrap; word-break: break-word; }

/* ---- tasks / activity ---- */
.bb-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--bb-line); }
.bb-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: 9px 14px; font: inherit; font-weight: 700; color: var(--bb-mut); cursor: pointer; font-size: .86rem; }
.bb-tab.active { color: var(--bb-orange); border-bottom-color: var(--bb-orange); }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bb-line); font-size: .86rem; flex-wrap: wrap; }
.task:last-child { border-bottom: none; }
.task-role { background: var(--bb-navy); color: #fff; border-radius: 8px; padding: 3px 9px; font-size: .72rem; font-weight: 700; text-transform: capitalize; }
.task-title { flex: 1; color: #334; }
.task-st { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: capitalize; }
.st-done { background: #dcfce7; color: #166534; }
.st-pending { background: #fef3c7; color: #92400e; }
.st-running { background: #dbeafe; color: #1e40af; }
.st-awaiting_input { background: #fee2e2; color: #b91c1c; }
.st-failed { background: #f3f4f6; color: #6b7280; }
.st-skipped { background: #f3f4f6; color: #9ca3af; }

.msg { padding: 10px 0; border-bottom: 1px solid var(--bb-line); }
.msg:last-child { border-bottom: none; }
.msg.owner .msg-body { background: #fff7ed; border-left: 3px solid var(--bb-orange); }
.msg.tool .msg-body { background: #f3f4f6; font-family: monospace; font-size: .76rem; }
.msg-head { display: flex; gap: 9px; align-items: center; margin-bottom: 5px; font-size: .76rem; }
.msg-role { text-transform: capitalize; font-weight: 700; color: var(--bb-navy); }
.msg-agent { background: #eef1f7; color: var(--bb-navy); border-radius: 6px; padding: 2px 7px; font-size: .7rem; }
.msg-time { color: var(--bb-mut); margin-left: auto; }
.msg-body { font-size: .85rem; line-height: 1.5; color: #334; white-space: pre-wrap; word-break: break-word; padding: 8px 11px; border-radius: 9px; background: #f7f9fd; }
.event { padding: 6px 0; font-size: .8rem; border-bottom: 1px solid var(--bb-line); }
.event:last-child { border-bottom: none; }
.ev-time { color: var(--bb-mut); font-variant-numeric: tabular-nums; }
.empty { color: var(--bb-mut); padding: 18px; text-align: center; font-size: .88rem; }

/* ---- modal ---- */
.bb-modal-bg { position: fixed; inset: 0; background: rgba(15, 29, 52, .5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.bb-modal { background: #fff; border-radius: 20px; padding: 24px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(15, 29, 52, .3); }
.bb-modal h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--bb-navy); display: flex; align-items: center; gap: 8px; }
.bb-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---- e-sign modal (purchase order / proforma) ---- */
/* Reuses .bb-modal-bg from above; inner card is .sg-card (wider, holds a table). */
.sg-card {
    background: #fff; border-radius: 20px; padding: 22px 24px 18px;
    max-width: 640px; width: 100%; box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(15, 29, 52, .3);
    max-height: 92vh; overflow-y: auto;
}
.sg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.sg-head b { font-size: 1.12rem; color: var(--bb-navy); font-weight: 800; }
.sg-num { font-size: .82rem; color: var(--bb-mut); font-weight: 600; }
.sg-meta { font-size: .84rem; color: var(--bb-mut); margin-bottom: 14px; }
.sg-meta b { color: var(--bb-navy); }
.sg-tbl { width: 100%; border-collapse: collapse; font-size: .84rem; margin-bottom: 12px; }
.sg-tbl th { text-align: left; color: var(--bb-mut); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 2px solid var(--bb-line); }
.sg-tbl td { padding: 9px 10px; border-bottom: 1px solid var(--bb-line); color: #334; }
.sg-tot { display: flex; justify-content: space-between; align-items: center; padding: 7px 2px; font-size: .88rem; color: var(--bb-mut); }
.sg-tot b { color: var(--bb-navy); font-weight: 700; font-variant-numeric: tabular-nums; }
.sg-tot.grand { margin-top: 6px; padding-top: 12px; border-top: 2px solid var(--bb-line); font-size: 1rem; color: var(--bb-navy); font-weight: 800; }
.sg-tot.grand b { color: var(--bb-orange); font-size: 1.15rem; }
.sg-terms { font-size: .82rem; color: #475; background: #f7f9fd; border: 1px solid var(--bb-line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; line-height: 1.55; }
.sg-terms b { color: var(--bb-navy); }
.sg-signed { display: flex; align-items: center; gap: 8px; color: #1a8a3c; font-weight: 700; font-size: .9rem; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.sg-signed i { font-size: 1.1rem; }
.sg-pad-wrap { position: relative; margin: 10px 0 8px; }
#bb-sign-canvas { width: 100%; height: 160px; box-sizing: border-box; border: 2px dashed var(--bb-line); border-radius: 12px; background: #fbfcfe; display: block; touch-action: none; cursor: crosshair; }
.sg-pad-wrap .lnk-btn { position: absolute; top: 6px; right: 8px; font-size: .78rem; }
.sg-name { width: 100%; box-sizing: border-box; border: 1px solid var(--bb-line); border-radius: 12px; padding: 11px 14px; font: inherit; font-size: .9rem; margin-bottom: 10px; background: #fbfcfe; }
.sg-name:focus { outline: none; border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(234, 88, 12, .14); }
#bb-sign-submit { width: 100%; justify-content: center; }
.sg-close { margin-top: 14px; }
.lnk-btn { background: none; border: none; color: var(--bb-mut); font: inherit; font-weight: 600; font-size: .84rem; cursor: pointer; padding: 6px 4px; text-decoration: none; transition: color .15s; }
.lnk-btn:hover { color: var(--bb-navy); }
.sg-card .lnk { display: inline-flex; align-items: center; margin-top: 10px; }

@media (max-width: 640px) {
    .bb-header { padding: 12px 14px; }
    .bb-hero h1 { font-size: 1.25rem; }
    .hero-goal { font-size: 1rem; }
    .cand-grid, .sup-grid, .stats { grid-template-columns: 1fr; }
    .rel-grid, .doc-grid { grid-template-columns: 1fr; }
    .cand-thumb { width: 88px; flex-basis: 88px; }
    .note-input { flex-direction: column; }
    .sg-card { padding: 18px 16px 14px; }
    .sg-tbl { font-size: .78rem; }
    .sg-tbl th, .sg-tbl td { padding: 7px 6px; }
}