/*
 * Cabinet/Agent management screens ("Mon équipe" and the dashboard's team
 * summary) — a deliberately squarer, flatter, hairline-bordered treatment
 * matching the Repperio × Swiss Finance pitch deck, distinct from the rest
 * of the portal's default rounded-corner language (tokens.css's
 * --radius-sm/md/lg). Scoped entirely under .cabinet-panel so nothing here
 * touches any other page — see docs/superpowers/specs/
 * 2026-09-16-cabinet-agent-hierarchy-design.md, "Visual design."
 */

.cabinet-panel .card,
.cabinet-panel .cabinet-table,
.cabinet-panel .cabinet-summary__stat,
.cabinet-panel .btn,
.cabinet-panel .field input,
.cabinet-panel .field select {
  border-radius: 0;
}

.cabinet-panel .badge {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
}

.cabinet-panel .card {
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.cabinet-panel .cabinet-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-block: var(--space-3);
}

.cabinet-panel .cabinet-summary__stat {
  flex: 1 1 200px;
  background: var(--color-navy);
  color: #fff;
  padding: var(--space-4) var(--space-3);
  border-top: 3px solid var(--color-accent);
}

.cabinet-panel .cabinet-summary__value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  font-variant-numeric: tabular-nums;
}

.cabinet-panel .cabinet-summary__label {
  margin: 0;
  font-size: 0.8rem;
  color: #c7d2e8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cabinet-panel .cabinet-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.cabinet-panel .cabinet-table th,
.cabinet-panel .cabinet-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.cabinet-panel .cabinet-table th {
  background: var(--color-bg-alt);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.cabinet-panel .cabinet-table tbody tr:last-child td {
  border-bottom: none;
}

.cabinet-panel .cabinet-table tbody tr {
  transition: background-color 0.1s ease;
}

.cabinet-panel .cabinet-table tbody tr:hover {
  background: var(--color-bg-alt);
}

.cabinet-panel .cabinet-table__email {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.cabinet-panel .cabinet-empty-state {
  text-align: center;
  padding: var(--space-5) var(--space-3);
}

.cabinet-panel .cabinet-empty-state__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.cabinet-panel .cabinet-confirm {
  background: var(--color-bg-alt);
  margin: 0.5rem 0;
}

.cabinet-panel .cabinet-confirm__title {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.cabinet-panel .cabinet-invite-form {
  margin-bottom: var(--space-3);
}

/* Keyboard focus stays visible on every new interactive element in scope,
   matching the rest of the site's outline convention (see layout.css). */
.cabinet-panel button:focus-visible,
.cabinet-panel input:focus-visible,
.cabinet-panel select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive: the activity table collapses to stacked rows below the
   site's existing mobile breakpoint rather than scrolling horizontally. */
@media (max-width: 640px) {
  .cabinet-panel .cabinet-table thead {
    display: none;
  }

  .cabinet-panel .cabinet-table,
  .cabinet-panel .cabinet-table tbody,
  .cabinet-panel .cabinet-table tr,
  .cabinet-panel .cabinet-table td {
    display: block;
    width: 100%;
  }

  .cabinet-panel .cabinet-table tr {
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0;
  }

  .cabinet-panel .cabinet-table td {
    border-bottom: none;
    padding: 0.25rem 1rem;
  }

  .cabinet-panel .cabinet-table td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--color-text-muted);
  }
}
