/* ─── shared components ─────────────────────────────────── */

/* buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 36px; padding: 0 var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--fg);
  font-size: 13.5px; font-weight: 550;
  transition: background .15s var(--ease), opacity .15s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--line); }
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn--ghost { background: transparent; color: var(--fg-muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn--block { width: 100%; height: 42px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--icon { width: 36px; padding: 0; flex: none; }

/* inputs --------------------------------------------------- */
.field {
  width: 100%; height: 42px; padding: 0 var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .15s var(--ease);
}
.field::placeholder { color: var(--fg-faint); }
.field:focus { outline: none; border-color: var(--accent); }

/* chips / tabs --------------------------------------------- */
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 var(--sp-3);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--fg-muted);
  font-size: 12.5px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s var(--ease);
}
.chip:hover { color: var(--fg); }
.chip[aria-selected="true"] { background: var(--fg); color: var(--bg); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; }
.seg button {
  height: 28px; padding: 0 var(--sp-3);
  border-radius: 6px;
  font-size: 12.5px; font-weight: 550; color: var(--fg-muted);
  transition: all .15s var(--ease);
}
.seg button[aria-selected="true"] { background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-1); }

/* app icon monogram ---------------------------------------- */
.ico {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: -.02em;
  color: #fff;
  object-fit: cover;
  user-select: none;
}
.ico--lg { width: 52px; height: 52px; border-radius: 13px; font-size: 21px; }

/* skeleton ------------------------------------------------- */
.sk {
  background: var(--skeleton);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty / error -------------------------------------------- */
.state {
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  color: var(--fg-muted);
}
.state h3 { margin-bottom: 6px; color: var(--fg); }

/* toast ---------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--fg); color: var(--bg);
  padding: 10px var(--sp-4); border-radius: var(--r-full);
  font-size: 13px; font-weight: 550;
  box-shadow: var(--shadow-2);
  z-index: 200;
  animation: rise .25s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
