:root {
  --bg: #f6f4ef;
  --ink: #1f2937;
  --accent: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #f6f4ef 0%, #e6e1d8 100%);
  color: var(--ink);
}

.shell {
  max-width: 760px;
  margin: 80px auto;
  background: white;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.avatar-circle {
  border-radius: 50%;
}

.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.breadcrumbs a {
  color: #64748b;
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5f5;
  color: #0f766e;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-inline .form-stack {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-inline .form-stack label {
  margin: 0;
}

.form-inline .form-stack input,
.form-inline .form-stack select,
.form-inline .form-stack textarea {
  width: auto;
  min-width: 180px;
}

.form-inline .form-actions {
  margin-top: 0;
}

.form-inline .form-stack {
  gap: 8px;
}

.form-inline .form-stack label {
  font-size: 0.85rem;
}

.form-inline .form-stack select {
  min-width: 140px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 600;
}

.table td {
  padding: 12px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table tr:hover td {
  background: #f8fafc;
}

.table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.table .sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 3;
}

.table thead .sticky-col {
  z-index: 4;
}

.table .sticky-col::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: #e2e8f0;
}

.matrix-table-wrap {
  overflow: auto;
  max-width: 100%;
}

.matrix-table-wrap .table td,
.matrix-table-wrap .table th {
  white-space: nowrap;
}

.table.compact .perm-label {
  font-size: 0;
}

.table.compact .perm-col-head {
  gap: 0;
}

.table.compact .perm-col-head input {
  margin-top: 6px;
}

.perm-col-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.matrix-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 16px;
}
.btn .icon {
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
}

.btn-mini {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
}
.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.cta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.toggle input:checked + .toggle-track {
  background: #0f766e;
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-help {
  font-size: 0.8rem;
  color: #64748b;
}

.toggle.danger .toggle-track {
  background: #fee2e2;
}

.toggle.danger input:checked + .toggle-track {
  background: #dc2626;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pill-default { background: #f1f5f9; color: #334155; }
.pill-success { background: #dcfce7; color: #166534; }
.pill-warning { background: #fef9c3; color: #854d0e; }
.pill-danger { background: #fee2e2; color: #991b1b; }
.pill-info { background: #e0f2fe; color: #075985; }

.alert-banner {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 16px;
  text-align: center;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.alert-banner-pills {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.section-card {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
