/* ── Glass action buttons (.qb) ── */
.qb {
  border-radius: 18px;
  padding: 15px 13px;
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 8px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s;
}
.qb:active { transform: scale(0.97); }
.qb::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 52%;
  background: linear-gradient(180deg, rgba(255,255,255,.28) 0%, transparent 100%);
  border-radius: inherit; pointer-events: none; z-index: 1;
}
.qb::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(0deg, rgba(0,0,0,.14) 0%, transparent 100%);
  pointer-events: none; z-index: 1;
}
.qb svg  { width: 22px; height: 22px; stroke: white; fill: none; position: relative; z-index: 2; }
.qb span { font-size: 13px; font-weight: 700; color: white; text-shadow: 0 1px 4px rgba(0,0,0,.25); position: relative; z-index: 2; }

.qb-gr {
  background: linear-gradient(145deg, #12c97a 0%, #0a7d52 100%);
  box-shadow: 0 8px 24px rgba(13,155,106,.45), 0 2px 6px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
}
.qb-pu {
  background: linear-gradient(145deg, #9b5ff5 0%, #5b1fd4 100%);
  box-shadow: 0 8px 24px rgba(124,58,237,.45), 0 2px 6px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
}
.qb-bl {
  background: linear-gradient(145deg, #52aaee 0%, #1a6bb8 100%);
  box-shadow: 0 8px 24px rgba(52,152,219,.45), 0 2px 6px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
}
.qb-vi {
  background: linear-gradient(145deg, #818cf8 0%, #4338ca 100%);
  box-shadow: 0 8px 24px rgba(99,102,241,.45), 0 2px 6px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
}
.qb-dk {
  background: linear-gradient(145deg, #2d2b50 0%, #111128 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.14);
}
.qb-ai {
  background: linear-gradient(145deg, #14e88e 0%, #0a7d52 50%, #064d33 100%);
  box-shadow: 0 8px 24px rgba(20,232,142,.45), 0 2px 6px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.32), 0 0 30px rgba(20,232,142,.25);
  position: relative;
}
.qb-ai::before {
  background: linear-gradient(180deg, rgba(255,255,255,.34) 0%, transparent 100%);
}

/* ── Primary action button ── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  border: none; border-radius: 12px;
  background: var(--green); color: white;
  font: 700 14px 'Montserrat', sans-serif;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .12s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary.btn-purple { background: var(--purple); }
.btn-primary.btn-ghost {
  background: white; color: var(--dark);
  border: 2px solid var(--border);
}

/* ── Small header button ── */
.btn-sm {
  padding: 8px 14px; border: none; border-radius: 10px;
  background: var(--green); color: white;
  font: 700 12px 'Montserrat', sans-serif;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-sm.btn-blue { background: var(--blue); }

/* ── Input with icon ── */
.field {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 12px; padding: 13px 14px;
  margin-bottom: 10px;
}
.field svg { stroke: var(--muted); flex-shrink: 0; }
.field input {
  border: none; background: transparent; width: 100%; outline: none;
  font: 500 14px 'Montserrat', sans-serif; color: var(--dark);
}
.field input::placeholder { color: #bbb; }

/* ── Search field ── */
.search-field {
  display: flex; align-items: center; gap: 10px;
  background: white; border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px;
}
.search-field svg { stroke: var(--muted); flex-shrink: 0; }
.search-field input {
  border: none; background: transparent; width: 100%; outline: none;
  font: 500 14px 'Montserrat', sans-serif; color: var(--dark);
}
.search-field input::placeholder { color: #bbb; }

/* ── Light inputs (for modals) ── */
.input-light {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--dark);
  font: 500 14px 'Montserrat', sans-serif; outline: none;
}
.input-light:focus { border-color: var(--green); }
.profile-field { display: flex; flex-direction: column; gap: 4px; }
.profile-field label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-left: 4px; }
.select-light {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--dark);
  font: 500 14px 'Montserrat', sans-serif; outline: none;
  appearance: none;
}
.select-light:focus { border-color: var(--green); }

/* ── Textarea ── */
.textarea-light {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--dark);
  font: 500 14px 'Montserrat', sans-serif; outline: none;
  resize: none; min-height: 80px;
}

/* ── Bottom sheet modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: flex-end;
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }

.bottom-sheet {
  width: 100%;
  background: white;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 20px calc(24px + var(--safe-bottom));
  max-height: 90vh; overflow-y: auto;
  animation: slide-up .25s ease;
}
.bottom-sheet::-webkit-scrollbar { display: none; }
@keyframes slide-up {
  from { transform: translateY(40px); opacity:0; }
  to   { transform: translateY(0); opacity:1; }
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border); border-radius: 99px;
  margin: 6px auto 20px;
}
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.badge-green  { background: var(--green-lt); color: var(--green); }
.badge-red    { background: #fef2f2; color: var(--red); }
.badge-amber  { background: #fffbeb; color: #d97706; }
.badge-gray   { background: #f3f4f6; color: var(--muted); }
.badge-blue   { background: #eff6ff; color: var(--blue); }

/* ── Avatar ── */
.av {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: white;
  flex-shrink: 0;
}
.av-ddl   { background: linear-gradient(135deg, var(--green), var(--purple)); }
.av-child { background: linear-gradient(135deg, var(--orange), var(--orange-dk)); }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  padding: 48px 24px; color: var(--muted); text-align: center;
  font-size: 14px;
}
.empty-state svg { opacity: .3; }

/* ── List gap ── */
.list-gap { display: flex; flex-direction: column; gap: 8px; }
