*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f1f5f9; color: #1e293b; }

/* Stats cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.card {
  background: #fff; border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  cursor: pointer;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.11); }
.card.active-filter { border-color: #1e293b; box-shadow: 0 0 0 3px rgba(30,41,59,.1), 0 4px 14px rgba(0,0,0,.1); transform: translateY(-2px); }
.card .label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin-bottom: 6px; }
.card .value { font-size: 32px; font-weight: 700; }
.card.total   .value { color: #1e293b; }
.card.active  .value { color: #16a34a; }
.card.expired .value { color: #dc2626; }
.card.full    .value { color: #2563eb; }
.card.pending .value { color: #d97706; }
.card.active-filter.active  { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12), 0 4px 14px rgba(0,0,0,.1); }
.card.active-filter.expired { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12), 0 4px 14px rgba(0,0,0,.1); }
.card.active-filter.full    { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12), 0 4px 14px rgba(0,0,0,.1); }
.card.active-filter.pending { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.12), 0 4px 14px rgba(0,0,0,.1); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button {
  padding: 7px 16px; border-radius: 6px; border: 1px solid #cbd5e1;
  background: #fff; font-size: 13px; cursor: pointer; color: #475569; font-weight: 500;
  transition: all .15s;
}
.filters button:hover { background: #f1f5f9; }
.filters button.active { background: #1e293b; color: #fff; border-color: #1e293b; }

/* Search */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar input {
  padding: 7px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; width: 260px; outline: none;
}
.toolbar input:focus { border-color: #2563eb; }
.toolbar .count { font-size: 13px; color: #64748b; margin-left: auto; }

/* Table */
.table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
thead th {
  background: #f8fafc; text-align: left; padding: 11px 14px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #64748b; border-bottom: 1px solid #e2e8f0;
  white-space: nowrap; cursor: pointer; user-select: none;
}
thead th:hover { background: #f1f5f9; }
tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
td { padding: 10px 14px; vertical-align: middle; white-space: nowrap; }

/* Status badges */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.badge.trial-active  { background: #dcfce7; color: #15803d; }
.badge.trial-expired { background: #fee2e2; color: #b91c1c; }
.badge.full          { background: #dbeafe; color: #1d4ed8; }
.badge.pending       { background: #fef3c7; color: #b45309; }

.empty   { text-align: center; padding: 48px; color: #94a3b8; font-size: 14px; }
.loading { text-align: center; padding: 48px; color: #94a3b8; }
.loading .spinner-border { width: 1.8rem; height: 1.8rem; }
