/* BYNZO reusable components — keep class names stable for Blade/Vue later */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: var(--fw-sb);
  border: 1px solid transparent;
  transition: 160ms var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--bnz-orange);
  color: #fff;
}
.btn-primary:hover { background: var(--bnz-orange-hover); }
.btn-primary:active { background: var(--bnz-orange-pressed); }
.btn-dark { background: var(--bnz-black); color: #fff; }
.btn-dark:hover { background: #2a2a2e; }
.btn-ghost {
  background: #fff;
  border-color: var(--bnz-border);
  color: var(--bnz-text);
}
.btn-ghost:hover { background: var(--bnz-surface-2); border-color: var(--bnz-border-strong); }
.btn-soft { background: var(--bnz-orange-soft); color: var(--bnz-orange-pressed); }
.btn-soft:hover { background: #ffe4d2; }
.btn-danger { background: var(--bnz-danger); color: #fff; }
.btn-danger-soft { background: var(--bnz-danger-soft); color: var(--bnz-danger); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: var(--fs-xs); border-radius: 10px; }
.btn-lg { min-height: 48px; padding: 0 18px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; height: 40px; padding: 0; min-height: 0;
  border-radius: 12px; border: 1px solid var(--bnz-border); background: #fff;
}
.btn-icon:hover { background: var(--bnz-bg); }
.btn-icon.plain { border-color: transparent; background: transparent; }
.btn[disabled], .btn:disabled { opacity: .5; pointer-events: none; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-lg { width: 22px; height: 22px; }

.card {
  background: var(--bnz-surface);
  border: 1px solid var(--bnz-border);
  border-radius: var(--radius-lg);
}
.card-pad { padding: var(--space-4) var(--space-5); }
.card-hover { transition: 180ms var(--ease); }
.card-hover:hover {
  border-color: var(--bnz-border-strong);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: var(--space-4) var(--space-5) 0;
}
.card-title { font-weight: var(--fw-sb); font-size: var(--fs-card); letter-spacing: -0.02em; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--bnz-muted); margin-bottom: var(--space-3);
}
.crumbs a:hover { color: var(--bnz-text); }
.crumbs .sep { color: var(--bnz-faint); background: none; height: auto; margin: 0; }

.page-head { margin-bottom: var(--space-4); }
.crumbs { margin-bottom: 6px; }
.page-head-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
}
.page-head-id { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.prod-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--bnz-black); color: #fff;
  box-shadow: inset 0 -3px 0 var(--accent, var(--bnz-orange));
}
.prod-mark svg { width: 18px; height: 18px; }

.alert {
  padding: 12px 14px; border-radius: 12px; font-size: var(--fs-sm); margin: 0 0 var(--space-4);
  background: var(--bnz-surface-2); color: var(--bnz-text-2); border: 1px solid var(--bnz-border);
}
.alert-success { background: var(--bnz-success-soft); border-color: transparent; color: #166534; }
.alert-error { background: var(--bnz-danger-soft); border-color: transparent; color: #991b1b; }
.alert-warn { background: var(--bnz-warning-soft); border-color: transparent; color: #92400e; }

.form-stack { display: grid; gap: var(--space-4); max-width: 560px; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  margin-top: var(--space-4); padding-top: var(--space-4);
  border-top: 1px solid var(--bnz-border);
}
.req::after { content: " *"; color: var(--bnz-danger); }

.table-card { background: var(--bnz-surface); border: 1px solid var(--bnz-border); border-radius: var(--radius-lg); overflow: hidden; }
.table-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--bnz-border);
}
.table-toolbar .input { max-width: 240px; min-height: 38px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 10px 14px; font-size: var(--fs-xs); color: var(--bnz-muted); }

.empty-guide {
  max-width: 440px; margin: 28px auto 12px; text-align: center; padding: 12px 8px 24px;
}
.empty-guide .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 16px;
  display: grid; place-items: center; background: var(--bnz-surface-2); border: 1px solid var(--bnz-border);
}
.empty-guide .empty-icon .icon { width: 22px; height: 22px; }
.empty-guide h2 { font-size: var(--fs-xl); letter-spacing: -0.03em; margin: 8px 0 6px; }
.empty-guide .toolbar { justify-content: center; }
.demo-strip {
  font-size: 11px; color: var(--bnz-muted); margin: 0 0 16px;
  padding: 0 0 12px; border-bottom: 1px solid var(--bnz-border);
}
.demo-strip a { text-decoration: underline; text-underline-offset: 2px; }
.search-hero { margin: 0 0 var(--space-5); }
.search-hero.toolbar { flex-wrap: nowrap; align-items: stretch; }
.search-hero .input { min-height: 48px; font-size: 1rem; max-width: none; flex: 1; }
.search-hero .btn { flex: none; min-height: 48px; }
.ux-split {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: 28px 40px; align-items: start;
}
.stat-line {
  display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 22px;
  padding: 0 0 16px; border-bottom: 1px solid var(--bnz-border);
}
.stat-line a, .stat-line > span { min-width: 72px; }
.stat-line b { display: block; font-size: 1.2rem; letter-spacing: -0.03em; font-weight: var(--fw-bd); }
.stat-line small, .stat-line span:not(:has(b)) { font-size: var(--fs-xs); color: var(--bnz-muted); }
.stat-line a span, .stat-line > span span { color: var(--bnz-muted); font-size: var(--fs-xs); font-weight: var(--fw-md); }
.app-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--bnz-border);
}
.app-row .grow h3 { font-size: var(--fs-md); letter-spacing: -0.02em; }
.app-row .grow p { color: var(--bnz-muted); font-size: var(--fs-sm); margin-top: 2px; }
.publish-bar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin: 0 auto 20px; max-width: 720px; padding-bottom: 14px; border-bottom: 1px solid var(--bnz-border);
}
.side-product { margin-top: 4px; }
.side-product .nav-link { padding-inline-start: 12px; }
.checklist { display: grid; gap: 8px; margin: 8px 0 16px; }
.checklist .done { color: var(--bnz-muted); text-decoration: line-through; }
.row-list > a, .row-list > .list-row {
  padding: 12px 0; border-bottom: 1px solid var(--bnz-border);
}
.row-list > a:last-child, .row-list > .list-row:last-child { border-bottom: 0; }
.attn-row { border-left: 3px solid var(--bnz-orange); padding-left: 12px; margin: 8px 0; }
.section-title:first-child { margin-top: 0; }
.status-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.status-pills a, .status-pills span {
  padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--bnz-border);
  font-size: var(--fs-xs); font-weight: 600;
}
.status-pills .hot { border-color: transparent; background: var(--bnz-orange-soft); color: var(--bnz-orange-pressed); }

.label { display: block; font-size: var(--fs-xs); font-weight: var(--fw-sb); margin-bottom: 6px; color: var(--bnz-text-2); }
.help { font-size: var(--fs-xs); color: var(--bnz-muted); margin-top: 6px; }
.field { width: 100%; }
.input, .select, .textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--bnz-border);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 12px;
  transition: 150ms var(--ease);
}
.textarea { min-height: 110px; padding: 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--bnz-orange);
  box-shadow: 0 0 0 4px var(--bnz-orange-ring);
  outline: none;
}
.input-group { position: relative; }
.input-group .lead {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--bnz-muted);
}
.input-group .input { padding-left: 40px; }

.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.toggle {
  position: relative; width: 44px; height: 26px; flex: none;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span {
  position: absolute; inset: 0; background: #d4d4d8; border-radius: 99px; transition: 180ms var(--ease);
}
.toggle span::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: 180ms var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.toggle input:checked + span { background: var(--bnz-orange); }
.toggle input:checked + span::after { transform: translateX(18px); }

.tabs {
  display: flex; gap: 4px; padding: 4px; background: var(--bnz-bg);
  border-radius: 14px; overflow: auto;
}
.tab {
  border: 0; background: transparent; min-height: 36px; padding: 0 12px;
  border-radius: 10px; color: var(--bnz-muted); font-weight: var(--fw-sb); font-size: var(--fs-sm);
  white-space: nowrap;
}
.tab.active, .tab[aria-selected="true"] { background: #fff; color: var(--bnz-text); box-shadow: var(--shadow-sm); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 11px; font-weight: var(--fw-sb); background: var(--bnz-bg); color: var(--bnz-text-2);
}
.badge-orange { background: var(--bnz-orange-soft); color: var(--bnz-orange-pressed); }
.badge-green { background: var(--bnz-success-soft); color: #15803d; }
.badge-red { background: var(--bnz-danger-soft); color: var(--bnz-danger); }
.badge-blue { background: var(--bnz-info-soft); color: var(--bnz-info); }
.badge-amber { background: var(--bnz-warning-soft); color: #b45309; }
.verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--bnz-orange); color: #fff;
}
.verified svg { width: 10px; height: 10px; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: var(--fw-bd); color: #fff; flex: none; overflow: hidden;
  letter-spacing: -0.03em; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl { width: 88px; height: 88px; font-size: 32px; }
.avatar-2xl { width: 112px; height: 112px; font-size: 40px; }
.online-dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  background: #22c55e; border: 2px solid #fff; border-radius: 50%;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 0 10px; border-radius: 99px;
  background: var(--bnz-bg); font-size: var(--fs-xs); font-weight: var(--fw-sb);
}
.chip.selected { background: var(--bnz-orange-soft); color: var(--bnz-orange-pressed); }

.empty, .error-state, .loading-state {
  text-align: center; padding: 48px 20px; color: var(--bnz-muted);
}
.empty-icon, .state-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  display: grid; place-items: center; background: var(--bnz-bg); color: var(--bnz-text);
}

.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f7f7f8 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.toast-wrap {
  position: fixed; right: 18px; bottom: 18px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 260px; max-width: 360px;
  background: var(--bnz-ink); color: #fff; padding: 12px 14px;
  border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: flex-start;
  animation: toastIn 220ms var(--ease);
}
.toast.success { box-shadow: 0 10px 30px rgba(22,163,74,.2); }
.toast.error { background: #7f1d1d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,10,12,.48);
  z-index: var(--z-modal); display: grid; place-items: center; padding: 16px;
  backdrop-filter: blur(6px);
}
.modal {
  width: min(560px, 100%);
  background: #fff; border-radius: 20px; padding: 20px;
  box-shadow: var(--shadow-lg); animation: fadeUp 200ms var(--ease);
}
.modal-lg { width: min(760px, 100%); }
.modal h3 { font-size: 1.15rem; letter-spacing: -0.03em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--bnz-border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--z-dropdown);
}
.dropdown-item {
  width: 100%; text-align: left; padding: 10px 10px; border-radius: 10px;
  display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm);
}
.dropdown-item:hover { background: var(--bnz-bg); }
.dropdown-item.danger { color: var(--bnz-danger); }
.sep { height: 1px; background: var(--bnz-border); margin: 6px 4px; }

.app-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
}
.app-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px; min-height: 150px;
}
.app-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
}
.app-card .app-ico {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
}
.app-card h3 { font-size: var(--fs-md); letter-spacing: -0.02em; }
.app-card p { color: var(--bnz-muted); font-size: var(--fs-xs); }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--bnz-border);
}
.list-row:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; }

.stat {
  padding: 16px;
}
.stat b { display: block; font-size: 1.4rem; letter-spacing: -0.04em; }
.stat span { color: var(--bnz-muted); font-size: var(--fs-xs); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }

.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.table-wrap { overflow: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: var(--fs-sm);
}
table.data th, table.data td {
  text-align: left; padding: 14px 14px; border-bottom: 1px solid var(--bnz-border);
}
table.data th { color: var(--bnz-muted); font-weight: var(--fw-sb); font-size: var(--fs-xs); white-space: nowrap; }
table.data td { white-space: nowrap; }
table.data tbody tr:hover { background: var(--bnz-surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }

.file-tile {
  padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 150px;
}
.file-thumb {
  height: 88px; border-radius: 12px; display: grid; place-items: center; font-weight: var(--fw-bd); color: #fff;
}

.bubble {
  max-width: min(72%, 520px); padding: 10px 12px; border-radius: 16px; font-size: var(--fs-sm);
}
.bubble.me { background: var(--bnz-orange); color: #fff; border-bottom-right-radius: 6px; margin-left: auto; }
.bubble.them { background: #fff; border: 1px solid var(--bnz-border); border-bottom-left-radius: 6px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--bnz-border);
}
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--bnz-orange); box-shadow: 0 0 0 4px var(--bnz-orange-soft);
}

.privacy-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--bnz-border);
}
.privacy-row:last-child { border-bottom: 0; }

.section-add {
  border: 1.5px dashed var(--bnz-border-strong); background: transparent;
  border-radius: var(--radius-lg); min-height: 64px; width: 100%;
  color: var(--bnz-muted); font-weight: var(--fw-sb);
}
.section-add:hover { border-color: var(--bnz-orange); color: var(--bnz-orange); background: var(--bnz-orange-soft); }

.qr-box {
  width: 148px; height: 148px; border-radius: 16px; border: 1px dashed var(--bnz-border-strong);
  display: grid; place-items: center; background:
    repeating-conic-gradient(#111 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  position: relative;
}
.qr-box::after {
  content: "QR"; position: absolute; background: #fff; padding: 4px 8px; border-radius: 8px;
  font-weight: var(--fw-bd); color: var(--bnz-orange);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 280ms var(--ease); }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .ux-split { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .toast-wrap { left: 12px; right: 12px; bottom: calc(var(--bottom-h) + 12px); }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr {
    background: #fff; border: 1px solid var(--bnz-border); border-radius: 12px;
    margin: 0 0 10px; padding: 8px 4px; white-space: normal;
  }
  table.data td {
    display: flex; justify-content: space-between; gap: 12px; white-space: normal;
    border-bottom: 0; padding: 8px 12px;
  }
  .page-head-row { align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; min-width: 0; }
  .btn, .icon-hit, .nav-link { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}
