/* =========================================================
   Components (shared across all apps)
   - buttons
   - pills
   - cards
   - tables
   - basic form controls
   ========================================================= */

/* ---------- Text helpers ---------- */
.muted {
  color: #6b7280;
}

/* ---------- Buttons ---------- */
.btn,
a.btn,
button.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #e6e9ee;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}

.btn:hover,
a.btn:hover,
button.btn:hover {
  background: #f7f8fa;
}

.btn:active,
a.btn:active,
button.btn:active {
  transform: translateY(1px);
}

/* Ghost is the default pill button look used in headers */
.btn-ghost,
a.btn-ghost,
button.btn-ghost {
  border: 1px solid #e6e9ee;
  background: #ffffff;
  color: #111827;
}

/* Active state (selected tab) */
.btn-active,
a.btn-active,
button.btn-active {
  border-color: #111827;
}

/* Disabled */
.btn-disabled,
a.btn-disabled,
button.btn-disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Pills (inline tags/filters) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e6e9ee;
  background: #ffffff;
  color: #111827;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.pill:hover {
  background: #f7f8fa;
}

/* ---------- Cards ---------- */
.card {
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  padding: 14px;
}

/* ---------- Inputs ---------- */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: #c7d2fe;
}

/* Make small inline search inputs behave nicely */
form input[type="text"] {
  max-width: 520px;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-weight: 800;
  color: #111827;
  border-bottom: 1px solid #edf0f4;
  padding: 10px 10px;
}

tbody td {
  border-bottom: 1px solid #f0f2f6;
  padding: 10px 10px;
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fafbfc;
}

/* ---------- Mobile table safety (simple) ---------- */
@media (max-width: 720px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
