/* Q-Bundles Hub — on top of the studio theme (common-libs/css/qind-theme.css) and the bundle
   kit styles (css/kit.css, copied from q-bundle-kit 1.5). */

.container { overflow-y: auto; padding-bottom: 24px; }
.tab-pane.active { display: block; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.nowrap { white-space: nowrap; }
.count { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.card-head { flex-wrap: wrap; margin-bottom: 8px; }
.card > .hint { margin: 0 0 8px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tools .input[type=search] { width: 220px; }
.table td { vertical-align: top; padding: 8px; }
.table td.acts { text-align: right; white-space: nowrap; }
.table td.acts .btn { margin-left: 4px; }
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table .hint { font-size: 11px; margin-top: 2px; }
.clamp { max-width: 520px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill { background: var(--surface-3); color: var(--text); display: inline-block; margin: 1px 0; }
.badge { white-space: nowrap; }
.row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
a.btn { text-decoration: none; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 14px; }
.stats { margin-top: 12px; }
.stat-card .hint { margin-top: 4px; font-size: 11px; }
.how { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--text); }
.how code { color: var(--accent); }
.warn-inline { color: var(--warn); }
.warn-line { color: var(--warn); font-size: 12px; margin: 8px 0; }
.input-sm { height: 28px; font-size: 12px; }
.pending-card { max-width: 560px; margin: 60px auto; }
.user-chip .badge { font-size: 10px; }
.dev-pill { margin-left: 12px; font: 600 10px/18px var(--mono); padding: 0 8px; border-radius: 9px;
  color: #1e1e1e; background: var(--warn); letter-spacing: 0.5px; }

/* dialogs with forms */
.qdlg.qdlg-wide { max-width: 640px; width: calc(100vw - 32px); }
.qdlg-body { margin-bottom: 12px; max-height: 70vh; overflow-y: auto; }
.form-dlg { grid-template-columns: 1fr 1fr; }
.form-dlg .span-all { grid-column: 1 / -1; }
.form-dlg .lbl { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-dlg textarea.area { height: auto; padding: 6px 10px; resize: vertical; font-family: inherit; }
.form-dlg [hidden] { display: none !important; }
.bundle-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px;
  max-height: 180px; overflow-y: auto; padding: 8px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 4px; }
.brand-box { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.brand-box .lbl { width: 100%; }
.secret { display: flex; gap: 8px; align-items: center; padding: 10px; background: var(--surface-2);
  border: 1px solid var(--accent); border-radius: 6px; }
.secret code { flex: 1; color: var(--accent); overflow-wrap: anywhere; font-size: 13px; user-select: all; }

/* login */
.login-body { align-items: center; justify-content: center; overflow: auto;
  background: radial-gradient(ellipse at top, #2a2f35 0%, var(--bg) 60%); }
.login-card { width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 28px 28px 18px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.login-logo { width: 56px; height: 56px; object-fit: contain; }
.login-title { display: block; font-size: 22px; margin: 10px 0 6px; }
.login-google { justify-content: center; width: 100%; padding: 10px; margin: 18px 0 6px; font-size: 14px; }
.login-domain code { color: var(--accent); }
.login-error { background: rgba(239, 83, 80, 0.12); color: var(--danger); border-radius: 6px; padding: 8px; margin-top: 12px; font-size: 13px; }
.dev-box { margin-top: 18px; padding: 12px; border: 1px dashed var(--warn); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.dev-box .hint { margin: 0; }
.dev-flag { color: var(--warn); font: 600 11px var(--mono); letter-spacing: 0.6px; }
.login-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.login-foot img { height: 20px; opacity: 0.6; }

@media (max-width: 720px) {
  .header-brands, #user-email { display: none; }
  .tab-bar { overflow-x: auto; }
  .tab-item { padding: 0 10px; white-space: nowrap; }
  .form-dlg { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .tools .input[type=search] { width: 100%; }
}

/* Overview tiles: at a glance (label over a big value) */
.stat-card { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; border-radius: 8px; min-width: 0; }
.stat-card .stat-value { font-size: 26px; line-height: 1.1; }
.stat-card .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.form-dlg label.kit-check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 12px; min-width: 0; }
.form-dlg label.kit-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
