*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;font-size:15px;line-height:1.45;color:#1f2433;background:#f3f4f8}
a{color:var(--brand)}
h1{font-size:21px;margin:6px 0 10px}
h2{font-size:16px;margin:22px 0 8px}
h2 small{color:#7a8094;font-weight:400}
.bd-muted{color:#6b7185}
.bd-small{font-size:12.5px}
.bd-empty{color:#7a8094;background:#fff;border:1px dashed #d6d9e3;border-radius:12px;padding:14px;text-align:center}

/* top bar */
.bd-top{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:10px 14px;padding-top:calc(10px + env(safe-area-inset-top));background:#fff;border-bottom:1px solid #e6e8ef}
.bd-brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px}
.bd-brand img{height:34px;width:auto;max-width:170px;object-fit:contain}
.bd-brand-tag{font-size:11px;font-weight:700;color:var(--brand);background:#eef0ff;border-radius:20px;padding:3px 8px;white-space:nowrap}
.bd-user{display:flex;align-items:center;gap:10px}
.bd-avatar{width:32px;height:32px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;text-decoration:none}
.bd-logout{font-size:13px;color:#6b7185;text-decoration:none}

.bd-main{max-width:760px;margin:0 auto;padding:12px 14px 100px}

/* bottom nav */
.bd-nav{position:fixed;bottom:0;left:0;right:0;z-index:20;display:flex;justify-content:space-around;background:#fff;border-top:1px solid #e6e8ef;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
.bd-nav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;text-decoration:none;color:#7a8094;font-size:11px;padding:2px 0}
.bd-nav a i{font-style:normal;font-size:19px;line-height:1.2}
.bd-nav a.on{color:var(--brand);font-weight:600}
.bd-nav a.bd-nav-add i{background:var(--brand);color:#fff;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:26px;margin-top:-18px;box-shadow:0 4px 12px rgba(0,0,0,.18)}

/* cards */
.bd-card{background:#fff;border:1px solid #e6e8ef;border-radius:14px;padding:14px;margin:10px 0}
.bd-hello h1{margin-bottom:0}
.bd-hello p{margin:2px 0 8px}
.bd-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:10px 0}
@media(min-width:600px){.bd-stats{grid-template-columns:repeat(4,1fr)}}
.bd-stat{background:#fff;border:1px solid #e6e8ef;border-radius:14px;padding:12px;text-decoration:none;color:inherit;border-left:4px solid var(--brand)}
.bd-stat b{display:block;font-size:26px;line-height:1.1}
.bd-stat span{font-size:12.5px;color:#6b7185}
.bd-stat.warn{border-left-color:#f59e0b}
.bd-stat.bad{border-left-color:#ef4444}
.bd-stat.good{border-left-color:#10b981}
.bd-mini{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media(min-width:600px){.bd-mini{grid-template-columns:repeat(4,1fr)}}
.bd-mini div{display:flex;flex-direction:column}
.bd-mini b{font-size:17px}
.bd-mini span{font-size:12px}

/* buttons */
.bd-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--brand);color:#fff;border:0;border-radius:12px;padding:12px 16px;font-size:15px;font-weight:600;text-decoration:none;cursor:pointer;width:100%;font-family:inherit}
.bd-btn.sm{width:auto;padding:8px 14px;font-size:13.5px}
.bd-btn.ghost{background:#fff;color:var(--brand);border:1.5px solid var(--brand)}
.bd-btn.wa{background:#25d366}
.bd-btn:active{transform:scale(.98)}
.bd-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.bd-share{display:grid;gap:10px;margin:14px 0}
.bd-head{display:flex;justify-content:space-between;align-items:center;gap:10px}

/* list items */
.bd-item{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid #e6e8ef;border-radius:14px;padding:12px;margin:8px 0;text-decoration:none;color:inherit}
.bd-item-main{display:flex;flex-direction:column;gap:3px;text-decoration:none;color:inherit}
.bd-item-main strong{font-size:15.5px}
.bd-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.bd-item-actions{display:flex;gap:8px;flex-wrap:wrap}
.bd-item-actions.bd-big{margin:10px 0}
.bd-chip{display:inline-flex;align-items:center;gap:4px;padding:6px 12px;border-radius:20px;background:#eef0f6;color:#1f2433;text-decoration:none;font-size:13px;font-weight:500}
.bd-chip.call{background:#e7f0ff;color:#1d4ed8}
.bd-chip.wa{background:#e3f9ec;color:#128c4b}
.bd-badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:12px;font-weight:600;background:#eef0f6;color:#3d4357}
.st-visited{background:#eef0f6;color:#3d4357}
.st-interested{background:#e7f0ff;color:#1d4ed8}
.st-followup{background:#fff4dc;color:#a15c00}
.st-trial{background:#f1e8ff;color:#6d28d9}
.st-onboarded{background:#dcfce7;color:#15803d}
.st-lost{background:#fde8e8;color:#b91c1c}
.bd-fu{font-size:12px;color:#6b7185}
.bd-fu.today{color:#a15c00;font-weight:600}
.bd-fu.late{color:#b91c1c;font-weight:600}
.bd-fu.active{color:#15803d;font-weight:600}
.bd-fu.inactive{color:#9ca3af;font-weight:600}

/* tabs & search */
.bd-tabs{display:flex;gap:6px;overflow-x:auto;padding:4px 0 8px;-webkit-overflow-scrolling:touch}
.bd-tabs a{white-space:nowrap;padding:6px 12px;border-radius:20px;background:#fff;border:1px solid #e1e4ec;color:#3d4357;text-decoration:none;font-size:13px}
.bd-tabs a.on{background:var(--brand);border-color:var(--brand);color:#fff}
.bd-search input,.bd-filter select{width:100%;margin:6px 0}

/* forms */
.bd-form label{display:block;font-size:13px;font-weight:600;color:#3d4357;margin:0 0 12px}
.bd-form input[type=text],.bd-form input[type=email],.bd-form input[type=tel],.bd-form input[type=url],.bd-form input[type=number],.bd-form input[type=date],.bd-form input[type=password],.bd-form select,.bd-form textarea,
.bd-search input,.bd-filter select{display:block;width:100%;margin-top:5px;padding:11px 12px;font-size:16px;font-family:inherit;border:1px solid #d6d9e3;border-radius:10px;background:#fff;color:#1f2433;font-weight:400}
.bd-form input:focus,.bd-form select:focus,.bd-form textarea:focus{outline:2px solid var(--brand);border-color:transparent}
.bd-form fieldset{border:1px solid #e6e8ef;border-radius:12px;padding:8px 12px 2px;margin:0 0 12px}
.bd-form legend{font-size:13px;font-weight:700;padding:0 6px}
.bd-check{display:flex!important;align-items:center;gap:8px;font-weight:500!important}
.bd-check input{width:20px;height:20px;margin:0;flex:none}
.bd-grid2{display:grid;grid-template-columns:1fr;gap:0 12px}
@media(min-width:560px){.bd-grid2{grid-template-columns:1fr 1fr}}
.bd-inline{display:flex;gap:6px}
.bd-inline input{flex:1}
.bd-inline select{width:70px!important;flex:none}
.bd-onboard{background:#f6fbf8;border:1px dashed #b7e4c7;border-radius:12px;padding:10px 12px 0;margin-bottom:12px}
.bd-onboard[hidden]{display:none}
.bd-prod{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #f0f1f5;padding:8px 0;flex-wrap:wrap}
.bd-prod .bd-check{margin:0}
.bd-prod-price{display:flex;align-items:center;gap:6px;font-size:14px}
.bd-prod-price s{color:#9ca3af;font-size:12.5px}
.bd-prod-price input{width:110px!important;margin:0!important;padding:8px!important}
.bd-custom{margin:10px 0}
.bd-custom summary{cursor:pointer;color:var(--brand);font-weight:600;font-size:14px;margin-bottom:8px}
.bd-total{font-size:18px;text-align:right;margin:4px 0 14px}

/* details */
.bd-dl{display:grid;grid-template-columns:120px 1fr;gap:6px 10px;margin:0;font-size:14px}
.bd-dl dt{color:#6b7185}
.bd-dl dd{margin:0;word-break:break-word}
.bd-timeline{border-left:2px solid #e1e4ec;margin-left:6px;padding-left:14px}
.bd-tl{position:relative;margin:0 0 14px}
.bd-tl:before{content:"";position:absolute;left:-20px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--brand)}
.bd-tl b{font-size:14px;margin-right:6px}
.bd-tl p{margin:4px 0 0;font-size:14px;background:#fff;border:1px solid #e6e8ef;border-radius:10px;padding:8px 10px}
.bd-table{width:100%;border-collapse:collapse;font-size:14px}
.bd-table td{padding:7px 0;border-bottom:1px solid #f0f1f5}
.bd-table .r{text-align:right;white-space:nowrap}
.bd-table .tot td{font-weight:700;font-size:16px;border-bottom:0}

/* alerts */
.bd-alert{padding:10px 12px;border-radius:10px;margin:8px 0;font-size:14px}
.bd-alert.ok{background:#dcfce7;color:#14532d}
.bd-alert.err{background:#fde8e8;color:#7f1d1d}

/* login */
.bd-login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.bd-login-card{width:100%;max-width:380px;padding:22px}
.bd-login-card h1{margin-top:16px}
.bd-login-card form p{margin:0 0 12px}
.bd-login-card label{display:block;font-size:13px;font-weight:600;margin-bottom:5px}
.bd-login-card input[type=text],.bd-login-card input[type=password]{width:100%;padding:12px;font-size:16px;border:1px solid #d6d9e3;border-radius:10px}
.bd-login-card .login-remember label{display:flex;gap:8px;align-items:center;font-weight:500}
.bd-login-card input[type=submit]{width:100%;background:var(--brand);color:#fff;border:0;border-radius:12px;padding:13px;font-size:16px;font-weight:600;cursor:pointer}
