/* /echipa/ — team board components on top of the shared staff design system (staff.css). */
.b-main { max-width: 1180px; gap: 20px; }
.b-muted { color: var(--muted-foreground); font-size: 13px; margin: 0; }
.b-title h1 { margin-bottom: 4px; }
.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.b-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
:where(.b-stat) { --tone: var(--primary); --tone-soft: #e3f1ea; }
.b-stat { position: relative; overflow: hidden; padding: 18px 16px 16px; }
.b-stat::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tone); }

.b-stat span { display: block; color: var(--muted-foreground); font-size: 13px; font-weight: 500; }
.b-stat b { display: block; font: 700 28px/1.1 var(--display); letter-spacing: -.035em; margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-stat small { color: var(--muted-foreground); font-size: 12px; }

.b-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.b-month { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 3px; box-shadow: var(--shadow-sm); }
.b-month output { min-width: 150px; text-align: center; font-weight: 600; font-size: 14px; }
.b-month button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 18px; color: var(--foreground); }
.b-month button:hover:not(:disabled) { background: var(--surface-muted); }
.b-month button:disabled { opacity: .3; cursor: not-allowed; }
.b-search { flex: 1 1 220px; min-width: 0; }
.b-view { margin-left: auto; }

.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
:where(.b-dealer) { --tone: var(--green); --tone-soft: var(--green-soft); --tone-ink: var(--green-ink); }
.b-dealer { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 20px 16px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.b-dealer::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--tone); }
.b-dealer:hover { border-color: var(--tone); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.b-dealer:focus-visible, .b-link:focus-visible, .b-month button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.b-dealer-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.b-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tone-soft); border: 2px solid var(--tone); color: var(--tone-ink); font-weight: 700; font-size: 15px; }
.b-name-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; }
.b-name-meta .role-icon { height: 22px; min-width: 22px; padding: 0 3px; }
.b-name-meta .role-icon svg { width: 14px; height: 14px; }
.b-table .role-icons { vertical-align: middle; }
.b-table .role-icon { height: 22px; min-width: 22px; padding: 0 3px; }
.b-table .role-icon svg { width: 14px; height: 14px; }
.b-table tbody tr td:first-child { box-shadow: inset 4px 0 0 var(--tone); }
.b-name { min-width: 0; flex: 1 1 auto; }
.b-name b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0; }
.b-figures div { min-width: 0; }
.b-figures dt { color: var(--muted-foreground); font-size: 12px; }
.b-figures .b-pay dd { color: var(--green-ink); font: 700 19px/1.2 var(--display); letter-spacing: -.02em; }
.b-figures dd { margin: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.b-progress { display: flex; flex-direction: column; gap: 6px; }
.b-progress-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted-foreground); }
.b-bar { height: 8px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; }
.b-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tone); transition: width .4s ease; }
.b-foot { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.b-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--foreground); background: var(--card); }
.b-badge.live { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-line); }
.b-badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: b-pulse 1.6s ease-in-out infinite; }
@keyframes b-pulse { 50% { opacity: .35; } }
.b-badge.warn { color: var(--yellow-ink); background: var(--yellow-soft); border-color: var(--yellow-line); }
.b-badge.due { color: var(--orange-ink); background: var(--orange-soft); border-color: var(--orange-line); }
.b-badge.bad { color: var(--red-ink); background: var(--red-soft); border-color: var(--red-line); }
.b-badge.good { color: var(--green-ink); background: var(--green-soft); border-color: var(--green-line); }
.b-empty { padding: 32px 16px; text-align: center; }
.b-link { font: inherit; font-weight: 600; color: var(--foreground); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.b-link:hover { text-decoration-color: currentColor; }
.b-table td.lead .b-badge { margin-left: 6px; }

.b-sheet { width: min(980px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--background); color: var(--foreground); }
.b-sheet::backdrop { background: rgba(9, 9, 11, .45); }
.b-sheet[open] { display: flex; flex-direction: column; animation: b-slide .2s ease-out; }
@keyframes b-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.b-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--card); }
.b-sheet-head h2 { margin: 0; }
.b-sheet-body { overflow: auto; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.b-icon-btn { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); cursor: pointer; font-size: 14px; }

@media (max-width: 640px) {
  .b-main { gap: 16px; }
  .b-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .b-stat { padding: 12px; }
  .b-stat b { font-size: 22px; }
  .b-month { flex: 1 1 100%; justify-content: space-between; }
  .b-month output { min-width: 0; }
  .b-view { margin-left: 0; flex: 1 1 100%; }
  .b-view button { flex: 1 1 0; }
  .b-sheet-head, .b-sheet-body { padding-left: 14px; padding-right: 14px; }
}
@media (pointer: coarse) { .b-month button { width: 44px; height: 44px; } }

/* Felt theme: stats and dealer cards carry a light wash of their traffic-light tone. */
.b-stat { background: linear-gradient(180deg, color-mix(in srgb, var(--tone-soft, #e3f1ea) 80%, #fff) 0%, var(--card) 70%); }
.b-stat span { color: var(--tone-ink, var(--muted-foreground)); font-weight: 600; }
.b-dealer { background: linear-gradient(180deg, color-mix(in srgb, var(--tone-soft) 55%, #fff) 0%, var(--card) 34%); }
.b-avatar { background: radial-gradient(circle at 30% 25%, #fff, var(--tone-soft) 70%); box-shadow: 0 4px 12px -6px var(--tone); font-family: var(--display); }
.b-name b { font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
