/* ═══════════════════════════════════════════════════════════════════════════
   FaceCheck Platform — Component Library v1.0
   All reusable UI components. Requires tokens.css to be loaded first.
   Injected automatically by shell.js on every shell page.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base reset (applied only to new component classes) ──────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ────────────────────────────────────────────────────────────────────────────
   BUTTONS
   .btn, .btn-{variant}, .btn-{size}, .btn-icon-only
──────────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition-colors), box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  outline: none;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus-visible {
  box-shadow: var(--shadow-glow);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--color-brand-strong);
  color: var(--color-text-inverse);
  border-color: transparent;
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
}

/* Secondary */
.btn-secondary {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  border-color: var(--color-border-default);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg-overlay);
  border-color: var(--color-border-strong);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border-default);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--color-bg-overlay);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

/* Danger */
.btn-danger {
  background: var(--color-danger-subtle);
  color: var(--color-danger-text);
  border-color: var(--color-danger-ring);
}
.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-subtle);
  border-color: var(--color-danger);
}
.btn-danger:focus-visible {
  box-shadow: var(--shadow-glow-danger);
}

/* Success */
.btn-success {
  background: var(--color-success-subtle);
  color: var(--color-success-text);
  border-color: var(--color-success-ring);
}
.btn-success:hover:not(:disabled) {
  background: var(--color-success-subtle);
}

/* Sizes */
.btn-xs {
  height: var(--btn-height-xs);
  padding: var(--btn-padding-xs);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  gap: var(--space-1);
}
.btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--text-sm);
  gap: var(--space-1);
}
.btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
  font-size: var(--text-md);
  border-radius: var(--radius-lg);
  gap: var(--space-3);
}
.btn-xl {
  height: var(--btn-height-xl);
  padding: var(--btn-padding-xl);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-lg);
  gap: var(--space-3);
}

/* Icon-only button */
.btn-icon {
  width: var(--btn-height-md);
  height: var(--btn-height-md);
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-colors);
}
.btn-icon:hover { color: var(--color-text-primary); background: var(--color-bg-overlay); }
.btn-icon.btn-sm { width: var(--btn-height-sm); height: var(--btn-height-sm); }

/* ────────────────────────────────────────────────────────────────────────────
   CARDS
──────────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding-md);
  box-shadow: var(--card-shadow);
  transition: border-color var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
}

.card h2 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-4);
  margin-top: 0;
}

.card-sm   { padding: var(--card-padding-sm); }
.card-lg   { padding: var(--card-padding-lg); }
.card-flat { box-shadow: none; }

.card-interactive {
  cursor: pointer;
}
.card-interactive:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Statistic card */
.stat-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--space-5) var(--card-padding-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
}
.stat-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-tertiary);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.stat-card__delta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.stat-card__value--brand   { color: var(--color-brand-text); }
.stat-card__value--success { color: var(--color-success-text); }
.stat-card__value--warning { color: var(--color-warning-text); }
.stat-card__value--danger  { color: var(--color-danger-text); }
.stat-card__value--info    { color: var(--color-info-text); }

/* ────────────────────────────────────────────────────────────────────────────
   FORM ELEMENTS
──────────────────────────────────────────────────────────────────────────── */

.fc-input,
.fc-select,
.fc-textarea {
  width: 100%;
  height: var(--input-height-md);
  padding: 0 var(--space-3);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1;
  outline: none;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.fc-input::placeholder,
.fc-textarea::placeholder { color: var(--color-text-tertiary); }

.fc-input:focus,
.fc-select:focus,
.fc-textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: none;
}

.fc-input:disabled,
.fc-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fc-select { cursor: pointer; }
.fc-textarea { height: auto; padding: var(--space-2) var(--space-3); resize: vertical; }

.fc-input-sm, .fc-select-sm { height: var(--input-height-sm); font-size: var(--text-sm); }
.fc-input-lg, .fc-select-lg { height: var(--input-height-lg); font-size: var(--text-md); }

/* Field wrapper */
.fc-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.fc-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-secondary);
}

.fc-hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  font-weight: var(--weight-normal);
  text-transform: none;
  letter-spacing: 0;
}

.fc-field-error .fc-input,
.fc-field-error .fc-select {
  border-color: var(--color-danger);
  box-shadow: none;
}

.fc-error-msg {
  font-size: var(--text-sm);
  color: var(--color-danger-text);
}

/* Search box */
.fc-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fc-search__input {
  height: var(--input-height-md);
  padding: 0 var(--space-3) 0 var(--space-8);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  min-width: 200px;
}

.fc-search__input::placeholder { color: var(--color-text-tertiary); }
.fc-search__input:focus {
  border-color: var(--color-border-focus);
  box-shadow: none;
}

.fc-search__icon {
  position: absolute;
  left: var(--space-2);
  width: var(--icon-md);
  height: var(--icon-md);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────────────────────
   BADGES / STATUS PILLS
──────────────────────────────────────────────────────────────────────────── */

.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fc-badge-active  { background: var(--color-success-subtle); color: var(--color-success-text); }
.fc-badge-expired { background: var(--color-danger-subtle);  color: var(--color-danger-text);  }
.fc-badge-frozen  { background: var(--color-frozen-subtle);  color: var(--color-frozen);        }
.fc-badge-neutral { background: var(--color-bg-overlay);     color: var(--color-text-tertiary); }
.fc-badge-brand   { background: var(--color-brand-subtle);   color: var(--color-brand-text);    }
.fc-badge-warning { background: var(--color-warning-subtle); color: var(--color-warning-text);  }
.fc-badge-info    { background: var(--color-info-subtle);    color: var(--color-info-text);     }

/* Status dot + label inline */
.fc-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.fc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.fc-status-dot--online  {
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-subtle);
}
.fc-status-dot--offline { background: var(--color-danger); }
.fc-status-dot--warning { background: var(--color-warning); }
.fc-status-dot--neutral { background: var(--color-text-disabled); }

/* ────────────────────────────────────────────────────────────────────────────
   TABLES
──────────────────────────────────────────────────────────────────────────── */

.fc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.fc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--table-font);
}

.fc-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-tertiary);
  padding: 0 var(--space-3);
  height: var(--table-th-height);
  border-bottom: 1px solid var(--color-border-subtle);
  white-space: nowrap;
}

.fc-table td {
  padding: 0 var(--space-3);
  height: var(--table-row-height);
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  vertical-align: middle;
}

.fc-table td:first-child,
.fc-table th:first-child { padding-left: var(--space-4); }

.fc-table td:last-child,
.fc-table th:last-child  { padding-right: var(--space-4); }

.fc-table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
  cursor: pointer;
}
.fc-table tbody tr:hover td { background: var(--color-bg-overlay); }
.fc-table tbody tr:last-child td { border-bottom: none; }

.fc-table--fixed { table-layout: fixed; }
.fc-table--no-hover tbody tr { cursor: default; }
.fc-table--no-hover tbody tr:hover td { background: transparent; }

.fc-table__empty {
  text-align: center;
  padding: var(--space-12) var(--space-4) !important;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

/* ────────────────────────────────────────────────────────────────────────────
   EMPTY STATES
──────────────────────────────────────────────────────────────────────────── */

.fc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.fc-empty__icon {
  font-size: 2.5rem;
  opacity: 0.2;
  line-height: 1;
}

.fc-empty__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.fc-empty__desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  max-width: 320px;
  line-height: var(--leading-relaxed);
}

/* ────────────────────────────────────────────────────────────────────────────
   SKELETON LOADERS
──────────────────────────────────────────────────────────────────────────── */

@keyframes ds-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.fc-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-elevated) 25%,
    var(--color-bg-overlay) 50%,
    var(--color-bg-elevated) 75%
  );
  background-size: 800px 100%;
  animation: ds-shimmer 1.6s ease infinite;
  border-radius: var(--radius-sm);
}

.fc-skeleton-text  { height: 14px; }
.fc-skeleton-title { height: 20px; width: 40%; }
.fc-skeleton-btn   { height: var(--btn-height-md); width: 100px; border-radius: var(--radius-md); }
.fc-skeleton-card  { height: 120px; border-radius: var(--card-radius); }
.fc-skeleton-avatar{ width: 40px; height: 40px; border-radius: var(--radius-full); }

/* Table skeleton rows */
.fc-skeleton-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 0.6fr;
  gap: var(--space-4);
  align-items: center;
  padding: 0 var(--space-4);
  height: var(--table-row-height);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* ────────────────────────────────────────────────────────────────────────────
   LOADING SPINNER
──────────────────────────────────────────────────────────────────────────── */

@keyframes ds-spin { to { transform: rotate(360deg); } }

.fc-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-brand);
  border-radius: var(--radius-full);
  animation: ds-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.fc-spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }
.fc-spinner-lg { width: 28px; height: 28px; border-width: 2.5px; }

/* ────────────────────────────────────────────────────────────────────────────
   MODALS / DIALOGS
──────────────────────────────────────────────────────────────────────────── */

.fc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: ds-overlay-in var(--duration-base) var(--ease-out);
}

@keyframes ds-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fc-modal {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: min(440px, 100%);
  max-height: calc(100vh - var(--space-8));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: ds-modal-in var(--duration-slow) var(--ease-spring);
}

@keyframes ds-modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.fc-modal--wide { width: min(600px, 100%); }
.fc-modal--sm   { width: min(360px, 100%); }

.fc-modal__header {
  display: flex;
  align-items: center;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.fc-modal__title {
  flex: 1;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
  letter-spacing: var(--tracking-tight);
}

.fc-modal__body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.fc-modal__footer {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────────────────────
   DRAWERS
──────────────────────────────────────────────────────────────────────────── */

.fc-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: var(--z-drawer);
  display: flex;
  justify-content: flex-end;
  animation: ds-overlay-in var(--duration-base) var(--ease-out);
}

.fc-drawer {
  width: min(440px, 95vw);
  height: 100%;
  background: var(--color-bg-elevated);
  border-left: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: ds-drawer-in var(--duration-slow) var(--ease-spring);
}

@keyframes ds-drawer-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.fc-drawer__header {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
  gap: var(--space-3);
}

.fc-drawer__title {
  flex: 1;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.fc-drawer__section {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.fc-drawer__section:last-child { border-bottom: none; }

.fc-drawer__section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-3);
}

.fc-drawer__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 32px;
  font-size: var(--text-sm);
}

.fc-drawer__row-label {
  color: var(--color-text-tertiary);
  min-width: 80px;
  flex-shrink: 0;
  font-size: var(--text-xs);
}

.fc-drawer__row-value {
  color: var(--color-text-primary);
  flex: 1;
}

/* ────────────────────────────────────────────────────────────────────────────
   TOASTS / NOTIFICATIONS
──────────────────────────────────────────────────────────────────────────── */

.fc-toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.fc-toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  min-width: 240px;
  max-width: 380px;
  pointer-events: all;
  animation: ds-toast-in var(--duration-slow) var(--ease-spring);
}

@keyframes ds-toast-in {
  from { opacity: 0; transform: translateX(16px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}

.fc-toast--success { border-color: var(--color-success-ring); }
.fc-toast--error   { border-color: var(--color-danger-ring); }
.fc-toast--warning { border-color: var(--color-warning-ring); }

.fc-toast__icon { font-size: var(--icon-lg); flex-shrink: 0; }
.fc-toast__msg  { flex: 1; line-height: var(--leading-snug); }

/* ────────────────────────────────────────────────────────────────────────────
   SECTION HEADERS / PAGE HEADERS
──────────────────────────────────────────────────────────────────────────── */

.fc-page-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.fc-page-header__main { flex: 1; min-width: 0; }

.fc-page-header__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-1) 0;
  line-height: var(--leading-tight);
}

.fc-page-header__desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin: 0;
  line-height: var(--leading-relaxed);
}

.fc-page-header__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-shrink: 0;
}

/* Section header (within a card or section) */
.fc-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.fc-section-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  flex: 1;
  margin: 0;
  letter-spacing: var(--tracking-tight);
}

/* ────────────────────────────────────────────────────────────────────────────
   BREADCRUMBS
──────────────────────────────────────────────────────────────────────────── */

.fc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  flex-wrap: wrap;
}

.fc-breadcrumbs a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}
.fc-breadcrumbs a:hover { color: var(--color-text-primary); }

.fc-breadcrumbs__sep {
  opacity: 0.4;
  font-size: var(--text-xs);
}

.fc-breadcrumbs__current {
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
}

/* ────────────────────────────────────────────────────────────────────────────
   DIVIDERS
──────────────────────────────────────────────────────────────────────────── */

.fc-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-4) 0;
  border: none;
}

.fc-divider-strong {
  background: var(--color-border-default);
}

/* ────────────────────────────────────────────────────────────────────────────
   CODE / MONO
──────────────────────────────────────────────────────────────────────────── */

.fc-code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.12rem 0.4rem;
  color: var(--color-text-secondary);
}

.fc-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* ────────────────────────────────────────────────────────────────────────────
   KBD / SHORTCUT LABELS
──────────────────────────────────────────────────────────────────────────── */

.fc-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.4rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-default);
  border-bottom-width: 2px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  line-height: 1.4;
}

/* ────────────────────────────────────────────────────────────────────────────
   CHIP / STAT CHIP
──────────────────────────────────────────────────────────────────────────── */

.fc-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.6rem;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.03em;
  background: var(--color-bg-elevated);
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border-subtle);
  white-space: nowrap;
}

.fc-chip--active   { background: var(--color-success-subtle); color: var(--color-success-text); border-color: transparent; }
.fc-chip--expired  { background: var(--color-warning-subtle); color: var(--color-warning-text); border-color: transparent; }
.fc-chip--danger   { background: var(--color-danger-subtle);  color: var(--color-danger-text);  border-color: transparent; }
.fc-chip--frozen   { background: var(--color-frozen-subtle);  color: var(--color-frozen);       border-color: transparent; }
.fc-chip--brand    { background: var(--color-brand-subtle);   color: var(--color-brand-text);   border-color: transparent; }

/* ────────────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
──────────────────────────────────────────────────────────────────────────── */

.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-primary   { color: var(--color-text-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-tertiary  { color: var(--color-text-tertiary) !important; }
.text-brand     { color: var(--color-brand-text) !important; }
.text-success   { color: var(--color-success-text) !important; }
.text-warning   { color: var(--color-warning-text) !important; }
.text-danger    { color: var(--color-danger-text) !important; }

.font-mono { font-family: var(--font-mono); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────────────────────
   LOADING SCREEN
──────────────────────────────────────────────────────────────────────────── */

.fc-loading-screen {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  z-index: 9999;
}

.fc-loading-screen__logo {
  font-size: 2rem;
  opacity: 0.6;
  animation: ds-loading-pulse 1.5s ease infinite;
}

@keyframes ds-loading-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.05); }
}

.fc-loading-screen__label {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

/* ────────────────────────────────────────────────────────────────────────────
   RESPONSIVE GRID
──────────────────────────────────────────────────────────────────────────── */

.fc-grid { display: grid; gap: var(--space-4); }
.fc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.fc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fc-grid-4 { grid-template-columns: repeat(4, 1fr); }
.fc-grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 1024px) {
  .fc-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fc-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fc-grid-4, .fc-grid-3, .fc-grid-2 { grid-template-columns: 1fr; }
}

/* ────────────────────────────────────────────────────────────────────────────
   BRAND LOGO IMG (white-label logo replacement)
──────────────────────────────────────────────────────────────────────────── */

.fc-brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION  (Taste §6.B — non-negotiable)
   Ambient / decorative loops collapse to static. Feedback transitions
   (modal / drawer / toast) still play but instantly, so nothing is lost.
──────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Kill the ambient decorative loops outright */
  .fc-status-dot--online,
  .fc-skeleton,
  .fc-loading-screen__logo { animation: none !important; }
}
