/* Panel UI Kit — Nexberry
   Loaded by ui_kits/panel/index.html
   Targets the operational app — bright, dense, productivity-tool feel. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "SF Pro", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #f9fafb;
  color: #111827;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }

/* ── Layout shell ─────────────────────────────────────────────────────── */
.nb-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.nb-main  { display: flex; flex-direction: column; min-width: 0; }

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.nb-sidebar {
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex; flex-direction: column;
}
.nb-sidebar .brand {
  background: #0a0a0a;
  padding: 18px 20px;
  display: flex; align-items: center;
  height: 64px;
}
.nb-sidebar .brand img { height: 22px; }
.nb-sidebar nav {
  flex: 1; overflow-y: auto;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nb-sidebar .section-label {
  font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #9ca3af; font-weight: 600;
  padding: 14px 12px 6px;
}
.nb-sidebar a.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #374151;
  font-size: 13px;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.nb-sidebar a.nav-item:hover { background: #f3f4f6; color: #047857; }
.nb-sidebar a.nav-item.active {
  background: #f3f4f6; color: #047857; font-weight: 500;
}
.nb-sidebar a.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nb-sidebar .badge {
  margin-left: auto;
  background: #fef3c7; color: #92400e;
  padding: 1px 6px; border-radius: 9999px;
  font-size: 10px; font-weight: 600;
}
.nb-sidebar .user {
  border-top: 1px solid #f3f4f6;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.nb-sidebar .avatar {
  width: 32px; height: 32px; border-radius: 9999px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nb-sidebar .user .meta { font-size: 12px; line-height: 1.3; min-width: 0; flex: 1; }
.nb-sidebar .user .meta .n { color: #111827; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-sidebar .user .meta .r { color: #6b7280; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Topbar ───────────────────────────────────────────────────────────── */
.nb-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.nb-topbar h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.nb-topbar .crumb { color: #6b7280; font-size: 13px; }
.nb-topbar .actions { display: flex; gap: 10px; align-items: center; }
.nb-topbar .search {
  display: flex; align-items: center; gap: 8px;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 6px 10px;
  font-size: 12px; color: #6b7280;
  width: 240px;
}
.nb-topbar .search svg { width: 14px; height: 14px; }
.nb-topbar .icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid #e5e7eb;
  background: #fff; color: #6b7280;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nb-topbar .icon-btn:hover { background: #f9fafb; color: #111827; }
.nb-topbar .icon-btn svg { width: 16px; height: 16px; }

/* ── Content ──────────────────────────────────────────────────────────── */
.nb-content { padding: 20px 24px 60px; flex: 1; min-width: 0; overflow: hidden; }
.nb-content > .head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 16px;
}
.nb-content > .head .title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.nb-content > .head .meta  { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* ── Stat cards ───────────────────────────────────────────────────────── */
.nb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.nb-stat {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px;
}
.nb-stat .label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.nb-stat .value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.nb-stat .delta { font-size: 11px; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.nb-stat .delta.up { color: #047857; }
.nb-stat .delta.down { color: #b91c1c; }

/* ── Kanban ───────────────────────────────────────────────────────────── */
.nb-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.nb-col {
  background: #f3f4f6; border-radius: 10px;
  padding: 10px 8px;
  display: flex; flex-direction: column;
  min-height: 420px;
}
.nb-col .head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 10px;
}
.nb-col .head .name {
  font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.nb-col .head .dot { width: 8px; height: 8px; border-radius: 9999px; }
.nb-col .head .count {
  font-size: 11px; color: #6b7280;
  background: #fff; padding: 1px 7px; border-radius: 9999px;
  font-variant-numeric: tabular-nums;
}
.nb-col .stack { display: flex; flex-direction: column; gap: 8px; }

.nb-order {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  cursor: grab;
  transition: box-shadow .15s, transform .15s;
}
.nb-order:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05); }
.nb-order:active { cursor: grabbing; }
.nb-order .top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.nb-order .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 600; color: #111827;
}
.nb-order .time { font-size: 10px; color: #9ca3af; }
.nb-order .name { font-size: 12px; font-weight: 500; color: #111827; margin-bottom: 4px; }
.nb-order .items { font-size: 11px; color: #6b7280; line-height: 1.45; }
.nb-order .more { font-size: 10px; color: #2563eb; margin-top: 4px; }
.nb-order .total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}
.nb-order .price {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.nb-order .pay {
  font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: 9999px;
}
.nb-order .pay.paid     { background: #f3f4f6; color: #065f46; }
.nb-order .pay.pending  { background: #fef3c7; color: #92400e; }
.nb-order .pay.cash     { background: #f3f4f6; color: #374151; }

/* ── Chip ─────────────────────────────────────────────────────────────── */
.nb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 9999px; font-size: 11px; font-weight: 500; }
.nb-chip.emerald { background: #f3f4f6; color: #065f46; }
.nb-chip.amber   { background: #fef3c7; color: #92400e; }
.nb-chip.gray    { background: #f3f4f6; color: #374151; }
.nb-chip.blue    { background: #eff6ff; color: #1e40af; }

/* ── Table (customers) ────────────────────────────────────────────────── */
.nb-card-pane {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  margin-top: 18px;
  overflow: hidden;
}
.nb-card-pane .pane-head {
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between;
}
.nb-card-pane .pane-head .title { font-size: 14px; font-weight: 600; }
.nb-card-pane .pane-head .sub   { font-size: 11px; color: #6b7280; margin-top: 2px; }
table.nb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.nb-table th {
  text-align: left; font-weight: 500;
  color: #6b7280; font-size: 11px;
  padding: 10px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
table.nb-table td {
  padding: 12px 18px; vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
}
table.nb-table tr:last-child td { border-bottom: 0; }
table.nb-table .name { display: flex; align-items: center; gap: 10px; }
table.nb-table .name .av {
  width: 28px; height: 28px; border-radius: 9999px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
table.nb-table .num { font-variant-numeric: tabular-nums; }

/* ── Toast ────────────────────────────────────────────────────────────── */
.nb-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  background: #fff; border: 1px solid #e5e7eb;
  border-left: 3px solid #059669;
  border-radius: 10px;
  padding: 12px 16px 12px 14px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  max-width: 320px;
}
.nb-toast .icon {
  width: 28px; height: 28px; border-radius: 9999px;
  background: #f3f4f6; color: #047857;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Helpers ──────────────────────────────────────────────────────────── */
.nb-row { display: flex; gap: 8px; align-items: center; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nb-stats  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nb-shell { grid-template-columns: 1fr; }
  .nb-sidebar { display: none; }
}
