/* dashboard-analytics.css
   Styles for the admin-only analytics card (#analyticsBlock). Kept in its
   own file so the card can be changed without touching dashboard.css.
   Colour variables come from dashboard.css. */

/* Small button variant — defined here rather than in dashboard.css so this
   card stays self-contained. */
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.an-section {
  margin-top: 18px;
}
.an-section:first-of-type {
  margin-top: 4px;
}
.an-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.an-section-head h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink, #F4F6FA);
}
.an-section-sub {
  font-size: 12.5px;
  color: var(--faint, #909AAB);
}

/* Figures ---------------------------------------------------------------- */
.an-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.an-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line, #1F2733);
  border-radius: 12px;
  background: var(--bg-2, #0B0F16);
}
/* A card with data-category is a button (dashboard-users.js). */
button.an-stat {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
button.an-stat:hover { border-color: var(--line-2, #2B3543); background: var(--panel, #10151F); }
button.an-stat:focus-visible { outline: 2px solid var(--red-2, #FF6A45); outline-offset: 2px; }
button.an-stat.is-open { border-color: var(--red, #E8431F); background: var(--red-soft, rgba(232,67,31,.13)); }
button.an-stat.is-open .an-stat-hint::after { content: " · tap to close"; color: var(--red-2, #FF6A45); }
.an-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #A7B0BE);
}
.an-stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink, #F4F6FA);
}
.an-stat-hint {
  font-size: 11.5px;
  color: var(--faint, #909AAB);
  line-height: 1.35;
}

/* Duration chips --------------------------------------------------------- */
.an-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.an-chip {
  font-size: 13px;
  color: var(--muted, #A7B0BE);
  border: 1px solid var(--line-2, #2B3543);
  border-radius: 999px;
  padding: 5px 12px;
}
.an-chip strong {
  color: var(--ink, #F4F6FA);
}

/* Reserved class codes --------------------------------------------------- */
.an-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.an-code {
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red-2, #FF6A45);
  border: 1px solid var(--line-2, #2B3543);
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--bg-2, #0B0F16);
  cursor: default;
}

/* Promo table ------------------------------------------------------------ */
.an-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13.5px;
}
.an-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint, #909AAB);
  font-weight: 700;
  padding: 0 10px 7px 0;
}
.an-table td {
  padding: 8px 10px 8px 0;
  border-top: 1px solid var(--line, #1F2733);
  color: var(--muted, #A7B0BE);
  vertical-align: top;
}
.an-mono {
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink, #F4F6FA);
}
.an-empty {
  color: var(--faint, #909AAB);
  font-size: 13px;
  font-style: italic;
}

/* Status line ------------------------------------------------------------ */
.an-status {
  font-size: 12.5px;
  color: var(--faint, #909AAB);
}
.an-status-err {
  color: var(--red-2, #FF6A45);
}

/* Expanded teacher list under the Accounts cards (dashboard-users.js) ---- */
.us-detail {
  margin-top: 12px;
  padding: 12px 14px 10px;
  border: 1px solid var(--line, #1F2733);
  border-radius: 12px;
  background: var(--bg-2, #0B0F16);
}
.us-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.us-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink, #F4F6FA); }
.us-scroll { overflow-x: auto; }
.us-table { min-width: 860px; margin-top: 8px; font-size: 13px; }
.us-table td { white-space: nowrap; }
.us-email-addr { color: var(--ink, #F4F6FA); font-weight: 600; }
.us-sub { font-size: 11.5px; color: var(--faint, #909AAB); margin-top: 2px; }
.us-emails { display: flex; flex-direction: column; gap: 3px; }
.us-email { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint, #909AAB); }
.us-email.sent { color: var(--muted, #A7B0BE); }
.us-email-mark { display: inline-block; width: 14px; text-align: center; font-weight: 700; color: var(--faint, #909AAB); }
.us-email.sent .us-email-mark { color: var(--green, #3ECF8E); }
.us-email-off { color: var(--amber, #F2BB63); }
.us-tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; margin-bottom: 3px; }
.us-tag-admin { background: var(--amber-soft, rgba(242,187,99,.09)); color: var(--amber, #F2BB63); border: 1px solid rgba(242,187,99,.35); }
.us-money { font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace); font-weight: 700; color: var(--faint, #909AAB); }
.us-money.paid { color: var(--green, #3ECF8E); }
.us-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--faint, #909AAB); }
