:root {
  --bb-primary: var(--primary-color, #167df0);
  --bb-border: #e5e7eb;  /* gray-200 */
  --bb-text: #111827;    /* gray-900 */
  --bb-muted: #6b7280;   /* gray-500 */
  --bb-bg: #ffffff;
}

.bb-no-scroll { overflow: hidden !important; }

.clickable {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.clickable:hover {
  text-decoration: underline;
}

.table-wrap,
.card,
.card-content,
.container { overflow: visible !important; }

.table td,
.table th { overflow: visible; }

th.is-right, td.is-right { text-align: right; }

.bb-menu { display: inline-flex; align-items: center; }
.bb-kebab { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--bb-muted); line-height: 1; }
.bb-kebab .mdi { font-size: 20px; }
.bb-kebab:hover, .bb-menu.is-open .bb-kebab { color: var(--bb-primary); }

.bb-menu-popover {
  position: fixed; z-index: 60; display: none;
  background: #fff; border: 1px solid var(--bb-border); border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
  min-width: 220px; max-width: min(360px, calc(100vw - 16px));
  max-height: calc(100vh - 16px); overflow: auto;
}
.bb-menu.is-open > .bb-menu-popover { display: block; }

.bb-menu-list { padding: 6px; }
.bb-menu-item { display: flex; align-items: center; gap: .5rem; padding: 8px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.bb-menu-item:hover { background: #f3f4f6; }
.bb-menu-item.danger { color: #b91c1c; }
.bb-menu-item i.mdi { font-size: 18px; }

.bb-menu-constrain { position: relative; }

.bb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.35);
  opacity: 0; transform: scale(1.01);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .12s ease, transform .12s ease;
}
.bb-overlay.is-open { opacity: 1; transform: scale(1); }

.bb-modal {
  background: var(--bb-bg);
  color: var(--bb-text);
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.bb-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--bb-border);
}
.bb-modal-title { font-weight: 600; font-size: 16px; }

.bb-modal-body {
  padding: 16px; overflow: auto;
}
.bb-modal-text { white-space: pre-wrap; line-height: 1.4; }

.bb-pre {
  margin: 0; padding: 12px; background: #f9fafb; /* gray-50 */
  border: 1px solid var(--bb-border);
  border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}

.bb-modal-actions {
  display: flex; gap: .5rem; justify-content: flex-end;
  padding: 12px 16px; 
}

.bb-btn {
  appearance: none; border: 1px solid var(--bb-border); background: #fff; color: var(--bb-text);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit;
}
.bb-btn:hover { background: #f9fafb; }
.bb-btn:active { transform: translateY(0.5px); }
.bb-btn-primary {
  background: var(--bb-primary); border-color: var(--bb-primary); color: #fff;
}
.bb-btn-primary:hover { filter: brightness(1.05); }
.bb-btn-ghost {
  border-color: transparent; background: transparent; color: var(--bb-muted);
}
.bb-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--bb-border);
  border-radius: 8px; outline: none; font: inherit;
}
.bb-input:focus { border-color: var(--bb-primary); box-shadow: 0 0 0 2px rgba(22, 125, 240, .15); }

#bb-toast-host {
  position: fixed; right: 12px; bottom: 12px; z-index: 1050;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.bb-toast {
  background: #111827; color: #fff; padding: 10px 12px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto; max-width: min(420px, calc(100vw - 24px));
}
.bb-toast.is-show { opacity: 1; transform: translateY(0); }
.bb-modal-html .bb-details { display: grid; gap: 12px; }
.bb-details-head { display: flex; align-items: center; gap: 10px; }
.bb-details-head .mdi { font-size: 28px; color: var(--bb-muted); }
.bb-details-name { font-weight: 600; line-height: 1.25; word-break: break-word; }
.bb-details-prefix { color: var(--bb-muted); font-size: .95em; word-break: break-all; display: inline-block;}

.bb-details-grid { display: grid; gap: 6px; margin-top: 4px; }
.kv-row { display: grid; grid-template-columns: 230px 1fr; gap: 10px; align-items: baseline; }
.kv-k { color: var(--bb-muted) !important; }
.kv-v { overflow-wrap: anywhere; }
.kv-muted { color: #6b7280; font-size: .9em; margin-left: .35rem; }

.bb-chip {
  display: inline-block; border: 1px solid var(--bb-border); border-radius: 999px;
  padding: .15rem .5rem; font-size: .85rem; background: #fff;
}

.bb-details-actions { display: flex; gap: 8px; margin-top: 6px; }
.bb-details-subtitle { margin: 2px 0 0; font-size: 0.95rem; }
.meta-pre { max-height: 40vh; overflow: auto; }
@media (max-width: 600px) {
  .kv-row { grid-template-columns: 120px 1fr; }
}

.small-icon {
  font-size: 1.25em !important;
}

.bb-modal-x {
    position: relative;
    float: right;
    left: 15px;
    top: -15px;
}

.bb-modal-x:hover {
  color: red;
  background-color: transparent !important;
}

.select > select {
  border-color:#dbdbdb !important;
}