:root {
  --tb-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --tb-font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --tb-bg: #f5f6fb;
  --tb-surface: #ffffff;
  --tb-surface-soft: #f9fafe;
  --tb-text: #181b2e;
  --tb-text-muted: #6b7287;
  --tb-border: #e6e9f4;
  --tb-primary: #5b6cff;
  --tb-primary-dark: #4655d6;
  --tb-accent: #2ec5a7;
  --tb-danger: #f4516c;
  --tb-warning: #f5a623;
  --tb-radius: 14px;
  --tb-shadow-sm: 0 2px 8px rgba(15, 22, 44, 0.06);
  --tb-shadow-md: 0 12px 32px rgba(15, 22, 44, 0.08);
  --app-topbar-height: 70px;
  --app-topbar-gap: 1rem;
}

body.app-body {
  background: radial-gradient(circle at top right, #eef1ff 0%, var(--tb-bg) 45%, #f7f8fe 100%);
  color: var(--tb-text);
  font-family: var(--tb-font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
}

.app-shell {
  max-width: 1220px;
}

.app-topbar {
  position: relative;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--tb-border);
}

.app-topbar-guest {
  background: transparent;
  border-bottom: 0;
}

.app-topbar.app-topbar-guest .app-shell {
  min-height: 20px;
}

.app-topbar .app-shell {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 1rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--tb-text);
  font-weight: 700;
  font-size: 1.1rem;
}

.app-brand:hover {
  color: var(--tb-primary-dark);
}

.app-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-content: center;
  background: linear-gradient(145deg, var(--tb-primary), #7b8bff);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.app-topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.app-topbar-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.app-menu-toggle {
  display: none;
  border: 1px solid var(--tb-border);
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.app-menu-toggle-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #3d4764;
  transition: transform 140ms ease, opacity 140ms ease;
}

.app-menu-toggle.is-open .app-menu-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.app-menu-toggle.is-open .app-menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.app-menu-toggle.is-open .app-menu-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.app-mobile-nav {
  border-top: 1px solid var(--tb-border);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 22, 44, 0.1);
}

.app-mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0 0.95rem;
}

.app-mobile-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4d5980;
  background: transparent;
  border: 0;
}

.app-mobile-nav-link:hover {
  background: #f3f5ff;
  color: #2f3a66;
}

.app-mobile-nav-link.is-active {
  color: #2240c7;
  background: #e8eeff;
}

.app-mobile-nav-button {
  width: 100%;
  justify-content: flex-start;
}

.app-nav-link {
  text-decoration: none;
  color: #6d7487;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.2rem 0.1rem 0.95rem;
  transition: color 0.18s ease;
}

.app-nav-button {
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.app-nav-link:hover {
  color: #1c2436;
}

.app-nav-link.is-active {
  color: #1a2236;
  font-weight: 600;
}

.app-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #3f66ff;
}

.app-user {
  color: var(--tb-text-muted);
  font-weight: 500;
}

.app-user small {
  font-size: 0.8em;
}

.app-logout-btn {
  border-color: var(--tb-border);
  color: var(--tb-text);
}

.app-logout-btn:hover {
  background: #f2f4ff;
  border-color: #d9defa;
  color: var(--tb-primary-dark);
}

.app-alert {
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: var(--tb-shadow-sm);
}

.app-page-heading {
  margin-bottom: 1.2rem;
}

.app-page-title {
  margin-bottom: 0.15rem;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 700;
}

.app-page-subtitle {
  margin: 0;
  color: var(--tb-text-muted);
}

/* ── Page Hero Banner ────────────────────────────────────── */
.app-page-hero {
  background: var(--tb-surface);
  border-bottom: 1px solid var(--tb-border);
  padding: 0.85rem 0;
  margin-bottom: 1.5rem;
}

.app-page-hero-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 var(--bs-gutter-x, 0.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-page-hero-text {
  flex: 1;
  text-align: center;
}

.app-page-hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.1rem;
  color: var(--tb-text);
}

.app-page-hero-subtitle {
  font-size: 0.84rem;
  color: var(--tb-text-muted);
  margin: 0;
}

.app-page-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.app-section-card {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-sm);
  margin-bottom: 1rem;
}

.app-section-card .card-body {
  padding: 1.1rem 1.2rem;
}

.app-section-title {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.app-section-meta {
  margin-bottom: 0.95rem;
  color: var(--tb-text-muted);
  font-size: 0.86rem;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: #dde1f0;
  min-height: 40px;
}

.form-control:focus,
.form-select:focus {
  border-color: #a4b0ff;
  box-shadow: 0 0 0 0.2rem rgba(91, 108, 255, 0.15);
}

.btn {
  border-radius: 10px;
}

.btn-primary {
  background-color: var(--tb-primary);
  border-color: var(--tb-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--tb-primary-dark);
  border-color: var(--tb-primary-dark);
}

.btn-outline-primary {
  color: var(--tb-primary-dark);
  border-color: #c3caf8;
}

.btn-outline-primary:hover {
  background: #eef0ff;
  border-color: #b4bcf4;
  color: #3d4abf;
}

.btn-outline-secondary {
  color: #48506a;
  border-color: #d6dbec;
}

.btn-outline-secondary:hover {
  background: #f5f7fe;
  border-color: #c9d1e9;
  color: #2a324d;
}

.btn-outline-success {
  color: #14856f;
  border-color: #98e0d2;
}

.btn-outline-success:hover {
  background: #edfdf9;
  border-color: #7ed6c5;
  color: #0f6f5d;
}

.btn-outline-danger {
  color: #ce3452;
  border-color: #f3bcc7;
}

.btn-outline-danger:hover {
  background: #fff3f6;
  border-color: #efabb9;
  color: #b62946;
}

.data-shell {
  background: var(--tb-surface-soft);
  border: 1px solid #e9ecf6;
  border-radius: 12px;
  padding: 0.7rem;
}

.table.app-table {
  --bs-table-bg: transparent;
  margin: 0;
  vertical-align: middle;
}

.table.app-table > :not(caption) > * > * {
  padding: 0.8rem 0.55rem;
  border-bottom-color: #e9edf8;
}

.table.app-table thead th {
  color: #576081;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom-width: 1px;
}

.table.app-table tbody tr:hover td {
  background: rgba(91, 108, 255, 0.04);
}

/* Badge History (manage settings): use horizontal space and reduce awkward wrapping */
#badge-history .data-shell .table.app-table {
  width: 100%;
}
#badge-history .data-shell .table.app-table th:nth-child(1),
#badge-history .data-shell .table.app-table td:nth-child(1) {
  white-space: nowrap;
  width: 1%;
}
#badge-history .data-shell .table.app-table th:nth-child(2),
#badge-history .data-shell .table.app-table td:nth-child(2) {
  min-width: 10rem;
}
#badge-history .data-shell .table.app-table th:nth-child(3),
#badge-history .data-shell .table.app-table td:nth-child(3),
#badge-history .data-shell .table.app-table th:nth-child(4),
#badge-history .data-shell .table.app-table td:nth-child(4) {
  min-width: 11rem;
}

.user-main {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
}

.user-email {
  color: var(--tb-text-muted);
  font-size: 0.84rem;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 56px;
  justify-content: center;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: rgba(46, 197, 167, 0.16);
  color: #0e7d68;
  font-weight: 700;
}

.points-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0fb391;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.action-stack .form-control,
.action-stack .form-select {
  max-width: 190px;
}

.audit-code {
  margin: 0;
  white-space: pre-wrap;
  color: #4f5774;
  font-size: 0.78rem;
}

.empty-row {
  color: var(--tb-text-muted);
  text-align: center;
  font-style: italic;
}

code.small {
  white-space: pre-wrap;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.auth-hero {
  background: linear-gradient(140deg, #5b6cff 0%, #7483ff 52%, #2ec5a7 100%);
  color: #fff;
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-md);
  padding: 1.35rem;
}

.auth-hero h2 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.auth-hero p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.92);
}

.auth-card {
  margin-bottom: 0;
}

.auth-card .card-body {
  padding: 1.25rem;
}

.auth-help {
  margin-top: 0.85rem;
  color: var(--tb-text-muted);
  font-size: 0.84rem;
}

.auth-help a {
  color: var(--tb-primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.auth-help a:hover {
  text-decoration: underline;
}

.auth-support {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #dbe0f4;
}

.feed-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.feed-surface {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: 22px;
  box-shadow: var(--tb-shadow-sm);
  padding: 1.2rem;
}

.feed-hero {
  position: static;
}

/* ── Activity Feed — Social Style ───────────────────────── */

.activity-feed-section {
  max-width: 680px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .activity-feed-section {
    max-width: 100%;
  }
}

.activity-feed-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--tb-border);
}

.activity-feed-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--tb-text);
}

.activity-feed-subtitle {
  font-size: 0.87rem;
  color: var(--tb-text-muted);
  margin: 0;
}

.activity-post {
  background: var(--tb-surface);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-sm);
  border: 1px solid var(--tb-border);
  padding: 1.1rem 1.25rem 0.9rem;
  margin-bottom: 1rem;
}

.activity-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.activity-post-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.activity-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-content: center;
  background: linear-gradient(135deg, #e8eaff, #c8cdff);
  color: var(--tb-primary);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  user-select: none;
}

img.activity-post-avatar {
  display: block;
  object-fit: cover;
  background: #eef1ff;
}

.activity-post-avatar-pair {
  position: relative;
  width: 56px;
  height: 40px;
  flex-shrink: 0;
}

.activity-post-avatar-pair .activity-post-avatar {
  position: absolute;
  top: 0;
  left: 0;
}

.activity-post-avatar--recipient {
  position: absolute !important;
  right: 0;
  bottom: 0;
  top: auto !important;
  left: auto !important;
  width: 30px !important;
  height: 30px !important;
  font-size: 0.75rem !important;
  background: linear-gradient(135deg, #d5f8f1, #a5eddb) !important;
  color: #1a9e82 !important;
  border: 2px solid var(--tb-surface);
}

.activity-post-actor {
  font-weight: 600;
  font-size: 0.91rem;
  color: var(--tb-text);
  line-height: 1.35;
}

.activity-post-time {
  font-size: 0.76rem;
  color: var(--tb-text-muted);
  font-family: var(--tb-font-mono);
  margin-top: 0.1rem;
}

.activity-post-emotion {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.activity-emotion--glad,
.activity-emotion--happy { background: #e6faf4; color: #1a9e82; }
.activity-emotion--sad    { background: #fde8ee; color: #c4354d; }
.activity-emotion--angry  { background: #fde8ee; color: #c4354d; }
.activity-emotion--neutral { background: #f0f1f8; color: #5b6490; }

.activity-post-text {
  font-size: 0.97rem;
  color: var(--tb-text);
  line-height: 1.6;
  margin: 0 0 0.85rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--tb-border);
  font-style: italic;
}

.activity-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.activity-tag {
  font-size: 0.75rem;
  color: var(--tb-text-muted);
  background: var(--tb-bg);
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
}

.activity-post-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.activity-post-badge-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--tb-text);
}

.activity-post-coins {
  font-family: var(--tb-font-mono);
  font-size: 0.82rem;
  color: #e49a2a;
  font-weight: 600;
  background: #fff9e8;
  border: 1px solid #f1cc60;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.activity-post-badge-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--tb-border);
  flex-shrink: 0;
}

.activity-post-actions {
  display: flex;
  gap: 0.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--tb-border);
}

.activity-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.87rem;
  color: var(--tb-text-muted);
  cursor: pointer;
  font-family: var(--tb-font-sans);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.activity-action-btn:hover {
  background: var(--tb-bg);
  color: var(--tb-text);
}

.activity-action-btn.is-liked {
  color: #e03d5e;
}

.activity-feed-empty {
  text-align: center;
  color: var(--tb-text-muted);
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
}

.coins-pill-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 3px solid #f1cc60;
  border-radius: 999px;
  color: #e49a2a;
  font-family: var(--tb-font-mono);
  font-weight: 700;
  background: #fff9e8;
  padding: 0.35rem 0.9rem;
}

.coins-pill-icon {
  font-size: 0.9rem;
}

.app-bell {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--tb-border);
  background: #fff;
  color: #111;
  text-decoration: none;
  display: grid;
  place-content: center;
  position: relative;
}

.app-bell-dot {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff3b30;
}

.app-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-grid;
  place-content: center;
  background: #dbe2f6;
  text-decoration: none;
  color: #334;
  font-weight: 700;
}

.app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coins-balance-card {
  border: 2px solid #efd57a;
  background: #fff9eb;
  border-radius: 14px;
  padding: 0.9rem;
}

.badge-slider {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.badge-slide-item input {
  display: none;
}

.badge-slide-card {
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e2e7f4;
  border-radius: 12px;
  padding: 0.75rem 0.6rem;
  background: #fff;
  cursor: pointer;
}

.badge-slide-item input:checked + .badge-slide-card {
  border-color: #a8b4f8;
  box-shadow: 0 0 0 2px rgba(91, 108, 255, 0.12);
}

.badge-slide-card img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 999px;
}

.badge-fallback {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-content: center;
  background: #ebefff;
  color: #4151cc;
  font-weight: 700;
}

.prizes-surface {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: 22px;
  box-shadow: var(--tb-shadow-sm);
  padding: 1.2rem;
}

.primary-manage-surface {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: 22px;
  box-shadow: var(--tb-shadow-sm);
  padding: 1.2rem;
}

.primary-manage-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.manage-settings-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.manage-settings-sidebar {
  position: sticky;
  top: calc(var(--app-topbar-height) + 1rem);
}

.manage-nav-filter-wrap {
  margin-bottom: 0.55rem;
}

.manage-nav-filter-input {
  border-radius: 10px;
  border-color: #dfe5f6;
  background: #fff;
}

.manage-settings-content {
  min-width: 0;
}

.manage-section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid #e8ecf8;
  border-radius: 14px;
  background: #fbfcff;
}

.manage-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.manage-nav-group + .manage-nav-group {
  padding-top: 0.8rem;
  border-top: 1px dashed #e4e8f6;
}

.manage-nav-group[hidden] {
  display: none;
}

.manage-nav-group-title {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a93b2;
}

.manage-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 10px;
  color: #4d5980;
  text-decoration: none;
  padding: 0.42rem 0.65rem;
  font-weight: 600;
  font-size: 0.91rem;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.manage-nav-link:hover {
  color: #2f3a66;
  background: #f1f4ff;
}

.manage-nav-link.active {
  color: #2240c7;
  background: #e8eeff;
  box-shadow: inset 0 0 0 1px #d4defe;
}

.manage-section-card .card-body {
  padding-top: 0.35rem;
}

.manage-section-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 1.25rem 0.4rem;
}

.manage-section-details > summary:hover {
  background: #fbfcff;
}

.manage-section-details > summary::-webkit-details-marker {
  display: none;
}

.manage-section-summary .app-section-title {
  font-size: 1rem;
}

.manage-inline-details {
  border: 1px solid #e9ecf7;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  background: #fbfcff;
}

.manage-inline-details > summary {
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: #3f4b74;
}

.manage-settings-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #7180aa;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.25rem 0;
}

.manage-settings-divider::before,
.manage-settings-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e5f5;
}

.manage-sticky-actions {
  position: sticky;
  bottom: 0.45rem;
  z-index: 4;
  background: #fff;
  border: 1px solid #e3e8f7;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.organization-profile-card {
  border: 1px solid #e8ecf8;
  border-radius: 12px;
  padding: 0.85rem;
  background: #fbfcff;
}

.organization-usage-card {
  border: 1px solid #e4e9f7;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.organization-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.organization-usage-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #34446f;
}

.organization-usage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #4a5a89;
  background: rgba(255, 255, 255, 0.72);
}

.organization-usage-value {
  font-family: var(--tb-font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #17203b;
}

.organization-usage-card-employees {
  background: linear-gradient(180deg, #f4f6ff 0%, #eef2ff 100%);
}

.organization-usage-card-reviews {
  background: linear-gradient(180deg, #eefcf7 0%, #e8f9f1 100%);
}

.badge-settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.badge-settings-group {
  border: 1px solid #e8ecf8;
  border-radius: 12px;
  padding: 0.75rem;
  background: #fbfcff;
}

.badge-settings-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.badge-settings-core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.badge-settings-emotion-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.badge-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge-settings-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.badge-settings-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0e5f7;
  border-radius: 999px;
  background: #f6f8ff;
  color: #44507d;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.prizes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.prizes-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 2px solid #f1cc60;
  border-radius: 999px;
  color: #d58f24;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  background: #fff9e8;
}

.prizes-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.prizes-search-input {
  min-height: 46px;
  border-radius: 14px;
}

.prizes-sort-select {
  min-width: 240px;
  min-height: 46px;
  border-radius: 14px;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.prize-card-button {
  width: 100%;
  border: 1px solid #e9ecf6;
  border-radius: 14px;
  background: #fff;
  padding: 0.6rem;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.8rem;
  text-align: left;
}

.prize-card-button:hover {
  border-color: #ced5f6;
  box-shadow: 0 0 0 2px rgba(91, 108, 255, 0.08);
}

.prize-image-shell {
  height: 82px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7ff;
  border: 1px solid #e6eaf8;
  display: grid;
  place-content: center;
}

.prize-image-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prize-fallback {
  display: inline-grid;
  place-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #ebefff;
  color: #4151cc;
  font-weight: 700;
}

.prize-name {
  margin: 0 0 0.2rem;
  font-size: 1.03rem;
  font-weight: 600;
}

.prize-points,
.prize-price {
  color: #d58f24;
  font-weight: 700;
}

.buy-prize-selected {
  border: 1px solid #e9ecf6;
  border-radius: 12px;
  padding: 0.6rem;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 0.7rem;
}

.buy-prize-selected-image {
  width: 90px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7ff;
  border: 1px solid #e6eaf8;
  display: grid;
  place-content: center;
}

.buy-prize-selected-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buy-prize-selected-name {
  font-weight: 600;
}

.buy-prize-selected-points,
.buy-prize-total {
  color: #d58f24;
  font-size: 1.15rem;
  font-weight: 700;
}

.buy-prize-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.buy-prize-qty #qtyValue {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 992px) {
  :root {
    --app-topbar-height: 62px;
  }

  .manage-settings-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .manage-settings-sidebar {
    position: static;
  }

  .manage-section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .manage-nav-filter-wrap {
    margin-bottom: 0.75rem;
  }

  .manage-nav-group + .manage-nav-group {
    border-top: 0;
    padding-top: 0;
  }

  .app-topbar .app-shell {
    min-height: 62px;
  }

  .app-nav-link {
    font-size: 0.87rem;
    padding-bottom: 0.55rem;
  }

  .table.app-table > :not(caption) > * > * {
    padding: 0.62rem 0.45rem;
  }
}

@media (min-width: 992px) {
  main.app-shell {
    max-width: 1480px;
  }

  .feed-surface,
  .prizes-surface,
  .primary-manage-surface {
    max-width: 1480px;
  }

  .feed-wrap {
    max-width: 1160px;
  }

  .app-topbar .app-shell {
    min-height: 76px;
    justify-content: flex-start;
    gap: 2.2rem;
  }

  .app-topbar-center {
    gap: 2.6rem;
  }

  .app-nav-button {
    margin-left: 0;
    padding-inline: 0.1rem;
  }
}

@media (max-width: 576px) {
  .app-topbar .app-shell {
    justify-content: flex-start;
    padding-left: 2.75rem;
    padding-right: 0.25rem;
  }

  .app-topbar-center {
    margin-right: auto;
  }

  .app-topbar-right {
    gap: 0.5rem;
    position: static;
    transform: none;
    margin-left: auto;
  }

  .app-user {
    display: none;
  }

  .app-section-card .card-body {
    padding: 0.95rem;
  }

  .feed-surface {
    padding: 0.75rem;
    border-radius: 16px;
  }

  .primary-manage-surface {
    padding: 0.75rem;
    border-radius: 16px;
  }

  .manage-settings-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .manage-settings-sidebar {
    position: static;
  }

  .manage-section-nav {
    display: flex;
    flex-direction: column;
    position: static;
    max-height: none;
  }

  .manage-nav-filter-wrap {
    margin-bottom: 0.6rem;
  }

  .manage-sticky-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .badge-settings-group-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.5rem;
  }

  .badge-settings-core-grid,
  .badge-settings-emotion-grid {
    grid-template-columns: 1fr;
  }

  .badge-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .badge-settings-actions .btn {
    width: 100%;
  }

  .action-stack .form-control,
  .action-stack .form-select {
    max-width: 100%;
  }

  .table td,
  .table th {
    font-size: 0.8rem;
  }

  .prizes-grid {
    grid-template-columns: 1fr;
  }

  .prize-card-button {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .coins-pill-link {
    padding-inline: 0.7rem;
    font-size: 0.95rem;
  }

  .app-bell,
  .app-avatar {
    width: 38px;
    height: 38px;
  }

  .prizes-toolbar {
    grid-template-columns: 1fr;
  }

  .prizes-sort-select {
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .app-menu-toggle {
    display: inline-flex;
  }

  .app-topbar .app-shell {
    padding-left: 2.75rem;
  }
}

@media (min-width: 992px) {
  .auth-layout {
    grid-template-columns: minmax(250px, 1fr) minmax(0, 1.35fr);
    align-items: stretch;
  }
}

/* ── Management Overview Dashboard ──────────────────────────────── */

.mgmt-overview-section {
  /* spacing handled via Bootstrap row/g-3 */
}

.mgmt-metric-card {
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-sm);
}

.mgmt-metric-card .card-body {
  padding: 1.1rem 1.15rem;
}

.mgmt-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tb-text-muted);
  margin-bottom: 0.85rem;
}

.mgmt-metric-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.mgmt-donut-wrap {
  flex-shrink: 0;
}

.mgmt-stat-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mgmt-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  gap: 0.5rem;
}

.mgmt-stat-name {
  color: var(--tb-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgmt-stat-val {
  font-weight: 600;
  color: var(--tb-text);
  white-space: nowrap;
  font-size: 0.82rem;
}

.mgmt-stat-sep {
  color: var(--tb-text-muted);
  font-weight: 400;
  margin: 0 0.2em;
}

/* Rewards card: large circular number */
.mgmt-total-ob {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #f5f6fb;
  border: 10px solid #e9ecf6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mgmt-ob-number {
  font-family: var(--tb-font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--tb-text);
}

.mgmt-ob-sublabel {
  font-size: 0.58rem;
  color: var(--tb-text-muted);
  margin-top: 0.2rem;
  line-height: 1.2;
  text-align: center;
  max-width: 70px;
}

/* Benchmark bar */
.mgmt-benchmark {
  padding-top: 0.75rem;
  border-top: 1px solid var(--tb-border);
}

.mgmt-benchmark-title {
  font-size: 0.72rem;
  color: var(--tb-text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.mgmt-benchmark-info {
  font-size: 0.68rem;
  cursor: default;
}

.mgmt-benchmark-track-wrap {
  position: relative;
}

.mgmt-benchmark-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  color: var(--tb-text-muted);
  margin-bottom: 0.25rem;
}

.mgmt-benchmark-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: visible;
}

.mgmt-benchmark-bar {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.csat-bar {
  background: linear-gradient(to right, #f4516c, #f5a623, #f5e623, #2ec5a7, #5b6cff);
}

.engagement-bar {
  background: linear-gradient(to right, #f4516c, #f5a623, #f5e623, #2ec5a7);
}

.rewards-bar {
  background: linear-gradient(to right, #f4516c, #f5a623, #f5e623, #2ec5a7);
}

.mgmt-benchmark-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5b6cff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  z-index: 2;
}

.mgmt-benchmark-top-label {
  margin-top: 0.3rem;
  text-align: right;
  font-size: 0.68rem;
  color: var(--tb-text-muted);
}

/* CSAT trend chart */
.mgmt-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tb-text);
}

.mgmt-period-badge {
  font-size: 0.72rem;
  color: var(--tb-text-muted);
  background: var(--tb-surface-soft);
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.mgmt-chart-wrap {
  min-height: 200px;
  position: relative;
}

/* Quick Overview tiles */
.mgmt-tile {
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  height: 100%;
}

.mgmt-tile-number {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--tb-text);
}

.mgmt-tile-label {
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

.mgmt-tile-star {
  font-size: 1.1rem;
  vertical-align: middle;
}

.mgmt-tile-blue {
  background: #eef0ff;
}

.mgmt-tile-blue .mgmt-tile-label {
  color: #5b6cff;
}

.mgmt-tile-green {
  background: #edfdf9;
}

.mgmt-tile-green .mgmt-tile-label {
  color: #0e7d68;
}

.mgmt-tile-amber {
  background: #fff9e8;
}

.mgmt-tile-amber .mgmt-tile-label {
  color: #c47a00;
}

.mgmt-tile-amber .mgmt-tile-star {
  color: #f5a623;
}

.mgmt-tile-orange {
  background: #fff4ed;
}

.mgmt-tile-orange .mgmt-tile-label {
  color: #c05e00;
}

.admin-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.admin-v2-head {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.admin-v2-head > div {
  width: 100%;
}

.admin-v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-v2-tab {
  border: 1px solid #dfe4f5;
  background: #fff;
  border-radius: 999px;
  font-weight: 600;
  color: #4b577c;
  padding: 0.35rem 0.75rem;
}

.admin-v2-tab.is-active {
  border-color: #cfd8ff;
  background: #ecf1ff;
  color: #2744c7;
}

.admin-v2-panel.is-active {
  display: block;
}

.admin-v2-card {
  margin-bottom: 0;
}

.admin-v2-company-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-v2-company-row {
  border: 1px solid #e6eaf7;
  border-radius: 12px;
  background: #fff;
}

.admin-v2-company-row.is-open {
  border-color: #c9d5ff;
  box-shadow: 0 0 0 2px rgba(91, 108, 255, 0.08);
}

.admin-v2-company-summary {
  flex: 1;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.8rem 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.admin-v2-company-summary-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-v2-company-title {
  font-weight: 700;
  color: #1f2743;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.admin-v2-company-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-v2-company-icon {
  color: #4c64e6;
}

.admin-v2-user-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #edf2ff;
  color: #3953cc;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-v2-row-chevron {
  color: #6f7ca8;
  transition: transform 0.2s ease;
}

.admin-v2-company-row.is-open .admin-v2-row-chevron {
  transform: rotate(180deg);
}

.admin-v2-company-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-right: 0.55rem;
}

.admin-v2-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d9e2ff;
  background: #eef3ff;
  color: #3652d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all 0.15s ease;
}

.admin-v2-icon-btn:hover {
  transform: translateY(-1px);
}

.admin-v2-icon-btn-user:hover,
.admin-v2-icon-btn-edit:hover {
  background: #3652d8;
  border-color: #3652d8;
  color: #fff;
}

.admin-v2-icon-btn-delete {
  background: #fff0f0;
  border-color: #ffd2d2;
  color: #d93c3c;
}

.admin-v2-icon-btn-delete:hover {
  background: #d93c3c;
  border-color: #d93c3c;
  color: #fff;
}

.admin-v2-icon-btn-chevron {
  background: #f7f9ff;
  border-color: #e2e8ff;
  color: #6f7ca8;
}

.admin-v2-icon-btn-chevron:hover {
  background: #e9eeff;
  border-color: #d2dcff;
  color: #5266bf;
}

.admin-v2-company-panel {
  border-top: 1px solid #eef1fb;
  padding: 0.75rem 0.95rem 0.85rem;
}

.admin-v2-company-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-v2-company-stats {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-v2-company-settings {
  display: grid;
  gap: 0.55rem;
}

.admin-v2-setting-card {
  border: 1px solid #e6eaf7;
  border-radius: 10px;
  background: #fbfcff;
}

.admin-v2-setting-card.is-open {
  border-color: #c9d5ff;
  background: #fff;
}

.admin-v2-setting-card-head {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-v2-setting-card-title {
  font-weight: 700;
  color: #1f2743;
}

.admin-v2-setting-card-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-v2-setting-card-body {
  border-top: 1px solid #edf1fb;
  padding: 0.6rem 0.75rem 0.75rem;
}

/* --- Give Badge modal --- */
.give-badge-modal-dialog {
  max-width: min(960px, 100vw - 1.5rem);
}

.give-badge-modal .modal-body {
  padding-top: 0.5rem;
}

.give-badge-carousel-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.give-badge-carousel-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 0.15rem 0 0.35rem;
}

.give-badge-carousel-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  padding: 0 0.15rem;
}

.give-badge-carousel-card {
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.give-badge-carousel-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.give-badge-carousel-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 132px;
  max-width: 150px;
  padding: 0.75rem 0.55rem 0.65rem;
  border: 1px solid #e2e7f4;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.give-badge-carousel-card input:checked + .give-badge-carousel-card-inner {
  border-color: #7c8cff;
  box-shadow: 0 0 0 2px rgba(91, 108, 255, 0.14);
}

.give-badge-carousel-thumb {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-content: center;
  background: #f0f2fb;
}

.give-badge-carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.give-badge-carousel-fallback {
  font-weight: 700;
  color: #4151cc;
}

.give-badge-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #e8f8ef;
  color: #1f7a4a;
}

.give-badge-carousel-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: #1f2430;
}

.give-badge-carousel-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e7f4;
  background: #fff;
  color: #4a5568;
  display: grid;
  place-content: center;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.give-badge-carousel-btn:hover {
  background: #f7f8ff;
  border-color: #c8d0f0;
  color: #2d3a5c;
}

.give-badge-carousel-dots {
  display: flex;
  gap: 0.35rem;
}

.give-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #d5dae8;
  cursor: pointer;
}

.give-badge-dot:hover,
.give-badge-dot:focus-visible {
  background: #8b96b8;
}

.give-badge-user-trigger {
  border-radius: 10px;
  border-color: #dfe5f6;
}

.give-badge-user-panel {
  margin-top: 0.35rem;
  border: 1px solid #e2e7f4;
  border-radius: 12px;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
}

.give-badge-user-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.give-badge-user-option:hover {
  background: #f7f8ff;
}

.give-badge-user-option input {
  flex-shrink: 0;
}

.give-badge-editor-wrap {
  border: 1px solid #dfe5f6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.give-badge-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #eef1f6;
  background: #fafbfd;
}

.give-badge-tb-btn {
  border: 0;
  background: transparent;
  width: 32px;
  height: 30px;
  border-radius: 6px;
  color: #3d4a63;
  display: grid;
  place-content: center;
  padding: 0;
}

.give-badge-tb-btn:hover {
  background: #e8ebf5;
  color: #1f2430;
}

.give-badge-tb-sep {
  width: 1px;
  height: 18px;
  background: #dde2ee;
  margin: 0 0.15rem;
}

.give-badge-editor {
  min-height: 120px;
  max-height: 220px;
  overflow-y: auto;
  border: 0 !important;
  border-radius: 0;
  resize: vertical;
}

.give-badge-editor:empty:before {
  content: attr(data-placeholder);
  color: #8b95a8;
  pointer-events: none;
}

.activity-post-text p:last-child {
  margin-bottom: 0;
}

/* --- Primary: edit badge modal --- */
.badge-edit-modal .modal-content {
  border-radius: 12px;
  overflow: hidden;
}

.badge-edit-modal .modal-header {
  padding-bottom: 0.25rem;
}

.badge-edit-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0;
}

.badge-edit-modal__textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}

.badge-edit-modal .badge-edit-recognition.card {
  border-radius: 10px;
}

.badge-edit-modal .modal-footer {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
  gap: 0.5rem;
}

.badge-edit-modal .badge-edit-danger-zone .btn-outline-danger {
  font-weight: 500;
}

