/* Suite OPS — admin utilisateurs (tokens Encre/Suite, touch 44) */

.suite-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.suite-nav a {
  padding: 8px 12px;
  border-radius: var(--suite-radius-md, 8px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--suite-muted);
}
.suite-nav a:hover {
  color: var(--suite-ink);
  background: #eef2f6;
}
.suite-nav a[aria-current="page"] {
  color: var(--suite-brand);
  background: color-mix(in srgb, var(--suite-brand) 10%, white);
}

.users-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px 48px;
  width: 100%;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-header h1 {
  margin: 0;
  font-family: var(--suite-font-display, "IBM Plex Sans", sans-serif);
  font-size: 1.45rem;
  color: var(--suite-brand);
}
.page-header .lede {
  margin: 6px 0 0;
  color: var(--suite-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 52ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  min-height: var(--suite-touch, 44px);
  padding: 0 14px;
  border-radius: var(--suite-radius-md, 8px);
  border: 1px solid var(--suite-border);
  background: var(--suite-surface);
  color: var(--suite-ink);
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { border-color: #b8c2ce; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--suite-brand);
  border-color: var(--suite-brand);
  color: var(--suite-on-brand, #fff);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-danger {
  color: var(--suite-danger, #b42318);
  border-color: #e8c4c4;
}
.btn-sm { min-height: var(--suite-touch, 44px); padding: 0 12px; }
.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.panel {
  background: var(--suite-surface);
  border: 1px solid var(--suite-border);
  border-radius: var(--suite-radius-lg, 12px);
  padding: 16px;
  box-shadow: var(--suite-shadow);
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

input[type="email"],
input[type="text"],
select {
  min-height: var(--suite-touch, 44px);
  height: var(--suite-touch, 44px);
  border: 1px solid var(--suite-border);
  border-radius: var(--suite-radius-sm, 4px);
  padding: 0 12px;
  background: var(--suite-surface);
  color: var(--suite-ink);
  font: inherit;
  font-size: 15px;
}
select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235B6675' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
select:focus,
input:focus {
  outline: none;
  border-color: var(--suite-brand);
  box-shadow: 0 0 0 1px var(--suite-brand);
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--suite-border);
  font-size: 0.88rem;
  vertical-align: middle;
}
.table th {
  color: var(--suite-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--suite-canvas);
}
.table-users tr {
  height: var(--suite-touch, 44px);
}
.table-users .td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.table-users .td-actions .btn {
  min-height: var(--suite-touch, 44px);
}
.table tr:hover td {
  background: #f5f8fa;
}

.chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin: 0 2px 2px 0;
}
.chip-open { background: #e8eef5; color: var(--suite-brand); }
.chip-progress { background: #fff3e0; color: #9a5b10; }
.chip-done { background: #e6f2ea; color: #1f5c38; }
.chip-muted { background: #eef2f6; color: var(--suite-muted); }

.perms-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 16px;
  max-width: 420px;
  margin: 24px auto;
  border: 1px dashed var(--suite-border);
  border-radius: 12px;
  background: var(--suite-surface);
}
.empty-state-glyph {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--suite-canvas);
  border: 1px dashed var(--suite-border);
  color: var(--suite-muted);
  font-size: 28px;
}
.empty-state-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--suite-font-display, "IBM Plex Sans", sans-serif);
  color: var(--suite-brand);
}
.empty-state-desc {
  margin: 0;
  font-size: 14px;
  color: var(--suite-muted);
  line-height: 1.5;
}

.invite-panel .detail-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.apps-roles {
  display: grid;
  gap: 10px;
}
.app-role-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 10px;
  align-items: center;
}
.app-role-row .app-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.preview-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--suite-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--suite-brand) 6%, white);
}
.preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--suite-brand);
  color: #fff;
  font-weight: 700;
}
.muted-line {
  color: var(--suite-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(26, 35, 50, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-card {
  width: min(480px, 100%);
  background: var(--suite-surface);
  border: 1px solid var(--suite-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.modal-card h2 {
  margin: 0 0 8px;
  font-family: var(--suite-font-display, "IBM Plex Sans", sans-serif);
  color: var(--suite-brand);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--suite-brand);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 40px));
}

.section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-family: var(--suite-font-display, "IBM Plex Sans", sans-serif);
  color: var(--suite-brand);
}

.user-detail .meta-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.user-detail .meta-row dt { color: var(--suite-muted); }
.user-detail .meta-row dd { margin: 0; }
