﻿:root, [data-theme="light"]{
  --bg:#FAF9F5;
  --bg-2:#F5F3ED;
  --surface:#FFFFFF;
  --surface-2:#FAF9F5;
  --surface-3:#F5F3ED;
  --surface-4:#EBE7DD;
  --accent:#D97757;
  --accent-h:#C15F3C;
  --accent-l:#E89A7E;
  --accent-soft:#FBEEE7;
  --accent-border:#F0D5C7;
  --success:#5C8A6B;--success-soft:#EDF4EF;--success-border:#C9DECF;
  --warning:#C4894B;--warning-soft:#FBF1E5;--warning-border:#EFD9BC;
  --danger:#B85450;--danger-soft:#FAE9E7;--danger-border:#EBC8C5;
  --info:#6B8BA3;--info-soft:#EAF1F6;
  --text:#1F1E1B;
  --text-2:#4A4944;
  --muted:#79766D;
  --muted-2:#A8A49A;
  --border:#E5E0D5;
  --border-2:#D9D3C4;
  --border-h:#B8B0A0;
  --shadow-xs:0 1px 2px rgba(31,30,27,.04);
  --shadow:0 2px 8px -2px rgba(31,30,27,.06),0 1px 3px rgba(31,30,27,.04);
  --shadow-lg:0 12px 32px -12px rgba(31,30,27,.12);
  --sidebar-w:260px;--topbar-h:68px;
  --t:.18s cubic-bezier(.4,0,.2,1);
  --chart-line:#D97757;
  --chart-fill-top:rgba(217,119,87,.18);
  --chart-fill-bottom:rgba(217,119,87,0);
  --chart-grid:rgba(31,30,27,.06);
  --chart-tick:#79766D;
  --chart-point-border:#FFFFFF;
}
[data-theme="dark"]{
  --bg:#1F1E1B;
  --bg-2:#262521;
  --surface:#262521;
  --surface-2:#2D2B26;
  --surface-3:#302E28;
  --surface-4:#3A372F;
  --accent:#E89A7E;
  --accent-h:#D97757;
  --accent-l:#F0B49D;
  --accent-soft:rgba(232,154,126,.14);
  --accent-border:rgba(232,154,126,.3);
  --success:#7FA98B;--success-soft:rgba(127,169,139,.14);--success-border:rgba(127,169,139,.3);
  --warning:#DBAB6E;--warning-soft:rgba(219,171,110,.14);--warning-border:rgba(219,171,110,.3);
  --danger:#D07F7A;--danger-soft:rgba(208,127,122,.14);--danger-border:rgba(208,127,122,.3);
  --info:#8FAAC0;--info-soft:rgba(143,170,192,.14);
  --text:#F5F3ED;
  --text-2:#C9C5BA;
  --muted:#908C82;
  --muted-2:#5F5C55;
  --border:rgba(200,195,180,.14);
  --border-2:rgba(200,195,180,.22);
  --border-h:rgba(200,195,180,.4);
  --shadow-xs:0 1px 2px rgba(0,0,0,.35);
  --shadow:0 4px 12px -3px rgba(0,0,0,.4);
  --shadow-lg:0 16px 40px -16px rgba(0,0,0,.5);
  --chart-line:#E89A7E;
  --chart-fill-top:rgba(232,154,126,.25);
  --chart-fill-bottom:rgba(232,154,126,0);
  --chart-grid:rgba(200,195,180,.08);
  --chart-tick:#908C82;
  --chart-point-border:#262521;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,system-ui,sans-serif;
  font-size:15px;line-height:1.55;color:var(--text);background:var(--bg);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  min-height:100vh;overflow-x:hidden;
  transition:background .25s ease,color .25s ease;
}
h1,h2,h3,h4,h5,h6{margin:0;font-weight:600;color:var(--text);letter-spacing:-.02em}
a{color:var(--accent);text-decoration:none;transition:color var(--t)}
a:hover{color:var(--accent-h)}
button{font-family:inherit}
svg{flex-shrink:0}
::selection{background:var(--accent-soft);color:var(--accent-h)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:6px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:var(--border-h);background-clip:padding-box}

/* SIDEBAR */
.bb-sidebar{position:fixed;top:0;left:0;bottom:0;width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:40;transition:transform var(--t),background .25s}
.bb-sidebar-head{padding:20px 18px 18px;border-bottom:1px solid var(--border)}
.bb-brand{display:flex;align-items:center;gap:12px;min-width:0}
.bb-brand-icon{width:48px;height:48px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.bb-brand-icon img{width:100%;height:100%;object-fit:contain;display:block}
.bb-brand-text{min-width:0;overflow:hidden}
.bb-brand-title{font-weight:600;font-size:14px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:170px;color:var(--text)}
.bb-brand-sub{font-size:10px;color:var(--muted-2);margin-top:3px;letter-spacing:.14em;font-weight:600;text-transform:uppercase}
.bb-sidebar-body{flex:1;overflow-y:auto;padding:14px 10px}
.bb-nav-section{margin-bottom:20px}
.bb-nav-label{font-size:10.5px;font-weight:600;color:var(--muted-2);text-transform:uppercase;letter-spacing:.12em;padding:6px 12px 6px}
.bb-nav-item{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:8px;color:var(--text-2);font-size:14px;font-weight:500;transition:var(--t);position:relative;margin-bottom:1px}
.bb-nav-item svg,.bb-nav-item i{width:18px;height:18px;stroke-width:1.75;color:var(--muted);flex-shrink:0;transition:var(--t)}
.bb-nav-item:hover{background:var(--surface-3);color:var(--text)}
.bb-nav-item:hover svg{color:var(--text-2)}
.bb-nav-item.active{background:var(--accent-soft);color:var(--accent-h);font-weight:600}
.bb-nav-item.active svg{color:var(--accent)}
.bb-nav-item.active::before{content:'';position:absolute;left:-10px;top:50%;transform:translateY(-50%);width:3px;height:18px;border-radius:0 3px 3px 0;background:var(--accent)}
.bb-sidebar-foot{padding:12px;border-top:1px solid var(--border)}
.bb-user{display:flex;align-items:center;gap:10px;padding:8px;border-radius:9px;transition:var(--t)}
.bb-user:hover{background:var(--surface-3)}
.bb-user-avatar{width:36px;height:36px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:13.5px;flex-shrink:0}
.bb-user-info{overflow:hidden;min-width:0;flex:1}
.bb-user-name{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-user-role{font-size:11.5px;color:var(--muted);margin-top:2px}
.bb-logout-btn{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;padding:8px 12px;border-radius:9px;background:transparent;border:1px solid var(--border);color:var(--muted);font-size:13px;font-weight:500;cursor:pointer;transition:var(--t);text-decoration:none;margin-top:8px}
.bb-logout-btn:hover{border-color:var(--danger-border);color:var(--danger);background:var(--danger-soft)}
.bb-logout-btn svg{width:14px;height:14px}

/* TOPBAR */
.bb-topbar{position:fixed;top:0;left:var(--sidebar-w);right:0;height:var(--topbar-h);background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:16px;padding:0 24px;z-index:30}
.bb-burger{display:none;width:38px;height:38px;border-radius:8px;background:transparent;border:1px solid var(--border);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center;transition:var(--t)}
.bb-burger:hover{background:var(--surface-3)}
.bb-crumbs{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);flex-shrink:0}
.bb-crumbs-current{color:var(--text);font-weight:600}
.bb-topbar-search{flex:1;max-width:440px;position:relative}
.bb-topbar-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted-2);pointer-events:none}
.bb-topbar-search input{width:100%;padding:10px 14px 10px 38px;background:var(--surface-3);border:1px solid transparent;border-radius:9px;font-size:14px;color:var(--text);outline:none;transition:var(--t);font-family:inherit}
.bb-topbar-search input::placeholder{color:var(--muted-2)}
.bb-topbar-search input:focus{background:var(--surface);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.bb-topbar-right{margin-left:auto;display:flex;align-items:center;gap:4px}
.bb-icon-btn-top{position:relative;width:38px;height:38px;border-radius:9px;background:transparent;border:1px solid transparent;color:var(--text-2);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:var(--t)}
.bb-icon-btn-top:hover{background:var(--surface-3);color:var(--text)}
.bb-icon-btn-top svg{width:19px;height:19px;stroke-width:1.75}
.bb-badge-dot{position:absolute;top:3px;right:3px;min-width:17px;height:17px;background:var(--accent);color:#fff;font-size:10px;font-weight:600;border-radius:999px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid var(--surface)}
.bb-theme-toggle .bb-icon-moon{display:block}
.bb-theme-toggle .bb-icon-sun{display:none}
[data-theme="dark"] .bb-theme-toggle .bb-icon-moon{display:none}
[data-theme="dark"] .bb-theme-toggle .bb-icon-sun{display:block}

/* MAIN */
.bb-main{margin-left:var(--sidebar-w);padding:calc(var(--topbar-h) + 32px) 32px 48px;min-height:100vh}
.bb-overlay{display:none;position:fixed;inset:0;background:rgba(31,30,27,.35);z-index:35}
.bb-page-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:28px;gap:16px;flex-wrap:wrap}
.bb-page-head h1{font-size:28px;font-weight:600;letter-spacing:-.025em;color:var(--text);line-height:1.2}
.bb-page-head p{margin:6px 0 0;font-size:14px;color:var(--muted)}
.bb-page-head-actions{display:flex;gap:10px;flex-wrap:wrap}

/* BUTTONS */
.bb-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 18px;border-radius:9px;background:var(--accent);color:#fff;font-size:14px;font-weight:500;border:1px solid var(--accent);cursor:pointer;transition:var(--t);text-decoration:none;white-space:nowrap;font-family:inherit}
.bb-btn:hover{background:var(--accent-h);border-color:var(--accent-h);color:#fff}
.bb-btn:active{transform:translateY(1px)}
.bb-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-soft)}
.bb-btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important}
.bb-btn svg{width:16px;height:16px;stroke-width:2}
.bb-btn-full{width:100%}
.bb-btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 18px;border-radius:9px;background:var(--surface);color:var(--text-2);font-size:14px;font-weight:500;border:1px solid var(--border-2);cursor:pointer;transition:var(--t);text-decoration:none;white-space:nowrap;font-family:inherit}
.bb-btn-ghost:hover{background:var(--surface-2);border-color:var(--border-h);color:var(--text)}
.bb-btn-ghost svg{width:16px;height:16px;stroke-width:1.75}
.bb-btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.bb-btn-danger:hover{background:#9F4642;border-color:#9F4642;color:#fff}

/* CARDS */
.bb-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:24px;transition:var(--t);box-shadow:var(--shadow-xs)}
.bb-card:hover{border-color:var(--border-2);box-shadow:var(--shadow)}
.bb-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:12px}
.bb-card-head h3,.bb-card h3{margin:0 0 16px;font-size:15px;font-weight:600;color:var(--text);letter-spacing:-.01em}
.bb-card-head h3{margin:0}

/* KPI */
.bb-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:24px}
.bb-kpi{padding:22px 24px;display:flex;flex-direction:column;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:12px;transition:var(--t);box-shadow:var(--shadow-xs)}
.bb-kpi:hover{border-color:var(--border-2);box-shadow:var(--shadow)}
.bb-kpi-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.bb-kpi-label{font-size:12px;font-weight:500;color:var(--muted);letter-spacing:.01em}
.bb-kpi-icon{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent)}
.bb-kpi-icon svg{width:17px;height:17px;stroke-width:1.9}
.bb-kpi-value{font-size:28px;font-weight:600;letter-spacing:-.025em;line-height:1.15;color:var(--text)}
.bb-kpi-mini{padding:18px 20px;text-align:center}
.bb-kpi-mini .bb-kpi-label{font-size:12px;margin-bottom:6px}
.bb-kpi-mini .bb-kpi-value{font-size:22px;margin-top:4px}

/* GRIDS */
.bb-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:24px}
.bb-grid-2-1{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:24px}
.bb-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
.bb-grid-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}

/* ROWS */
.bb-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border);transition:var(--t)}
.bb-row:last-child{border-bottom:0;padding-bottom:0}
.bb-row:first-child{padding-top:0}
.bb-row-title{font-weight:500;font-size:14px;color:var(--text)}
.bb-row-value{font-weight:600;color:var(--accent);font-size:14px}

/* TABLES */
.bb-table-wrap{padding:0;overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-xs)}
.bb-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}
.bb-table thead th{text-align:left;padding:14px 18px;background:var(--surface-3);font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--border);white-space:nowrap}
.bb-table tbody td{padding:16px 18px;border-bottom:1px solid var(--border);color:var(--text-2);vertical-align:middle;transition:background var(--t)}
.bb-table tbody tr:last-child td{border-bottom:0}
.bb-table tbody tr:hover td{background:var(--surface-2);color:var(--text)}
.bb-row-low td{background:var(--danger-soft)!important}
.bb-empty{text-align:center;padding:64px 24px;color:var(--muted);font-size:14px}
.bb-empty svg{width:40px;height:40px;color:var(--muted-2);margin:0 auto 14px;display:block;opacity:.5}
.bb-actions{display:flex;gap:4px;justify-content:flex-end;align-items:center}
.bb-actions form{display:inline}
.bb-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:7px;background:transparent;border:1px solid transparent;color:var(--muted);cursor:pointer;transition:var(--t);padding:0}
.bb-icon-btn:hover{background:var(--surface-3);color:var(--text);border-color:var(--border)}
.bb-icon-btn-danger:hover{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-border)}
.bb-icon-btn svg{width:15px;height:15px;stroke-width:1.75}

/* BADGES */
.bb-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:6px;font-size:12px;font-weight:500;background:var(--surface-3);color:var(--text-2);border:1px solid var(--border)}
.bb-badge-lead,.bb-badge-new,.bb-badge-todo,.bb-badge-low,.bb-badge-inactive,.bb-badge-employee{background:var(--surface-3);color:var(--muted);border-color:var(--border)}
.bb-badge-active,.bb-badge-won,.bb-badge-done,.bb-badge-planning{background:var(--success-soft);color:var(--success);border-color:var(--success-border)}
.bb-badge-qualified,.bb-badge-progress,.bb-badge-owner,.bb-badge-admin{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-border)}
.bb-badge-proposal,.bb-badge-medium,.bb-badge-manager,.bb-badge-paused{background:var(--warning-soft);color:var(--warning);border-color:var(--warning-border)}
.bb-badge-lost,.bb-badge-high,.bb-badge-cancelled{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-border)}
.bb-badge-light{padding:3px 10px;border-radius:6px;font-size:12px;font-weight:500;background:var(--surface-3);color:var(--muted);border:1px solid var(--border)}

/* FORMS */
.bb-form{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:28px;box-shadow:var(--shadow-xs)}
.bb-field{margin-bottom:18px}
.bb-field:last-child{margin-bottom:0}
.bb-field label{display:block;font-size:13px;font-weight:500;color:var(--text-2);margin-bottom:8px}
.bb-field input,.bb-field select,.bb-field textarea,.bb-filter input,.bb-filter select{width:100%;padding:11px 14px;background:var(--surface);color:var(--text);border:1px solid var(--border-2);border-radius:8px;font-size:14px;font-family:inherit;outline:none;transition:var(--t)}
.bb-field textarea{resize:vertical;min-height:92px}
.bb-field input:hover,.bb-field select:hover,.bb-field textarea:hover{border-color:var(--border-h)}
.bb-field input:focus,.bb-field select:focus,.bb-field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.bb-field input::placeholder,.bb-field textarea::placeholder{color:var(--muted-2)}
.bb-error{color:var(--danger);font-size:12.5px;margin-top:6px;display:flex;align-items:center;gap:5px}
.bb-help{font-size:12px;color:var(--muted);margin-top:6px}
.bb-form-actions{display:flex;gap:10px;margin-top:26px;justify-content:flex-end;padding-top:22px;border-top:1px solid var(--border)}

/* ALERTS / TOAST */
.bb-alert{padding:13px 16px;border-radius:10px;margin-bottom:14px;font-size:14px;font-weight:500;display:flex;align-items:flex-start;gap:10px;border:1px solid var(--border);background:var(--surface)}
.bb-alert-success{background:var(--success-soft);color:var(--success);border-color:var(--success-border)}
.bb-alert-error{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-border)}
.bb-alert-warning{background:var(--warning-soft);color:var(--warning);border-color:var(--warning-border)}
.bb-alert-info{background:var(--info-soft);color:var(--info);border-color:var(--accent-border)}
.bb-toast-wrap{position:fixed;top:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:10px;max-width:400px}
.bb-toast{background:var(--surface);border:1px solid var(--border-2);border-radius:11px;padding:16px 18px;display:flex;align-items:flex-start;gap:12px;font-size:14px;color:var(--text);box-shadow:var(--shadow-lg);animation:bbToastIn .3s cubic-bezier(.34,1.56,.64,1);border-left:3px solid var(--accent)}
.bb-toast.success{border-left-color:var(--success)}
.bb-toast.error{border-left-color:var(--danger)}
.bb-toast.warning{border-left-color:var(--warning)}
.bb-toast.hide{opacity:0;transform:translateX(20px);transition:opacity .25s,transform .25s}
@keyframes bbToastIn{from{opacity:0;transform:translateX(120%)}to{opacity:1;transform:translateX(0)}}

/* AUTH */
.bb-guest{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}
.bb-auth-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:40px 36px;box-shadow:var(--shadow-lg)}
.bb-auth-logo{text-align:center;margin-bottom:30px}
.bb-auth-icon{width:88px;height:88px;display:inline-flex;align-items:center;justify-content:center}
.bb-auth-icon img{width:100%;height:100%;object-fit:contain;display:block}
.bb-auth-logo h1{margin:18px 0 6px;font-size:22px;font-weight:600;letter-spacing:-.02em;color:var(--text)}
.bb-auth-sub{font-size:11px;color:var(--muted);letter-spacing:.24em;text-transform:uppercase;font-weight:500}
.bb-auth-footer{text-align:center;margin-top:24px;padding-top:24px;border-top:1px solid var(--border);color:var(--muted);font-size:14px}
.bb-auth-footer a{font-weight:500}

/* KANBAN */
.bb-kanban{display:grid;gap:16px;align-items:start}
.bb-kanban-3{grid-template-columns:repeat(3,1fr)}
.bb-kanban-5{grid-template-columns:repeat(5,1fr)}
.bb-col{padding:14px;min-height:200px;background:var(--surface-3)!important;border:1px solid var(--border);border-radius:12px;transition:var(--t)}
.bb-col.drop-active{background:var(--accent-soft)!important;border-color:var(--accent);border-style:dashed}
.bb-col-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.bb-col-title{font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.bb-col-count{min-width:24px;height:22px;padding:0 8px;background:var(--surface);border:1px solid var(--border);border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:600;color:var(--text-2)}
.bb-col-sum{font-size:13px;font-weight:600;color:var(--accent);margin-bottom:14px}
.bb-deal-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:14px;margin-bottom:9px;cursor:grab;transition:var(--t);box-shadow:var(--shadow-xs)}
.bb-deal-card:hover{border-color:var(--border-h);box-shadow:var(--shadow)}
.bb-deal-card:active,.bb-deal-card.dragging{cursor:grabbing;opacity:.9;transform:rotate(1.5deg) scale(.98)}
.bb-deal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:6px;margin-bottom:8px}
.bb-deal-title{font-weight:500;font-size:13.5px;color:var(--text);line-height:1.4}
.bb-deal-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:12.5px}
.bb-empty-mini{text-align:center;padding:28px 12px;color:var(--muted-2);font-size:13px;border:1px dashed var(--border-2);border-radius:9px}

/* PROGRESS */
.bb-progress{height:6px;background:var(--surface-4);border-radius:999px;overflow:hidden;margin:14px 0}
.bb-progress-bar{height:100%;border-radius:999px;background:var(--accent);transition:width .3s ease}

/* FILTER */
.bb-filter{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:12px}
.bb-filter input,.bb-filter select{flex:1;min-width:180px;padding:10px 13px;font-size:14px}
.bb-filter .bb-btn,.bb-filter .bb-btn-ghost{padding:10px 18px}

/* NOTIF */
.bb-notif{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--border);text-decoration:none;color:var(--text-2);transition:var(--t)}
.bb-notif:last-child{border-bottom:0}
.bb-notif:hover{background:var(--surface-2)}
.bb-notif-unread{background:var(--accent-soft)}

/* MISC */
.bb-link{color:var(--accent);font-weight:500}
.bb-link:hover{color:var(--accent-h);text-decoration:underline}
.bb-muted{color:var(--muted)}
.bb-muted-2{color:var(--muted-2)}
.bb-small{font-size:12.5px}
.bb-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px}
.c-green{color:var(--success)}
.c-red{color:var(--danger)}
.c-blue{color:var(--accent)}
.c-accent{color:var(--info)}
.c-amber{color:var(--warning)}
.bb-move-row{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--border);align-items:center}
.bb-move-row:last-child{border-bottom:0}
.bb-move-amount{font-weight:600;font-size:14px;min-width:70px;text-align:right}

@media(max-width:1200px){.bb-kanban-5{grid-template-columns:repeat(2,1fr)}.bb-grid-2-1{grid-template-columns:1fr}.bb-grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.bb-grid-2,.bb-grid-3{grid-template-columns:1fr}.bb-kpi-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){
  :root{--sidebar-w:0px}
  .bb-sidebar{transform:translateX(-100%);width:270px;box-shadow:var(--shadow-lg)}
  .bb-sidebar.open{transform:translateX(0)}
  .bb-overlay.show{display:block}
  .bb-burger{display:flex}
  .bb-topbar{left:0;padding:0 16px}
  .bb-topbar-search{max-width:none}
  .bb-crumbs{display:none}
  .bb-main{padding:calc(var(--topbar-h) + 20px) 16px 32px}
  .bb-page-head h1{font-size:22px}
  .bb-kpi-grid{grid-template-columns:1fr}
  .bb-kanban-3,.bb-kanban-5{grid-template-columns:1fr}
  .bb-table-wrap{overflow-x:auto}
  .bb-table{min-width:640px}
  .bb-form{padding:22px}
  .bb-auth-card{padding:32px 24px}
  .bb-toast-wrap{left:12px;right:12px;top:12px;max-width:none}
  .bb-brand-icon{width:42px;height:42px}
  .bb-auth-icon{width:72px;height:72px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* ============================================================
   Claude-style wordmark
   ============================================================ */
.bb-wordmark{
  display:inline-flex;align-items:center;gap:10px;
  padding:6px 10px;margin-left:-4px;border-radius:9px;
  color:var(--text);text-decoration:none;
  font-family:'Instrument Serif',Georgia,'Times New Roman',serif;
  font-size:24px;font-weight:400;line-height:1;
  letter-spacing:-.01em;
  transition:background .16s ease,color .16s ease;
  flex-shrink:0;
}
.bb-wordmark:hover{background:var(--surface-3);color:var(--text)}
.bb-wordmark-icon{width:24px;height:24px;color:var(--accent);flex-shrink:0}
.bb-wordmark-text{padding-bottom:1px}
@media(max-width:640px){
  .bb-wordmark{font-size:20px;gap:8px;padding:5px 8px}
  .bb-wordmark-icon{width:20px;height:20px}
}


/* ============================================================
   КАНБАН — карточки отдельно друг от друга
   ============================================================ */
.bb-col{
  padding:16px 14px !important;
  background:var(--surface-3)!important;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.15);
}
.bb-col-head{
  padding-bottom:12px;
  border-bottom:1px dashed var(--border);
  margin-bottom:14px;
}
.bb-deal-card{
  background:var(--surface-2)!important;
  border:1px solid var(--border-2)!important;
  border-left:3px solid var(--accent)!important;
  border-radius:10px;
  padding:14px 14px 12px;
  margin-bottom:12px!important;
  box-shadow:0 2px 6px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.03);
  transition:all .18s ease;
}
.bb-deal-card:last-child{margin-bottom:0!important}
.bb-deal-card:hover{
  border-color:var(--accent)!important;
  border-left-color:var(--accent)!important;
  transform:translateY(-2px);
  box-shadow:0 8px 20px -4px rgba(217,119,87,.3),inset 0 1px 0 rgba(255,255,255,.05);
}
.bb-deal-title{
  font-size:13.5px!important;
  font-weight:600!important;
  margin-bottom:6px;
}
.bb-deal-foot{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--border);
}

/* ============================================================
   ФОРМА — 2 колонки
   ============================================================ */
.bb-form-2col{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:20px;
  align-items:start;
}
.bb-form-main{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:28px;
  box-shadow:0 1px 2px rgba(0,0,0,.2);
}
.bb-form-side{
  display:flex;
  flex-direction:column;
  gap:14px;
  position:sticky;
  top:20px;
}
.bb-help-card{
  background:linear-gradient(160deg,var(--surface-2) 0%,var(--surface) 100%);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px 18px;
}
.bb-help-card h4{
  margin:0 0 12px;
  font-size:13px;
  font-weight:600;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:8px;
}
.bb-help-card h4 svg{width:15px;height:15px;color:var(--accent)}
.bb-help-card p,
.bb-help-card .row-item{
  margin:0 0 8px;
  font-size:12.5px;
  color:var(--text-2);
  line-height:1.55;
}
.bb-help-card .row-item{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:6px 0;
  border-bottom:1px solid var(--border);
}
.bb-help-card .row-item:last-child{border-bottom:0}
.bb-help-card .row-item b{color:var(--text);font-weight:600}

.bb-stage-progress{
  display:flex;
  gap:4px;
  margin-top:8px;
}
.bb-stage-progress .dot{
  flex:1;
  height:4px;
  border-radius:2px;
  background:var(--surface-4);
}
.bb-stage-progress .dot.active{background:var(--accent)}
.bb-stage-progress .dot.done{background:var(--accent);opacity:.5}

.bb-preview-value{
  font-size:22px;
  font-weight:700;
  color:var(--accent);
  margin-top:4px;
}
.bb-preview-hint{
  font-size:11.5px;
  color:var(--muted);
  margin-top:4px;
}

@media(max-width:900px){
  .bb-form-2col{grid-template-columns:1fr}
  .bb-form-side{position:static}
}
