/* ==========================================================================
   HomeBiz Zim - components.css
   Buttons, menus, cards, empty states
   Load order: 2 of 7
   ========================================================================== */

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, filter 0.16s, transform 0.12s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(160deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 20px -12px rgba(214, 36, 110, 0.9);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.btn-danger { color: #fff; background: var(--red); }
.btn-danger:hover { filter: brightness(1.06); }
.btn-danger-ghost { border-color: var(--line); background: var(--surface); color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); background: var(--red-soft); }
.btn-sm { height: 34px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-2);
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.icon-btn.xs { width: 30px; height: 30px; border-radius: 8px; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn.xs:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.chart-total { text-align: right; }
.chart-total span { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.chart-total strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- Menu ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 258px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s ease;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
}
.menu-item:hover { background: var(--surface-3); color: var(--text); }
.menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-item.danger { color: var(--red); }
.menu-item.danger .icon { color: currentColor; }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-label { padding: 7px 10px 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }

/* ---------- Cards ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.dash-grid.equal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card.full { grid-column: 1 / -1; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 0;
}
.card-head h2 { font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; }
.card-head p { margin-top: 1px; color: var(--muted); font-size: 11.5px; }
.card-body { padding: 14px 18px 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.brand { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Empty states ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 22px;
  color: var(--muted);
  text-align: center;
}
.empty .icon { width: 26px; height: 26px; color: var(--line-strong); }
.empty strong { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.empty p { max-width: 330px; font-size: 12px; line-height: 1.5; }
.empty.compact { padding: 18px 12px; }
.empty.compact .icon { width: 20px; height: 20px; }
.empty .btn { margin-top: 6px; }
