/* ================================================================
   SQRbits — Bootstrap 5 Theme Overrides
   static/dashboard/theme.css
   Loaded AFTER bootstrap.min.css — customises Bootstrap defaults.
   ================================================================ */

:root {
  --brand: #111827;
  --brand-hover: #0b1220;
  --brand-light: rgba(17,24,39,.12);
}

body {
  background: #f6f7fb;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand);
  border-color: var(--brand);
  filter: brightness(.92);
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17,24,39,.08);
}
.card-header {
  border-bottom: 1px solid #e5e7eb;
  border-radius: 16px 16px 0 0 !important;
}

/* ── Tables ───────────────────────────────────────────────────── */
.table thead th {
  background: #f3f4f6;
  font-weight: 700;
  color: #374151;
  font-size: 12px;
  white-space: nowrap;
}
.table td {
  font-size: 13px;
}

/* ── Page title ───────────────────────────────────────────────── */
.page-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.text-muted2 { color: #6b7280; }

/* ── Card spacing ─────────────────────────────────────────────── */
.card + .card {
  margin-top: 16px;
}
.card-body {
  padding: 20px;
}

/* ── Stats grid ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
}
.stat-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin-top: 6px;
}

/* ── Chips (custom inline badges) ─────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
}
.chip-good { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.chip-bad  { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.chip-info { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.chip-warn { background: #fffbeb; color: #d97706; border-color: #fde68a; }

/* ── Points boxes ─────────────────────────────────────────────── */
.pts-box {
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
}
.pts-num {
  font-size: 28px;
  font-weight: 800;
}
.pts-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}
.pts-balance .pts-num { color: #2563eb; }
.pts-earned .pts-num  { color: #059669; }
.pts-redeemed .pts-num{ color: #dc2626; }

/* ── Form sections ────────────────────────────────────────────── */
.form-section {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

/* ── Settings / form components ──────────────────────────────── */
.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  margin-bottom: 16px;
}
.card-edit {
  border-left: 3px solid var(--brand, #111827);
}
.field-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  line-height: 1.4;
}
.field-hint-switch {
  margin-left: 2.5em;
}
.save-area {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
  margin-top: 8px;
}
.summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ── Checkbox row ─────────────────────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.form-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ── Color grid (branding page) ───────────────────────────────── */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.color-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Logo preview */
.logo-preview img {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* ── Info boxes ───────────────────────────────────────────────── */
.info-box {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-top: 12px;
  font-size: 13px;
}
.info-box-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.info-box-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── Row links (clickable table rows) ─────────────────────────── */
.row-link { cursor: pointer; }
.row-link:hover td { background: #f9fafb !important; }

/* ── Link cell (branches check-in link) ───────────────────────── */
.link-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.checkin-link {
  font-family: monospace;
  font-size: 12px;
  color: #2563eb;
}
.btn-icon {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}
.btn-icon:hover { background: #f9fafb; }

/* ── Empty state ──────────────────────────────────────────────── */
.empty {
  text-align: center;
  color: #6b7280;
  padding: 24px 16px;
  font-size: 13px;
}
.empty-icon {
  font-size: 40px;
  opacity: .3;
  margin-bottom: 12px;
}

/* ── Layout utilities ────────────────────────────────────────── */
.min-w-0 { min-width: 0; }

/* ── Stat-value helpers ──────────────────────────────────────── */
.stat-value-success { color: var(--success); }
.stat-value-warning { color: var(--warning); }
.stat-value-sm      { font-size: 16px; }
.stat-detail {
  font-size: 13px;
  font-weight: 400;
  margin-top: 2px;
}

/* ── Login page ───────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f6f7fb;
}
.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.login-brand {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -.4px;
}
.login-brand span { color: var(--brand); }
.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
}

/* ── Standalone pages ─────────────────────────────────────────── */
.standalone-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f6f7fb;
}
.standalone-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.standalone-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: .4;
  line-height: 1;
}
.standalone-card h1,
.standalone-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}
.standalone-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Form error ───────────────────────────────────────────────── */
.form-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

