.page-header {
  align-items: center;
}

.role-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-select {
  min-width: 180px;
}

.button-small {
  min-height: var(--button-height);
  height: var(--button-height);
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge--success {
  background: rgba(25, 135, 84, 0.15);
  color: #0f5132;
}

.status-badge--muted {
  background: rgba(108, 117, 125, 0.15);
  color: #6c757d;
}

.form-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6e6e73;
}

.status-label {
  font-size: 13px;
}

.form-field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.form-field--checkbox .form-label {
  flex: 1 1 auto;
  min-width: 0;
}

.form-field--checkbox .form-help,
.form-field--checkbox .form-error {
  flex: 0 0 100%;
}

.form-field--compact {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.form-field--checkbox input[type="checkbox"],
.notification-status-list input[type="checkbox"] {
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  background-color: #cfd4dc;
  background-image: radial-gradient(circle at center, #ffffff 0 6px, transparent 6.5px);
  background-repeat: no-repeat;
  background-size: 14px 14px;
  background-position: 2px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    background-position 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.form-field--checkbox input[type="checkbox"]:checked,
.notification-status-list input[type="checkbox"]:checked {
  background-color: #2f80ed;
  background-position: calc(100% - 2px) center;
  border-color: #2f80ed;
}

.form-field--checkbox input[type="checkbox"]:active,
.notification-status-list input[type="checkbox"]:active {
  transform: scale(0.98);
}

.form-field--checkbox input[type="checkbox"]:focus-visible,
.notification-status-list input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.2);
  outline-offset: 2px;
}

.form-field--checkbox input[type="checkbox"]:disabled,
.notification-status-list input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

.switch-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.1);
  color: #2f80ed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.switch-state.is-off {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}

.notification-groups {
  display: grid;
  gap: 16px;
}

.notification-group-card {
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 28px rgba(20, 20, 43, 0.04);
}

.notification-group-header {
  margin-bottom: 10px;
}

.notification-group-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.notification-group-description {
  margin: 4px 0 0;
  color: #6e6e73;
  font-size: 12px;
  line-height: 1.35;
}

.notification-group-body {
  display: grid;
  gap: 8px;
}

.notification-group-body--stacked {
  gap: 10px;
}

.notification-grid {
  display: grid;
  gap: 8px;
}

.notification-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.notification-status-field {
  gap: 8px;
}

.notification-status-field.is-disabled {
  opacity: 0.55;
}

.notification-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.notification-status-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.notification-status-list ul {
  display: block;
  padding: 0;
  margin: 0;
}

.notification-status-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.notification-status-section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.notification-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  border: 1px solid rgba(47, 128, 237, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 14px rgba(20, 20, 43, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.notification-status-item.is-checked {
  border-color: rgba(47, 128, 237, 0.34);
  background: rgba(47, 128, 237, 0.06);
  box-shadow: 0 8px 20px rgba(47, 128, 237, 0.12);
}

.notification-status-item:hover {
  border-color: rgba(47, 128, 237, 0.28);
  box-shadow: 0 6px 18px rgba(20, 20, 43, 0.06);
  transform: translateY(-1px);
}

.notification-status-field.is-disabled .notification-status-item {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  transform: none;
  border-color: rgba(0, 0, 0, 0.08);
}

.notification-status-item .form-label {
  flex: 1 1 auto;
  font-size: 13px;
}

.notification-status-item input[type="checkbox"] {
  flex: 0 0 auto;
}

@media (min-width: 980px) {
  .notification-status-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1320px) {
  .notification-status-sections {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
}
